Windows 10 Build 10525, PowerShell, and Office 365
I’ve been a happy member of the Windows 10 Insider program since the program started and have been quite content to install new builds onto my PCs as Microsoft releases them to the “Fast Ring”. With the notable exceptions of some issues with builds close to RTM that have now been resolved, everything has gone much better than I anticipated.
August 19, 2015
I’ve been a happy member of the Windows 10 Insider program since the program started and have been quite content to install new builds onto my PCs as Microsoft releases them to the “Fast Ring”. With the notable exceptions of some issues with builds close to RTM that have now been resolved, everything has gone much better than I anticipated.
I’ve even upgraded my trusty Lumia 1020 to Windows 10 Mobile. This upgrade is less successful than the PC counterpart. I feel that the Lumia’s performance is degraded over that with Windows Mobile 8.1 and I also don’t like the new universal Outlook app as much as Outlook Mobile. Little things like notifications being flagged for messages that have been processed by Clutter and are no longer in the Inbox make me discontent.
Moving back to the PC version of Windows 10, when Microsoft released build 10525 yesterday, I went ahead and installed the new software on all my PCs and then ran into a curious problem with PowerShell. Basically, PowerShell failed every time it attempted to create a remote session with Exchange Online (Office 365).
I have the commands to create a new remote session with Exchange Online in my PowerShell profile, so I know that the same commands were executed today as I have used for the last two years or thereabouts. As it turns out, the command I used was slightly outdated as it pointed to an endpoint called https://ps.outlook.com/powershell rather than the newer https://outlook.office365.com/PowerShell-liveId. A quick edit of my PowerShell profile to update the endpoint and all was well. But it was still curious that a new Windows build should provoke such an issue.
In any case, I then went on to attempt to create a remote session to the Office 365 Compliance Center. This uses a different endpoint to Exchange Online because its functionality is designed to work across multiple Office 365 applications (Exchange Online and SharePoint Online are the two big ones for now). The function I use to connect is:
function ConnectCC{# Helper function to connect to the Office 365 Compliance Center and use their set of PowerShell cmdlets $global:O365Cred = Get-Credential $global:CCSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $O365Cred -Authentication Basic -AllowRedirection Import-PSSession $CCSession}
PowerShell running on Windows 10 RTM is quite happy to connect using these commands, but build 10525 breaks the happy situation and no amount of editing or trying different things managed to solve the problem. There was nothing more than could be done but to revert to Windows 10 RTM to see whether it could still connect.
The good news is that Windows 10 is very smart about rolling back to a previous build. A few minutes later, I was able to test PowerShell and everything worked as you’d expect. Weird!
The only differences I can see is the PowerShell version number in the redirect URI. Windows 10 generates a PSVersion of 5.0.10240.16384 while build 10525 reports PSVersion of 5.0.10525.0. The difference in the build number seems to have been sufficient to cause PowerShell to have a little meltdown when it attempted to create a remote session to the Office 365 Compliance Center.
Oh well, RTM works. No damage done. I’ll just get on with life.
Update (Sept 25): The problem persists with all post-RTM builds to date. After discussing the issue with some Microsoft engineers, I was able to connect with the code shown below. Note that the issue is only for connections made in Europe and it seems to be associated with certificate checking.
New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $O365Cred -Authentication Basic -AllowRedirection -SessionOption (New-PSSessionOption -SkipCACheck -SkipCNCheck -SkipRevocationCheck)
Follow Tony @12Knocksinna
About the Author
You May Also Like