Automatically Confirm cmdlets – 4/23, Navigate Into Success

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 -Confirm switch or not.

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


Read this post at its original location at http://vjeko.com/blog/automatically-confirm-cmdlets, or visit the original blog at http://vjeko.com. 5e33c5f6cb90c441bd1f23d5b9eeca34

The post Automatically Confirm cmdlets appeared first on Vjeko.com.

..

Continue reading on Source Blog

Powered by WPeMatico