NuGet Package Management Provider
1. PowerShell
1.1. Installation
-
See https://github.com/OneGet/oneget/issues/472 about the NuGet 3.0.0.1 issue.
-
Enter the following commands at a PowerShell Command Prompt with administrative privileges.
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 Get-PackageProvider -ListAvailable Get-PackageSource Get-PackageProvider -Force -Name Chocolatey Get-PackageProvider -Force -Name NuGet Get-PackageSource Register-PackageSource -Force -Location http://chocolatey.org/api/v2 -Name chocolatey -ProviderName Chocolatey -Trusted Register-PackageSource -Force -Name PSGallery -ProviderName PowerShellGet -Trusted Get-PackageSource # Remove package providers. Unregister-PackageSource -Force -Location http://chocolatey.org/api/v2 -Name chocolatey -ProviderName Chocolatey Unregister-PackageSource -Force -Name PSGallery -ProviderName PowerShellGet Install-PackageProvider -Force -Name NuGet Get-PackageProvider -ListAvailable $Path = "${Env:ProgramFiles}\PackageManagement\ProviderAssemblies" Get-ChildItem -Path $Path
1.2. Uninstallation
-
Note: If it fails to remove the NuGet folder, then close the PowerShell Command Prompt, open a new PowerShell Command Prompt and try again.
-
Enter the following commands at a PowerShell Command Prompt with administrative privileges.
Get-PackageProvider -ListAvailable $Path = "${Env:ProgramFiles}\PackageManagement\ProviderAssemblies" Get-ChildItem -Path $Path Remove-Item -ErrorAction SilentlyContinue -Force -Path "$Path\NuGet" -Recurse -Verbose Get-ChildItem -Path $Path # If it fails to remove the NuGet folder, then close the PowerShell Command Prompt, # open a new PowerShell Command Prompt and try again. Get-PackageProvider -ListAvailable
2. Modules
2.1. Azure Active Directory
-
Enter the following commands at a PowerShell Command Prompt with administrative privileges.
# If the production AzureAD module is already installed, # then uninstall it and install the new preview version. Uninstall-Module AzureAD Install-Module AzureADPreview
2.2. CrowdStrike Falcon
2.2.1. Installation
-
Enter the following commands at a PowerShell Command Prompt with administrative privileges.
Get-InstalledModule Install-Module -Force -Name PSFalcon Get-InstalledModule
2.2.2. Uninstallation
-
Enter the following commands at a PowerShell Command Prompt with administrative privileges.
Get-InstalledModule Uninstall-Module -Force -Name PSFalcon Get-InstalledModule
3. Packages
3.1. MailKit
3.1.1. Installation
-
Note: The PowerShell implementation of Nuget provider only works with packages without dependencies (or maybe simple dependencies). Make sure to install the dependencies first and use the -SkipDependencies option with the Install-Package cmdlet.
-
Enter the following commands at a PowerShell Command Prompt with administrative privileges.
Disable-Proxy HKCU: Get-Package -ProviderName NuGet Install-Package -Name "Portable.BouncyCastle" Install-Package -Name "MimeKit" -SkipDependencies Install-Package -Name "MailKit" -SkipDependencies Get-Package -ProviderName NuGet Get-Package -ProviderName NuGet | Select-Object Name, Version, Source, Summary, Dependencies
3.1.2. Uninstallation
-
Enter the following commands at a PowerShell Command Prompt with administrative privileges.
Disable-Proxy HKCU: Get-Package -ProviderName NuGet Uninstall-Package -Name "MailKit" Uninstall-Package -Name "MimeKit" Uninstall-Package -Name "Portable.BouncyCastle" Get-Package -ProviderName NuGet