Solved

exchange , office 365

Posted on 2016-10-22
4
63 Views
Last Modified: 2016-10-22
Hi All,

how do i fix  session error trying to connect to 0365
thank you in advance

cmdlet Get-Credential at command pipeline position 1
Supply values for the following parameters:
Credential
PS C:\WINDOWS\system32> $Session = New-PSSession -ConfigurationName Microsoft.Ex
change -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credenti
al $UserCredential -Authentication Basic -AllowRedirection
New-PSSession : [outlook.office365.com] Processing data from remote server
outlook.office365.com failed with the following error message: [ClientAccessSer
ver=BY2PR06CA041,BackEndServer=bn3pr1201mb0996.namprd12.prod.outlook.com,Reques
tId=4b6cff4b-53bb-4042-9a75-c24e881a89aa,TimeStamp=10/22/2016 3:05:35 PM]
[FailureCategory=WSMan-InvalidShellID] The request for the Windows Remote
Shell with ShellId F25E68B8-015A-44B3-9DA8-305616CCBDB2 failed because the
shell was not found on the server. Possible causes are: the specified ShellId
is incorrect or the shell no longer exists on the server. Provide the correct
ShellId or create a new shell and retry the operation. For more information,
see the about_Remote_Troubleshooting Help topic.
At line:1 char:12
+ $Session = New-PSSession -ConfigurationName Microsoft.Exchange -Conne ...
+            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OpenError: (System.Manageme....RemoteRunspace:Re
   moteRunspace) [New-PSSession], PSRemotingTransportException
    + FullyQualifiedErrorId : CannotConnectTargetSessionDoesNotExist,PSSession
   OpenFailed
PS C:\WINDOWS\system32>
0
Comment
Question by:VN-PC view
  • 2
  • 2
4 Comments
 
LVL 7

Accepted Solution

by:
No More earned 500 total points
ID: 41855329
$credential = Get-Credential
 
Import-Module MsOnline
Connect-MsolService -Credential $credential
 
 
<# Exchange Online #>
$exchangeSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://outlook.office365.com/powershell-liveid/" -Credential $credential -Authentication "Basic" -AllowRedirection
Import-PSSession $exchangeSession -DisableNameChecking
 
<# Office 365 Compliance #>
$ccSession = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri "https://ps.compliance.protection.outlook.com/powershell-liveid/" -Credential $credential -Authentication "Basic" -AllowRedirection
Import-PSSession $ccSession -Prefix cc

Open in new window

0
 

Author Comment

by:VN-PC view
ID: 41855339
Hi David,

You're Awesome Sir, thank you so much
0
 
LVL 7

Expert Comment

by:No More
ID: 41855341
You are welcome
0
 

Author Comment

by:VN-PC view
ID: 41855372
Hi david,

hoping you could answers my next question, :)
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read this checklist to learn more about the 15 things you should never include in an email signature.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question