0
我想通過使用PSSessionOption的ApplicationArguments屬性將一些參數傳遞到新的Powershell遠程會話。不幸的是,這些論據似乎並沒有出現。Powershell遠程ApplicationArguments不工作
下面的代碼:
$client = "Bubba"
$options = New-PSSessionOption -ApplicationArguments @{ Client = $client }
Enter-PSSession -ComputerName "Server" -SessionOption $options
$clientName = $PSSenderInfo.ApplicationArguments.Client
$dir = New-Item "c:\temp\$clientName" -type directory
Exit-PSSession
這將導致一個錯誤: 「NewNotImplementedException在文件偏移量101:行:列...」
難道我做錯了什麼?
我在哪裏可以閱讀更多關於這方面的信息? – 2011-11-09 12:32:10