PSA: More cmdlets require connecting to the SCC endpoint via the -EnableSearchOnlySession switch

We start the new year on a not so positive note. In short, Microsoft messed up the scope of impacted PowerShell cmdlets, as part of the connectivity changes introduced last August (MC1131771), which we initially covered here. After the initial rollout, many customers started noticing strange behavior with additional cmdlets, not listed in the original announcement. Many of the cmdlets related to working with retention policies threw an error, for example Set-RetentionCompliancePolicy:

EnableSearchOnlySession

Two things are curious in the above example. First, the error message clearly suggests that Microsoft (well, the engineer that coded the cmdlet) expects that you only use it after connecting via the -EnableSearchOnlySession switch. None of the initial communication received from Microsoft with regards to said changes listed the Set-RetentionCompliancePolicy cmdlet, so it is understandable why admins were still connecting via the “old method”. And while we’re quite used to Microsoft’s bad ways of communicating important changes by now, one should still expect better.

More striking is the observation that even though the cmdlet throws an error message, the changes are actually committed to the backend, as evident from the subsequent query via the Get-RetentionCompliancePolicy cmdlet. So, using the cmdlets via the “old method” still works, but we get an error in executing them… go figure. To understand what the proper behavior is, a support case was raised and a separate effort was made to directly contact the team responsible for the cmdlets. In effect, we now have an update in the form of MC1213770.

EnableSearchOnlySession1

In a nutshell, the message center post confirms that going forward, you must leverage the -EnableSearchOnlySession switch of the Connect-IPPSSession cmdlet in order to properly run any of the following cmdlets (in addition to the ones mentioned in the original announcement):

For whatever reason, the official documentation is yet to reflect on the aforementioned changes, so here I am, doing my part for spreading the news. Enjoy!

2 thoughts on “PSA: More cmdlets require connecting to the SCC endpoint via the -EnableSearchOnlySession switch

  1. Lee's avatar
    Lee says:

    Hi Vasil,

    Thanks for this information. Can you tell me, are these commandlets with the new -EnableSearchOnlySession flag executable in a non-interactive session in any way? We were previously using these commands as part of our SharePoint retention management automations and now we have no way to add or remove SharePoint site exceptions to our Global retention policy in an automated way.

    This has caused huge issues and I am struggling to find an alternative.

    Lee

    Reply
    1. Vasil Michev's avatar
      Vasil Michev says:

      Unfortunately, no. There are few others that haven’t been available for CBA scenarios as well, Microsoft is yet to put the effort in to address that.

      Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading