2014-03-07 2 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') 

안녕하세요, 어떻게 $ a 원격 세션에서 배열로 전달할 수 있습니다 ????.PowerShell 원격 세션에서 배열 전달

+0

나는 아래 유권자 .. –

+0

감사 @CB 아니에요. 사람이 진정한 쿼리를 가지고 있더라도 사람들이 왜 투표를하는지 이해할 수는 없습니다. 나는 stackexchange 관리자가 이것 좀 봐야 겠군. – PowerShell

답변

1

한 가지 방법 :

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

1 
2 
3 
+0

답장을 보내 주셔서 감사합니다. – PowerShell

관련 문제