Got another problem for you guys.. :P - Powershell/Office365/MS Exchange

Associate
Joined
20 Aug 2007
Posts
1,333
Location
Solihull
Ok I return once more with a different problem to pick your brains about!
Aside from my local server issues (backup etc) I am trying to fix some errors with the companies MS Office 365. I am trying to access the exchange servers via the powershell but am getting some problems.

I am trying to follow this process

http://community.office365.com/en-us/forums/161/p/16010/73984.aspx

But experiencing these errors

de8f50e7.png


Any idea's?
 
You need to run the following command first:

Set-ExecutionPolicy RemoteSigned

then do what that tutorial shows ;)
 
Ahhh I tried running powershell again as admin and it's accepted it, that was probably the problem

and damn it, the problems continue..


PS C:\Windows\system32> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook
.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection
[ps.outlook.com] Connecting to remote server failed with the following error message : Access is denied. For more infor
mation, see the about_Remote_Troubleshooting Help topic.
+ CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [], PSRemotingTransportExc
eption
+ FullyQualifiedErrorId : PSSessionOpenFailed
PS C:\Windows\system32>
 
Last edited:
That looks like PowerShell security settings are being set on your server which are enforcing execution policy. You won't be able to change it as it is set in the Security part of a GPO.

What does: Get-Executionpolicy

Return to you in the prompt window?

The above error just likes like you weren't able to connect to ps.outlook.com due to authentication? Probably as you are running as administrator?


Try this:

$Cred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $Cred -Authentication Basic –AllowRedirection

This will prompt you for the authentication box (use your admin account on live@edu or office365)

Then try:

Import-PSSession $Session



Failing all of this, you need a server to be excempt from execution policy and set it to "Unrestricted".
 
Last edited:
Back
Top Bottom