Ask Your Question
3

How can you add -Confirm:$false into Invoke-VMScript?

asked 2023-01-11 11:00:00 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2021-07-13 15:00:00 +0000

scrum gravatar image

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.

edit flag offensive delete link more

Your Answer

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

Add Answer


Question Tools

Stats

Asked: 2023-01-11 11:00:00 +0000

Seen: 7 times

Last updated: Jul 13 '21