Useful Windows oneliners

- Posted in Uncategorized by
When creating a Windows 8 Image, you can remove the Windows Modern Apps with powershell import-module DISM Get-AppXProvisionedPackage -online | RemoveAppxProvisionedPackage -online

Useful Mac defaults and oneliners

- Posted in Uncategorized by
Set Extended Print/Save dialog defaults write /Library/Preferences/.GlobalPreferences NSNavPanelExpandedStateForSaveMode 1 defaults write /Library/Preferences/.GlobalPreferences

Bare Metal Boot to VHD

- Posted in Uncategorized by
Boot from a Windows 7/8 Boot Disc or Windows PE Partition the internal disk :::bat lis dis sel dis 0 cle cre par pri act for fs=ntfs quick label="VHD Host Disk" ass letter=C exi Make a VHDs folder on

Diskpart Examples for Windows 7/8

- Posted in Uncategorized by
For UEFI computers: :::bat select disk 0 clean convert gpt create partition primary size=300 format quick fs=ntfs label="Windows RE Tools" assign letter="T" set

SCP

- Posted in Uncategorized by
Using SCP: scp user@host:path/from/home/to/item {destination}

DISM

- Posted in Uncategorized by
Mounting a WIM: Dism /Mount-Wim /WimFile:{Path To WIM} /index:{INDEX} /MountDir:{PATH TO MOUNT DIR} Adding a package to a WIM: Dism /image:{PATH TO MOUNT DIR} /Add-Package /PackagePath:{PATH TO

Get OS X Version via Command Line

- Posted in Uncategorized by
Get OS X Version returns 10.7.2: :::bash sw_vers -productVersion returns 7: :::bash sw_vers -productVersion | awk -F. `{ print $2 }`

Fun with Native boot VHDs

- Posted in Uncategorized by
Create VHD with Diskpart For production environments the Microsoft recommends using fixed VHD type create vdisk file=C:\VHDs\{name}.vhd maximum={MAXMB} type=expandable select vdisk

Mounting Mac OS X Disk Images with Shadow Files

- Posted in Uncategorized by
Mount with Shadow: hdiutil attach -owners on original.dmg -shadow Unmount: hdiutil detach /dev/disk# Commit changes: hdiutil convert -format UDZO -o new.dmg origianl.dmg -shadow

Calling Applescript from Perl

- Posted in Uncategorized by
:::perl sub osascript($) { system 'osascript', map { ('-e', $_) } split(/\n/, $_[0]); } and to use it: :::applescript osascript <<END; tell application "Finder" display dialog "Hello" end
Page 1 of 2