powershellget

Using PowerShellGet on VSTS hosted agents

妖精的绣舞 提交于 2020-01-13 13:49:34
问题 I am using Visual Studio Team Services (VSTS) hosted build agents in my build process. My builds mostly rely on the 'PowerShell' step that calls a script that I have in git. From within this script, I would like to manage PowerShell modules using PowerShellGet. For example, I would like to be able to install pscx simply by running Install-Module -Name pscx Unfortunately, hosted agents use PowerShell 4 and they don't have the PowerShellGet module installed. As a result, the Install-Module

PowerShell v5 - How to install modules to a computer having no internet connection?

不羁岁月 提交于 2019-12-09 16:51:12
问题 I've a machine (v3, internet, no admin access) which I used to download WMF 5.0 and set up another machine(v5, no internet, admin access). Now, I want to use some modules from PowerShellGet on the machine running v5 but no internet connection. I need an option to download *.psm1 file which I can then copy over and use. Just like we have options to download from GitHub. Anyone with a similar issue and any workarounds ? 回答1: Install the Package Management Module on your PowerShell 3 machine,

How to install/update a powershell module from a local folder - set up an internal module repository

泄露秘密 提交于 2019-12-07 02:05:36
问题 I need to install a PowerShell module (i.e. sqlserver) on one production box, however, the production server does not have any internet connection. An alternative way I am using is to use save-module to save module files onto a shared folder and then copy the files from the shared folder directly to production server's PS module path c:\program files\WindowsPowerShell\Modules It works, but I am just wondering whether we can use the existing approach, i.e. install-module, something like

Using PowerShellGet on VSTS hosted agents

佐手、 提交于 2019-12-06 02:50:48
I am using Visual Studio Team Services (VSTS) hosted build agents in my build process. My builds mostly rely on the 'PowerShell' step that calls a script that I have in git. From within this script, I would like to manage PowerShell modules using PowerShellGet. For example, I would like to be able to install pscx simply by running Install-Module -Name pscx Unfortunately, hosted agents use PowerShell 4 and they don't have the PowerShellGet module installed. As a result, the Install-Module function is not available. Anybody has any suggestion to use the PowerShellGet module on VSTS hosted agent?

Invalid Web Uri error on Register-PSRepository

﹥>﹥吖頭↗ 提交于 2019-12-04 11:42:46
问题 After Windows November update ( PackageManagement and PowerShellGet modules of 1.0.0.1 version) I can't register HTTPS NuGet servers as PSRepository anymore: Register-PSRepository -Name test -SourceLocation https://some-nuget/api/v2 It returns error: # Register-PSRepository : The specified Uri 'https://some-nuget/api/v2' for parameter 'SourceLocation' is an invalid Web Uri. Please ensure that it meets the Web Uri requirements. 回答1: This is caused with a bug related to accessing HTTPS

PowerShell v5 - How to install modules to a computer having no internet connection?

此生再无相见时 提交于 2019-12-04 04:50:20
I've a machine (v3, internet, no admin access) which I used to download WMF 5.0 and set up another machine(v5, no internet, admin access). Now, I want to use some modules from PowerShellGet on the machine running v5 but no internet connection. I need an option to download *.psm1 file which I can then copy over and use. Just like we have options to download from GitHub. Anyone with a similar issue and any workarounds ? Install the Package Management Module on your PowerShell 3 machine, and then use Save-Module ... Or set up ProGet somewhere "on the edge" of your network, and have it mirror the