Skip to content

Instantly share code, notes, and snippets.

@micmaher
Created March 28, 2016 19:10
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 micmaher/cc18efbb9e8e3665ce6b to your computer and use it in GitHub Desktop.
Save micmaher/cc18efbb9e8e3665ce6b to your computer and use it in GitHub Desktop.
A collection of Package Management commands
# Get through proxy challenge
$wc = New-Object System.Net.WebClient
$wc.Proxy.Credentials = [System.Net.CredentialCache]::DefaultNetworkCredentials
$wc.DownloadString('http://microsoft.com')
Install-PackageProvider -Name NuGet -Force
Get-PackageProvider
Find-Package *MVA* -Source psgallery
Find-Package *MVA* -Source psgallery | select -Property summary
Install-Module MVA_DSC_2015_Day1,MVA_DSC_2015_Day2
Get-Module -ListAvailable | where author -notlike Microsoft* | select name, author
Get-PSRepository
Set-PSRepository -Name psgallery -InstallationPolicy Trusted
Get-PSRepository
Find-Module -name * | select name, description
Find-Module -name * | where author -like *finke* | select name, author, description | ogv
$PSEmailServer = 'mailrelay.company.ie'
$gallery = Find-Module -name * | select name, description | Out-String
Send-MailMessage -to mahermick@mymail.com -from michael.maher@mymail.ie -subject 'Gallery' -body $gallery
Install-Module -Name PowerShellISE-preview
gcm -module PowerShellISE-preview
Install-ISEPreviewShortcuts
Start-ISEPreview
# GitHub
Install-PackageProvider GitHub
Import-PackageProvider GitHub
Find-Package -ProviderName GitHub -source dfinke importexcel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment