Skip to content

Instantly share code, notes, and snippets.

@henno
Created January 17, 2024 10:37
Show Gist options
  • Save henno/d34c05c5e663dcedfa0234199a459338 to your computer and use it in GitHub Desktop.
Save henno/d34c05c5e663dcedfa0234199a459338 to your computer and use it in GitHub Desktop.
Windows computer setup commands
powershell
—---------
Invoke-WebRequest -Uri 'https://ninite.com/7zip-chrome-teamviewer15-vscode-zoom/ninite.exe' -OutFile 'C:\Users\admin\Downloads\ninite.exe'
C:\Users\admin\Downloads\ninite.exe
#$ServiceManager = New-Object -ComObject "Microsoft.Update.ServiceManager"
#$ServiceManager.ClientApplicationID = "My App"
#$NewService = $ServiceManager.AddService2("7971f918-a847-4430-9279-4a52d1efe18d",7,"")
#add-computer -domainname hummuli.sise -Credential HUMMULI\henno.taht
cmd
—--
tzutil /s "FLE Standard Time"
set u=%COMPUTERNAME%u
net user /add %u%
WMIC USERACCOUNT WHERE Name='%u%' SET PasswordExpires=FALSE
net localgroup administrators /add admin
rem net user /add admin
rem net user admin mateanmisteen
rem WMIC USERACCOUNT WHERE Name='admin' SET PasswordExpires=FALSE
net user administrator Atktrt12
net user administrator /active:yes
WMIC USERACCOUNT WHERE Name='administrator' SET PasswordExpires=FALSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment