2014-03-07 63 views
0
Invoke-Command -ComputerName Server01 -ScriptBlock { 
param ($first) 

Write-Output "The value of `$a is: $first" 
} -ArgumentList $a 

The value of $a is: @('1','2','3') 

家伙嗨数组,如何传递$一个在远程会话数组????。传入的PowerShell远程会话

+0

我不是向下选民.. –

+0

感谢@CB。我不明白为什么人们投票,即使有人有真正的问题。我想stackexchange管理员应该看看这个。 – PowerShell

回答

1

方式一:

Invoke-command -ScriptBlock {param($first) Write-output $first} -argumentlist @(,(1,2,3)) 

1 
2 
3 
+0

谢谢你的回复。 – PowerShell

相关问题