Update Script PREVIEW.ps1
This commit is contained in:
parent
49ca19624a
commit
2223230719
1 changed files with 6 additions and 0 deletions
|
@ -6,10 +6,16 @@ if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]:
|
||||||
|
|
||||||
if (Get-Module -ListAvailable -Name PSWindowsUpdate) {
|
if (Get-Module -ListAvailable -Name PSWindowsUpdate) {
|
||||||
Write-Host "PSWindowsUpdate exists"
|
Write-Host "PSWindowsUpdate exists"
|
||||||
|
if (Get-Module -ListAvailable -Name PSWindowsUpdate) {
|
||||||
|
Import-Module PSWindowsUpdate
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
Write-Host "PSWindowsUpdate does not exist, Installing ..."
|
Write-Host "PSWindowsUpdate does not exist, Installing ..."
|
||||||
Install-Module PSWindowsUpdate -force
|
Install-Module PSWindowsUpdate -force
|
||||||
|
if (Get-Module -ListAvailable -Name PSWindowsUpdate) {
|
||||||
|
Import-Module PSWindowsUpdate
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function installwingetjson
|
function installwingetjson
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue