SK MASTAN Vali
asked on
Connecting to O365 via Powershell in Remote Desktop( windows Server2012)
Hi Every one,
Please solve given below issue..
We are Connecting to O365 via Powershell in Remote Desktop( windows Server2012) but it is giving an error ...
please anyone help me...
New-PSSession : Parameter set cannot be resolved using the specified named parameters. At line:57 char:14 + $Session = New-PSSession -ComputerName "pshell-msteam.pshell.com" -Configurati ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [New-PSSession], ParameterB indingException + FullyQualifiedErrorId : AmbiguousParameterSet,Micr osoft.Powe rShell.Com ma nds.NewPSSessionCommand Import-PSSession : Cannot bind parameter 'Session'. Cannot convert the "System.Web.SessionState.H ttpSession State" value of type "System.Web.SessionState.H ttpSession State" to type "System.Management.Automat ion.Runspa ces.PSSess ion". At line:58 char:28 + $temp = Import-PSSession $Session -allowclobber -warningaction silentlycontinu ... + ~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Import-PSSession], Paramet erBindingException + FullyQualifiedErrorId : CannotConvertArgumentNoMes sage,Micro soft.Power Sh ell.Commands.ImportPSSessi onCommand Connect-MsolService : Exception of type 'Microsoft.Online.Administ ration.Aut omation.Mi crosoftOnl ineExcepti on' was thrown. At line:60 char:3 + Connect-MsolService -Credential $Credentials -warningaction silentlycontinue + ~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ ~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [Connect-MsolService], Mic rosoftOnlineException + FullyQualifiedErrorId : 0x80070005,Microsoft.Onlin e.Administ ration.Aut om ation.ConnectMsolService
Please solve given below issue..
We are Connecting to O365 via Powershell in Remote Desktop( windows Server2012) but it is giving an error ...
please anyone help me...
New-PSSession : Parameter set cannot be resolved using the specified named parameters. At line:57 char:14 + $Session = New-PSSession -ComputerName "pshell-msteam.pshell.com"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The Powershell commands Kimputer provided are correct if you want to copy and paste everytime, or you could add the following script to the Powershell profile and all you have to type is Connect-ExchangeOnline which will tab-complete.
Open in new window