【发布时间】:2010-09-24 00:40:05
【问题描述】:
我正在尝试使用 PSSessionOption 的 ApplicationArguments 属性将一些参数传递到新的 Powershell 远程会话中。不幸的是,争论似乎没有出现。
代码如下:
$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 at offset 101 in file:line:column...”
我做错了吗?
【问题讨论】: