I am connceting Office 365 through powershell Script. Hosting my in windows Server 2012 IIS, we are using nsoftware(Powershell ASP) but it is giving bellow error.....
Any One help please..
======================================================================================
New-PSSession : [outlook.office365.com] Connecting to remote server outlook.office365.com failed with the following error message : Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. At line:14 char:9 + $Ses = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~ + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:Re moteRunspace) [New-PSSession], PSRemotingTransportException + FullyQualifiedErrorId : AccessDenied,PSSessionOpenFailed Import-PSSession : Cannot validate argument on parameter 'Session'. The argument is null. Provide a valid value for the argument, and then try running the command again. At line:15 char:27 + $temp = Import-PSSession $Ses -allowclobber -warningaction silentlycontinue + ~~~~ + CategoryInfo : InvalidData: (:) [Import-PSSession], ParameterBi ndingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.Power Shell.Commands.ImportPSSessionCommand Connect-MsolService : Exception of type 'Microsoft.Online.Administration.Automation.MicrosoftOnlineException' was thrown. At line:16 char:2 + Connect-MsolService -Credential $cred -warningaction silentlycontinue + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OperationStopped: (:) [Connect-MsolService], Mic rosoftOnlineException + FullyQualifiedErrorId : 0x80070005,Microsoft.Online.Administration.Autom ation.ConnectMsolService
please any one help me...