Compare commits
4 Commits
StagedDepl
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
da6821a95f | ||
|
a3da939025
|
|||
|
|
0169acc9b3 | ||
|
|
e2b1c6b665 |
@@ -16,16 +16,13 @@ if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdent
|
||||
}
|
||||
}
|
||||
|
||||
#Disable Windows updates service
|
||||
Set-Service -Name "wuauserv" -Status Stopped -StartupType Disabled
|
||||
|
||||
Write-Output "Checking activation status..."
|
||||
$ta = Get-CimInstance -ClassName SoftwareLicensingProduct -Filter "PartialProductKey IS NOT NULL" | Where-Object -Property Name -Like "Windows*"
|
||||
if ($ta.LicenseStatus -eq 1) {Write-Output "Activation [OK]"} else {Write-Output "Activation [Error, Opening settings]";Start-Process "ms-settings:activation"; pause }
|
||||
|
||||
Write-Output "Getting System name"
|
||||
$sysid = Read-Host -Prompt 'Please enter system ID (example: DT001)'
|
||||
Rename-Computer -NewName $sysid
|
||||
$sysid = Read-Host -Prompt 'Please enter asset ID:'
|
||||
Rename-Computer -NewName "PC$sysid"
|
||||
Write-Output "System name [OK]"
|
||||
|
||||
#Chocolaty software updates
|
||||
@@ -38,9 +35,6 @@ if ( $confirmSupdates -eq 'y'){
|
||||
|
||||
$confirmWupdates = Read-Host "Run Windows updates? (y/n)"
|
||||
if ( $confirmWupdates -eq 'y'){
|
||||
#Enable Windows updates service
|
||||
Set-Service -Name "wuauserv" -Status Stopped -StartupType Manual
|
||||
|
||||
Write-Output "Checking Windows updates"
|
||||
Import-Module PSWindowsUpdate
|
||||
Get-WUInstall -MicrosoftUpdate -AcceptAll -IgnoreReboot -IgnoreRebootRequired -Install
|
||||
|
||||
@@ -1 +1 @@
|
||||
7zip;caesium.install;firefox;gimp;handbrake;inkscape;libreoffice-fresh;notepadplusplus;paint.net;pdfsam.install;pnggauntlet.install;vlc;vscode.install;xnconvert.install;googlechrome;pswindowsupdate;git;filezilla;mobaxterm
|
||||
7zip;caesium.install;firefox;gimp;inkscape;libreoffice-fresh;notepadplusplus;paint.net;pnggauntlet.install;vlc;vscode.install;xnconvert;googlechrome;pswindowsupdate;git;filezilla;mobaxterm;krita
|
||||
Reference in New Issue
Block a user