-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPowershell.InstallModule.Readme.txt
More file actions
33 lines (22 loc) · 1.25 KB
/
Powershell.InstallModule.Readme.txt
File metadata and controls
33 lines (22 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# https://devblogs.microsoft.com/powershell/psreadline-2-2-ga/
get-
# List the modules IMPORTED in the current session or that can be imported from the PSModulePath.
get-module psreadline -all -ListAvailable
#The Uninstall-Module cmdlet uninstalls a specified module from the local computer. You can't uninstall a module if it has other modules as dependencies.
# Gets a list of modules on the computer that were installed by PowerShellGet.
Get-InstalledModule -Name SpeculationControl | Uninstall-Module
Set-PSResourceRepository -name PSGallery -Trusted
# install a version
find-module psreadline -AllowPrerelease -MinimumVersion 2.2.2 -MaximumVersion 2.2.2|install-module -force -AllowClobber
find-module psreadline -RequiredVersion 2.2.2|install-module -force -AllowClobber -scope CurrentUser
# this is an alternative method.
Install-PSResource -name psreadline -Reinstall
Find-PSResource psreadline
# Finds modules in a repository that match specified criteria.
find-module powershellget -AllowPrerelease
pwsh -noprofile -command " & {find-module powershellget -AllowPrerelease|install-module -force -AllowClobber}"
# -------------
Install-PSResource -name powershellget -Reinstall
get-module powershellget
ands
#Script 3.0.0 beta10 PowerShellGet