O365 conncting through Powershell

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...

August 20th, 2015 10:36am

To resolve this issue try below steps, use the Exchange admin center in Office 365 to add the user as a member of the administrator role group. To do this, follow these steps:1.Sign in to the Office 365 portal (https://portal.office.com) as an administrator.
2.On the navigation bar, click Admin, and then click Exchange.
3.Click permissions, and then click  admin roles.
4.Double-click the role group to which you want to add the user. For example, if you want the user to have full access that includes Windows PowerShell, double-click Organization Management.
5.To add the user to the list, under Members, click Add (Add icon) .
6.Click save.
Free Windows Admin Tool Kit Click here and download it now
August 20th, 2015 11:27am

I can added it members again also same error..........
August 24th, 2015 12:45am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics