Skip to content

Instantly share code, notes, and snippets.

@techthoughts2
Created November 7, 2018 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save techthoughts2/6ca88b2b318dd8666ff35cf49ded7d74 to your computer and use it in GitHub Desktop.
Save techthoughts2/6ca88b2b318dd8666ff35cf49ded7d74 to your computer and use it in GitHub Desktop.
Use Windows PowerShell modulels in PowerShell Core by appending the Windows PowerShell PSModulePath to your PowerShell Core PSModulePath
<#
Most of the modules that ship as part of Windows (for example, DnsClient, Hyper-V, NetTCPIP, Storage, etc.) and other Microsoft products including Azure and Office have not been explicitly ported to .NET Core yet.
By installing the WindowsPSModulePath module, you can use Windows PowerShell modules by appending the Windows PowerShell PSModulePath to your PowerShell Core PSModulePath.
#>
# Add `-Scope CurrentUser` if you're installing as non-admin
Install-Module WindowsPSModulePath -Force
# Add this line to your profile if you always want Windows PowerShell PSModulePath
Add-WindowsPSModulePath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment