How to Remove the "Confirmation" in SharePoint PowerShell Commands

How to Remove the "Confirmation" in SharePoint PowerShell Commands

When you want to do a big script in PowerShell, sometimes it keeps asking you for confirmation even if you did not put the “-Confirm” parameter in your command.

The answer is simple, just add  -Confirm:$false

Example:
Remove-SPWebApplication $mainurl -DeleteIISSite -RemoveContentDatabases -Confirm:$false


Say thanks if it helped 🙂

No ratings yet.

Please rate this

 
Comments
Lawrence Armour

Thanks if it helped

Leave a Reply