Automatically Confirm cmdlets

Some NAV PowerShell cmdlets (such as Import-NAVApplicationObject) don’t have the -Force switch, and always ask for confirmation regardless of whether you include the -Confirmswitch or not.

To work around this, append the –Confirm:$false switch to such command. That sets the ConfirmPreference to nonefor an individual command, and confirms its confirmation dialogs.

Vjeko
Vjeko

Writes about Business Central, AL, and building software with agents. More on the About page.

Comments