0
Office 2010をパラメータとともにインストールしていますが、スクリプトを展開するための管理者権限を持つPSSession
を作成しましたが、複数のユーザーに問題があります。Powershell foreach in pssession
インストールが開始されないため、私はinvokeを使用できません。
このスクリプトを複数のコンピュータに展開する別の方法はありますか?
CLS
Start-Job -Name Job1 -ScriptBlock {
$domainuser = "$env:USERDNSDOMAIN\administrator"
$domainpassword = 'Credential' | ConvertTo-SecureString -AsPlainText -Force
$domaincredentials = New-Object System.Management.Automation.PSCredential ($domainuser, $domainpassword)
$ip = "192.168.10.75"
Enter-PSSession -ComputerName $ip -Credential $domaincredentials }
Wait-Job -Name Job1
Start-Process -FilePath "powershell" -Verb runAs
Start-Process -FilePath "C:\temp\32 Bit\setup.exe" -ArgumentList "/adminfile Office2010.MSP"