Skip to content

Instantly share code, notes, and snippets.

@Pyromaniaxxx
Last active January 8, 2017 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pyromaniaxxx/f9a8d78d70da4f39134ef21f0dfdd2ab to your computer and use it in GitHub Desktop.
Save Pyromaniaxxx/f9a8d78d70da4f39134ef21f0dfdd2ab to your computer and use it in GitHub Desktop.
Windows 10 インストール用USBメディア作るスクリプト
$DriveLetter = "Z"
$USBDeviceFriendlyName = "Generic USB Flash Disk"
$ISOPath = "D:\ISOs\ja_windows_10_multiple_editions_xxx.iso"
Get-Disk | where FriendlyName -EQ $USBDeviceFriendlyName | Clear-Disk -RemoveData -PassThru | New-Partition -UseMaximumSize -IsActive -DriveLetter $DriveLetter | Format-Volume -FileSystem FAT32 -NewFileSystemLabel USB -Force;
Mount-DiskImage $ISOPath;
$DVDDriveLetter = (Get-DiskImage $ISOPath | Get-Volume).DriveLetter;
Copy-Item "$($DVDDriveLetter):\*" "$($DriveLetter):\" -Recurse -Force -Verbose;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment