Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To add -Confirm:$false into Invoke-VMScript, you can simply include it as a parameter when calling the cmdlet. Here's an example:

Invoke-VMScript -VM $vm -ScriptText $script -GuestUser $username -GuestPassword $password -Confirm:$false

In this example, the -Confirm:$false parameter ensures that the cmdlet will not prompt you for confirmation before running.