Windows PowerShell 6 (IT Pro Solutions) by William Stanek

Windows PowerShell 6 (IT Pro Solutions) by William Stanek

Author:William Stanek [Stanek, William]
Language: eng
Format: azw3
Published: 2017-03-21T04:00:00+00:00


$Session = New-PSSession -ConfigurationName Windows.PowerShell

-ConnectionUri http://Server24.imaginedlands.com/PowerShell/

-AllowRedirection -Authentication Kerberos -Credential $Cred

Here, when PowerShell executes Get-Credential, you are prompted for a user name and password. This credential is then stored in the $Cred variable. When PowerShell creates the remote session on Server24, the credential is passed in using the –Credential parameter.

If you want to use an authentication mechanism other than Kerberos or your computer isn’t connected to the domain in which you want to work, you may need to use HTTPS as the transport (or the destination server must be added to the TrustedHosts configuration settings for WinRM, and HTTP must be enabled in the client configuration). You also must explicitly pass in a credential using the –Credential parameter, as shown in this example:

$Cred = Get-Credential



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.