This function has been updated and renamed to Confirm-NeededModules, see the new readme below.


This function are making sure that the needed modules are installed, up to date and imported.
I have made it dynamic so you can use switches to activate some of the features, like: -ImportModule, -OnlyUpgrade, -DeleteOldVersion. You can read more in the blog post or in the script file.

This script will do the following

  • Checks so TLS 1.2 are used by PowerShell
  • Making sure that NuGet and PowerShellGet are installed as provider
  • Making sure that PSGallery are set as trusted
  • Checks if the module are installed, if it's not installed it will be installed.
  • If the module are installed it will check if it's the latest version if not then it will update the module.
  • If the module are updated the script will uninstall the old version of the module.
  • Import the modules at the end



This site uses Akismet to reduce spam. Learn how your comment data is processed.

Begin typing your search term above and press enter to search. Press ESC to cancel.

Back To Top
%d bloggers like this: