Thursday, June 6, 2013

Command sheet from my teched session

Several people have been asking for my cheat sheet with the commands used during my demonstrations at TechEd. Yes I do cheat, don't want to use time troubleshoot fatfinger problems.

So here are the list, remember that the presentation also includes code pages with more stuff, like lots of wmi entries

 

DEMO: Refresh Image / WinRE



Show Recimg
Replace refresh image

Refresh Commands:


Recimg /createimage c:\Refresh2

Recimg /showcurrent

Recimg /setcurrent c:\Refresh

WinRE Commands:


Rename c:\winre\boot.wim c:\winre\winre.wim

ReAgentc /info

Reagentc /disable

Reagentc /setreimage c:\WinRE

Reagentc /enable

Reagentc /boottore

 

DEMO: Patch the image Offline/Online


Demo Commands:


Info:

dism /Get-WimInfo /WimFile:d:\wim\install.wim

Extended info:

dism /Get-WimInfo /WimFile:d:\wim\install.wim /index:1

Mounting the image:

dism /Mount-Wim /wimfile:d:\wim\install.wim /index:1 /MountDir:d:\mount

Add Patches to the image:

dism /image:d:\mount /add-package /Packagepath:d:\updates

Dismounting the image:

dism /Unmount-Wim /MountDir:d:\mount /commit

dism /Unmount-Wim /MountDir:d:\mount /discard

 

DEMO: WMI Filtering


Demo Commands:


Select * from WIN32_ComputerSystem where Manufacturer = 'LENOVO'

Gpresult /Scope:computer

 

DEMO: Group Policy



Demo Commands:


Tuning old computers

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects
0 = Let Windows choose what's best for my computer
1 = Adjust for best appearance
2 = Adjust for best performance
3 = Custom
"VisualFXSetting"=dword:00000002

Block Access To Store

User/Computer - Policies - Administrative Templates - Windows Components - Store

Create new local admin, rename old and set password

Computer - Preferences - Control Panel settings - Local Users and Groups

BGInfo

bginfo.exe client.bgi /SILENT /TIMER:00  /nolicprompt

GodMode

Create new folder on desktop, name it GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}

When was Windows started?

How long have the Server of PC been running? Sometimes you need to figure when the OS was started. As always there are different was of get...