Microsoft Virtualization Discussions

Add-NcLunMap and Remove-NcLunMap always asks for confirmation

Andrew7193
2,349 Views

I have a script that is being used in doing DR tests. It maps or removes the mapping depending on the stage of the test. When the Add-NcLunMap and the Remove-NcLunMap commands run there is a pop-up that asks if you are sure you want to do this. How do I get rid of that?

1 ACCEPTED SOLUTION

donny_lang
2,338 Views

Add "-Confirm $false" to your commands, should suppress the confirmation dialog. 

View solution in original post

2 REPLIES 2

donny_lang
2,339 Views

Add "-Confirm $false" to your commands, should suppress the confirmation dialog. 

Andrew7193
2,330 Views

-Confirm:$false cannot forget the ":". I found that out a bit ago and just now got a a chance to answer. 

Thank you.

Public