Search code examples
powershellgac

There is no Get-GacAssembly cmdlet


Windows 8.1, PowerShell 4. I'm wanting to use PS to manage the GAC. I find lots of references to Get-GacAssembly for reading a list, getting detailed info, etc.

But running PS as administrator, and PS ISE, I get an error:

> The term 'Get-GacAssembly' is not recognized as the name of a cmdlet

Do I need to CD to somewhere? How would I discover where to go to find the cmdlets?


Solution

  • The general answer to your question is that you must first install the module (by adding relevant files to Documents\Powershell\Modules or Windows\System32\WindowsPowershell\v1.0\Modules. Then, you should use Import-Module to load the cmdlets. Cmdlets in Windows\System32\WindowsPowershell\v1.0\Modules should be loaded by default. Script modules (e.g., modules that export functions) require at least RemoteSigned execution settings to run.