$Computers = Get-QADComputer -sizelimit 5
5 台のコンピューターのリストを返します。私はループします
foreach($computer in $computers) {
echo "and then I can do this $computer.name"
$computers からコンピュータ名のみを取得します。しかし、次のように start-job に渡そうとすると:
Start-Job -FilePath $ScriptFile -Name $Computer.Name -ArgumentList $Computer
$scriptfile 内で $computer.name を実行できません。$computer.name のように渡し、$args[0] のように呼び出す必要があります。しかし、その後、他のすべてのプロパティを失います ($scriptfile 内で束を使用しています)。
ここに来ていないのは何ですか?$computer を何と呼びますか? そして、 $computer.name を何と呼びますか?
スネ:)