When running set-vm cmdlet, it is prompting me to confirm the action. This confirmation should only happen when I pass the -confirm flag. How can I get around this, so I can have it run as a schedule task with no one watching it.
PS I:\> set-vm $v -MemoryMB 2048 -NumCPU 2
Proceed with update of the following parameters of virtual machine with name
New MemoryMB: 2048MB
New NumCPU: 2
(default is "Y"):?
Y - Continue with only the next step of the operation.
A - Continue with all the steps of the operation.
N - Skip this operation and proceed with the next operation.
L - Skip this operation and all subsequent operations.
S - Pause the current pipeline and return to the command prompt. Type "exit" to
resume the pipeline.
(default is "Y"):Y
Incidentally, this is well documented here: http://blogs.msdn.com/powershell/archive/2006/12/15/confirmpreference.aspx