Solved

exchange , office 365

Posted on 2016-10-22
4
113 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

A list of top three free exchange EDB viewers that helps the user to extract a mailbox from an unmounted .edb file and get a clear preview of all emails & other items with just a single click on mailboxes.
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
This video discusses moving either the default database or any database to a new volume.

707 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