1
Here is my problem:
PS C:\windows\system32> $env:PSModulePath.Replace(';',"`n")
C:\Users\sirdank\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\windows\system32\WindowsPowerShell\v1.0\Modules
C:\Program Files (x86)\Microsoft SQLServer\120\Tools\PowerShell\Modules\
C:\Program Files(x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\
C:\Users\sirdank\Documents\WindowsPowerShell\Modules
C:\Program Files\WindowsPowerShell\Modules
C:\windows\system32\WindowsPowerShell\v1.0\Modules
C:\Program Files (x86)\Microsoft SQLServer\120\Tools\PowerShell\Modules\
C:\Program Files(x86)\Microsoft SDKs\Azure\PowerShell\ResourceManager\AzureResourceManager\
C:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\
C:\ProgramFiles (x86)\Microsoft SDKs\Azure\PowerShell\Storage\
This happened after I ran Get-Module xWebAdministration
because I want to use Azure Desired State Configuration. Since then, I've tried
- Modifying PSModulePath through control panel
- Modifying it using SETX
- Modifying it using [Environment]::SetEnvironmentVariable()
- Checking all six powershell profiles to see if they're modifying it (none of them even exist)
- Rebooting my laptop twice
None of these things has fixed my problem. When I look in control panel, PSModulePath appears to be set correctly. However, when I open powershell, it still displays the output above and DSC still doesn't work because it tries to get xWebAdministration twice. How do I fix my PSModulePath
?