This topic contains 2 replies, has 2 voices, and was last updated by Anonymous 2 years, 3 months ago.
April 17, 2015 at 3:20 am #24385
Could someone help me to create a local PS Session for an exchange host. The below is my current lab config.
Host OS : win 8.1 (PS 4.0)
Exchange 2010 (Server 2008R2 OS (PS 2.0)) installed on Hyper-V with 2 node DAG.
Host OS is not a member of the domain (This DC is also installed on Hyper-V)
The below is the code I am trying. Please help me to get the correct code and suggest any other changes to be made.
$Cred=Get-Credential $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://dagn1.lab.com/PowerShell/ -Authentication Kerberos -credential $cred Import-PSSession $s
New-PSSession : [dagn1.lab.com] Connecting to remote server dagn1.lab.com failed with the following error message : WinRM cannot process the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: There are currently no logon servers available to service the logon request. Possible causes are: -The user name or password specified are invalid. -Kerberos is used when no authentication method and no user name are specified. -Kerberos accepts domain user names, but not local user names. -The Service Principal Name (SPN) for the remote computer name and port does not exist. -The client and remote computers are in different domains and there is no trust between the two domains. After checking for the above issues, try the following: -Check the Event Viewer for events related to authentication. -Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or use HTTPS transport. Note that computers in the TrustedHosts list might not be authenticated. -For more information about WinRM configuration, run the following command: winrm help config. For more information, see the about_Remote_Troubleshooting Help topic. At C:\Users\SagarJyo\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:2 char:6 + $s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://d ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : OpenError: (System.Manageme....RemoteRunspace:RemoteRunspace) [New-PSSession], PSRemotingTransportException + FullyQualifiedErrorId : AuthenticationFailed,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 C:\Users\SagarJyo\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1:3 char:18 + Import-PSSession $s + ~~ + CategoryInfo : InvalidData: (:) [Import-PSSession], ParameterBindingValidationException + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.PowerShell.Commands.ImportPSSessionCommand
April 17, 2015 at 3:49 am #24391
It's telling you that it can't find a domain controller that the server will trust to handle the authentication.
April 17, 2015 at 4:16 am #24394
thnx Don. After joining to the DC it got worked.
You must be logged in to reply to this topic.