How can you add -Confirm:$false into Invoke-VMScript?
add a comment
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.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-01-11 11:00:00 +0000
Seen: 7 times
Last updated: Jul 13 '21