Invoke-AzVMRunCommand and Start-Process under specific user on remote VM using Azure Runbook
- 阅读更多 关于 Invoke-AzVMRunCommand and Start-Process under specific user on remote VM using Azure Runbook
问题 I need to run Start-Process on a remote VM with specific user account using Azure Powershell Runbook function Install-Postgres { $username = "aact-import-vm1\aact-importer" $password = "ChangeMe!" $cred = New-Object System.Management.Automation.PSCredential -ArgumentList ` @($username,(ConvertTo-SecureString -String $password -AsPlainText -Force)) write-output $cred # run pg installer Start-Process "C:\Program Files\WindowsPowerShell\Modules\Install-Postgres\postgresql.exe" -ArgumentList ` "-