Install Unpkg Windows

The ability to find and install PowerShell modules from online sources like Nuget makes life for a Windows admin a smidge nicer. On the flipside, arbitrary trust of online package repositories and granting servers outbound internet access can be a nightmare for those tasked with protecting a network.

  1. Install A Nupkg
  2. Install Unpkg Windows 8
  3. Windows Install Nupkg File

Install A Nupkg

Windows

Install Unpkg Windows 8

You might find yourself needing to install a PowerShell module (as a nupkg file) on a system with restricted (or no) internet access, as one of our security consultants found himself needing to do.

Here’s a quick guide on how to achieve this. If only it were as simple as Install-Package .module.nupkg!

I have a problem installing the OneView WAC Extension. In our environment we do not have internet access. For this reason I have placed the OneView '.nupkg' file on the 'C: WAC-Extension' directory. I have mounted the directory in Windows Admin Center and I also see the extension. When I try to install the extension, I get this error. Install only this package and not its dependencies. ProjectName: The project into which to install the package, defaulting to the default project. Source: The URL or folder path for the package source to search. Local folder paths can be absolute, or relative to the current folder. If omitted, Install-Package searches the currently selected.

Install Unpkg Windows

Steps#

  1. Run Install-PackageProvider -Name NuGet -RequiredVersion 2.8.5.201 -Force to install the provider from a computer with an internet connection.
  2. After the install, you can find the provider installed in C:Program FilesPackageManagementProviderAssemblies – copy the Nuget folder to external media or otherwise find a way to get it to your target system.
  3. Place the nuget folder in C:Program FilesPackageManagementProviderAssemblies on your target computer.
  4. Start a new PowerShell session on the target computer to auto-load the package provider.
  5. Create a new folder in C: named Packages
  6. Copy your nupkg file(s) into C:Packages
  7. In PowerShell run Register-PSRepository -Name Local -SourceLocation C:Packages -InstallationPolicy Trusted
  8. You can list the packages available with Find-Module -Repository Local
  9. Run Install-Module -Name <YourModuleName> where <YourModuleName> is the name of your package as returned by the command in step 8.
Install Unpkg Windows

Thanks#

Install unpkg windows 10

Windows Install Nupkg File

I put this together with information from trebleCode and Nova Sys Eng on StackOverflow. Thanks go out to those fine people.