我有一个 Sharepoint 场设置,我正在使用远程 powershell 从域中的 Windows 7 机器连接到我的应用程序/搜索服务器之一。客户端和应用程序服务器都具有 powershell 2,其执行策略设置为无限制并启用了 psremoting。此外,我将 cmdlet 作为域管理员帐户运行。
我可以使用以下 cmdlet 创建与远程服务器的会话:
$Session = New-PSSession -ConfigurationName "Microsoft.PowerShell" -ConnectionUri "http://app01-spl1:5985/wsman/" -Authentication "Kerberos"
Import-PSSession $Session -AllowClobber
但是,当我导入会话时,出现以下错误:
Import-PSSession : Proxy creation has been skipped for '%' command, because PowerShell couldn't verify its name as safe.
At line:1 char:17
+ Import-PSSession <<<< $Session -AllowClobber
+ CategoryInfo : InvalidData: (:) [Import-PSSession], InvalidOperationException
+ FullyQualifiedErrorId : ErrorSkippedUnsafeCommandName,Microsoft.PowerShell.Commands.ImportPSSessionCommand
Import-PSSession : Proxy creation has been skipped for '?' command, because PowerShell couldn't verify its name as safe.
At line:1 char:17
+ Import-PSSession <<<< $Session -AllowClobber
+ CategoryInfo : InvalidData: (:) [Import-PSSession], InvalidOperationException
+ FullyQualifiedErrorId : ErrorSkippedUnsafeCommandName,Microsoft.PowerShell.Commands.ImportPSSessionCommand
Import-PSSession : Could not resolve remote alias 'ise'.
At line:1 char:17
+ Import-PSSession <<<< $Session -AllowClobber
+ CategoryInfo : OperationTimeout: (:) [Import-PSSession], ArgumentException
+ FullyQualifiedErrorId : ErrorCouldntResolveAlias,Microsoft.PowerShell.Commands.ImportPSSessionCommand
谁能帮助解决这个错误?