Goto Microsoft TechNet to learn more about Windows 7 and Windows 8.1 servicing changes
– Simplifying the world once again …
For every 1603 in the World
Goto Microsoft TechNet to learn more about Windows 7 and Windows 8.1 servicing changes
– Simplifying the world once again …
Add and remove local printer and driver through the command line. Can be used in scripts or packages. Before adding the printer, setup port and restart the Print Spooler service.
rundll32 printui.dll PrintUIEntry /if /b "ETIAM Print-in" /f "%ProgramFiles%\Etiam\Print-In\Driver\Print-in.inf" /r "PrintIn Port" /m "ETIAM Print-in" /q
rundll32 printui.dll PrintUIEntry /Xs /n "ETIAM Print-in" comment "ETIAM virtual printer" location "http://www.etiam.com" /q
rundll32 printui.dll PrintUIEntry /dl /n "ETIAM Print-in" /q
rundll32 printui.dll PrintUIEntry /dd /m "ETIAM Print-in" /q
Two ways to access the Credential Manager, command line and GUI.
cmdkey.exe
rundll32.exe keymgr.dll, KRShowKeyMgr
Easy way to get the Computer Model when assigning and installing specific drivers to the Windows Image with ConfigMgr or MDT.
WMIC CSProduct get Name
A quick guide to make an USB Flash Drive bootable. This is usefull if you use Microsoft Windows installation images.
Open Command Prompt as an Administrator and go to town with these command steps:
diskpart
list disk (note the drive number of the USB flash drive)
select disk "drive number"
clean
create part pri - NOTE: if flash drive is larger than 32Gb use size=32000 or 16000 to limit size of partition for FAT32 file system
select part 1
format fs=fat32 quick
active
exit
Now the USB flash drive is ready for a Windows installation image
Source: Microsoft
Usefull when working on Virtual Guests with a lot of snapshots and when computer is joined to a domain.
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters]
"DisablePasswordChange"=dword:00000001
Source: Microsoft
Start Remote Assistance in Windows from the Command Line. You can also request help or offer your skills as an expert.
"%windir%\system32\msra.exe" /offerra
"%windir%\system32\msra.exe" /novice
"%windir%\system32\msra.exe" /expert
Usage
Create a shortcut and enter first command line, shown above, as the target. Remember to elevate/run as if you are using differenced user accounts
Here are a few examples of the most common Icacls commands, that I use in Command Shell, to give further access.
icacls.exe "[folder]" /grant *S-1-5-32-545:(OI)(CI)F
icacls.exe "[folder]" /grant *S-1-5-32-545:(OI)(CI)M
icacls.exe "[path][file]" /grant *S-1-5-32-545:F
icacls.exe "[path][file]" /grant *S-1-5-32-545:M
For a complete list of ‘Well-known security identifiers’ (SIDs) please visit Microsoft.
Note: Icacls are build into Windows Vista, Windows 7 & Windows 8 and equivalent Windows Servers
Change the “Computer” or “This PC” to %COMPUTERNAME% in a Task Sequence.
Use SetACL, by Helge Klein, to change owner, set appropriate permissions on the registry key and after changing the registry key, releasing the key back to the system.
Place the appropriate SetACL.exe and the script below, together with the registry key and execute from TS.
"%~dp0setacl.exe" -on HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} -ot reg -actn setowner -ownr "n:S-1-5-32-544"
"%~dp0setacl.exe" -on HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} -ot reg -actn ace -ace "n:S-1-5-32-544;p:full;s:y"
..
..
"%~dp0setacl.exe" -on HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} -ot reg -actn ace -ace "n:S-1-5-32-544;p:read;s:y" "%~dp0setacl.exe" -on HKEY_LOCAL_MACHINE\SOFTWARE\CLASSES\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} -ot reg -actn setowner -ownr "n:S-1-5-18"
This script has only been tested on Windows 7, x64, through a TS
Goto Andrew Barnes Blog about ‘scripting and deployment’
– Though, not 100% up to date information, still very usefull
Goto Microsoft website about Registry Redirector
– Essential for understanding the Windows x86/x64 conundrum
Goto Johan Arwidmark blog about Deployment
– Get all your SCCM tips and tricks from the master himself
Goto CSI Windows for an article about ‘MsiLockPermissions’
– Use the Lock Permissions table, build-in MSI files to apply file and folder access