Created
January 19, 2021 04:31
-
-
Save bcdejp/82981f50fc0cfebf79034492c3e4ad04 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SDカードに規定のパーティションを作製する | |
$partitionStyle = "MBR"; | |
$partitionSize1 = 1073741824; | |
$driveLetter1 = "J" | |
$driveLetter2 = "K"; | |
$driveLetter3 = "L"; | |
$driveLetter4 = "M"; | |
$driveLetter5 = "N"; | |
Get-Disk; | |
$diskNumber=Read-Host "フォーマットするディスク番号を入力してください" | |
Get-Disk | where Number -match $diskNumber | Clear-Disk -RemoveData -RemoveOEM -PassThru; | |
Get-Disk | where Number -match $diskNumber | New-Partition -MbrType FAT32 -Size $partitionSize1 -DriveLetter $driveLetter1 | Format-Volume -FileSystem FAT32 -NewFileSystemLabel A; | |
Get-Disk | where Number -match $diskNumber | New-Partition -MbrType FAT32 -Size $partitionSize1 -DriveLetter $driveLetter2 | Format-Volume -FileSystem FAT32 -NewFileSystemLabel B; | |
Get-Disk | where Number -match $diskNumber | New-Partition -MbrType Extended -UseMaximumSize; | |
Get-Disk | where Number -match $diskNumber | New-Partition -MbrType FAT32 -Size $partitionSize1 -DriveLetter $driveLetter3 | Format-Volume -FileSystem FAT32 -NewFileSystemLabel C-1; | |
Get-Disk | where Number -match $diskNumber | New-Partition -MbrType FAT32 -Size $partitionSize1 -DriveLetter $driveLetter4 | Format-Volume -FileSystem FAT32 -NewFileSystemLabel C-2; | |
Get-Disk | where Number -match $diskNumber | New-Partition -MbrType FAT32 -UseMaximumSize -DriveLetter $driveLetter5 | Format-Volume -FileSystem FAT32 -NewFileSystemLabel C-3; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment