http://www.cnblogs.com/LanTianYou/p/4723914.html
谁能解答我结尾问的问题?太感谢了。
-Credential<PSCredential>
Specifies a user account that has permission to perform this action. The default is the current user.
Type a user name, such as "User01", "Domain01\User01", or "User@Domain.com", or enter a PSCredential object, such as one returned by the Get-Credentiall cmdlet.
Example:
$pw = convertto-securestring -AsPlainText -Force -String <insert pw here>
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist "Domain\User",$pw
$session = new-pssession -computername <computer> -credential $cred
非常感谢!园豆都是你的了~