Pages

Showing posts with label registry. Show all posts
Showing posts with label registry. Show all posts

7/30/2013

Powershell - Change Service Startup Type

Powershell: Change Windows Service Startup Type of Remote Server

Works with Powershell 1.0 & 2.0

 #Check Startup Type
 ($svc = Get-WmiObject Win32_Service -ComputerName $server -Filter "name='wuauserv'") | out-null
 if ($svc.StartMode -eq "Disabled") {
     "$server WSUS service changed to Automatic"
     $result=$svc.changestartmode("Automatic")
 }#end if

 #Backup Service Registry
 $result=([WmiClass]"\\$server\ROOT\CIMV2:Win32_Process").create("c:\windows\regedit /e c:\WSUS.REG HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\wuauserv")
 write $server "Backup Service Registry RESULT=" $result.returnvalue
 
 #Set Service as Delayed Start
 write $server "configure service"
 $key = "SYSTEM\CurrentControlSet\Services\wuauserv"
 $reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine', $server)
 $regKey = $reg.OpenSubKey($key, $true)
 $result = $regKey.setvalue("DelayedAutoStart", "1", "DWORD")

9/04/2011

Powershell: does reg key exist?

if (get-itemproperty HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate PingId -ErrorAction SilentlyContinue) { "True" } else { "False" }

2/08/2007

Windows::Recovery



Some great offline recovery freeware:

NTFS4DOS - Access an NTFS volume from DOS prompt - read/write

Offline Recovery NT/2K/XP/2K3 Offline Password recovery and rudimentary registry editor

2/24/2006

Windows::XP::Registry


Default user desktop appearance
This is located in the registry under:
HKEY USERS\ . DEFAULT\Control Panel\
Desktop - has the desktop background settings
Colors - contains color settings
Etc.