Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Unload All Non-Microsoft Modules

$
0
0

Summary: Learn to unload all non-Microsoft Windows PowerShell modules.

Hey, Scripting Guy! Question Windows PowerShell is acting funny and I want to unload all modules that are not written by Microsoft.
          How can I easily do this?

Hey, Scripting Guy! Answer Use Get-Module to find all loaded modules, use the Where-Object cmdlet to filter for authors
          that do not match Microsoft, and then pipe the results to the Remove-Module cmdlet:

Get-Module | where Author -notmatch 'microsoft' | Remove-Module


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>