Hi everyone, IT other here.On this post, I will use among my VMs, SC2016, running home windows Server 2016 core edition, to perform configuration jobs for disk and volumes utilizing PowerShell. For those of girlfriend who are not aware of mine previous posts and also my exercise lab configuration, ns am functioning on a home windows 10 laptop through the Hyper-V function installed. Until now, ns have developed 3 virtual devices (1 x Domain Controller – DC1, 1 x windows Server 2016 core – SC2016, and also 1 x windows 10 – PC10). The SC2016 virtual an equipment has 3 x VHDX added to that (1 x 30GB and 2 x 10GB) and also I will certainly be performing the configuration tasks using these disk.
You are watching: Select the powershell cmdlet below that can be used to create a new volume.
IMPORTANT: together configured on one of my ahead posts, ns will use my home windows 10 VM (PC10) to do all the tasks on the SC2016 VM, using Remote PowerShell via PowerShell ISE console.Step 1 – exactly how to check the easily accessible disks on a serverFirst, ns will affix to the SC2016 VM utilizing the following PS cmdlet: Enter-PSSession -ComputerName SC2016Now, to check the accessible disk on the SC2016 server, you need to run the following cmdlet: Get-Disk
Disk Number 1 and Number 2 are presented as having the Partition style RAW
. And the Operational standing is Offline as they have not been initialized. In the next steps, ns will present you how to initialize and also format the disk.Step 2 – how to initialize disks
To initialize decaying 1 or decaying 2, I will certainly run the complying with PS cmdlet: Initialize-Disk -Number 1
If girlfriend look at the over screenshot, the work Status has actually now changed to Online
. Also, if friend look at the Partition Style, girlfriend will notice that both Disk1 and also Disk2 have changed to GPT
. By default, whenever us initialize a disk the partition format is GPT
: If you need to initialize the disk utilizing MBR (Master boot Record), you have the right to use the PartitionStyle parameter and specify MBR: Initialize-Disk -Number 1 -PartitionStyle MBREXTRA: just how to layout a disk
If you want to layout an present disk, for this reason you have the right to create brand-new partitions and volumes, you deserve to use the adhering to cmdlet for this activity (if the decaying contains energetic data volumes, girlfriend MUST
use the RemoveData
parameter, as this is just how you will certainly delete every the data indigenous the disk):Clear-Disk -Number 2 -RemoveDataFYI
: If girlfriend have any kind of OEM partitions top top the disc (OEM partitions space manufacturer recovery partitions), and you want to delete it, you can include the RemoveOEM
parameter as well.Step 3 – just how to produce a new partition, select the size and assign a journey letter, all in one PowerShell cmdlet
To develop a new partition (one logical region on a disk), pick the desired size and assign the desired drive letter, you can use the complying with PowerShell cmdlet:New-Partition -DiskNumber 1 -Size 5GB -AssignDriveLetter
As you have the right to see above, a new partition with a dimension of 5GB has been created and also assigned the next obtainable Drive Letter, E
. Together I still have 5GB left on my 10GB disk, I could create one or more partitions and also assign different drive letters, until I reach the maximum capacity of the disk.FYI
: You can pick the drive letter fairly than the next obtainable one by using the DriveLetter parameter instead of AssignDriveLetter, Also, you deserve to use the UseMaximumSize parameter rather of using the dimension parameter to create a new partition through the maximum easily accessible disk size. In our case, UseMaximumSize would have produced a new partition the 10GB.Step 4 – just how to style a volume to the desired paper system (ReFS, NTFS, etc.)
To be able to use the newly developed partition (access the from document Explorer, begin saving records on it, etc), it demands to be formated come the desired file system (I will use NTFS) and also thus develop a volume. To perform this, you should use the following PS cmdlet:Format-Volume -DriveLetter E -FileSystem NTFS
If you desire to list all accessible volumes, you have the right to use the Get-Volume
PowerShell cmdlet:Extra – just how to delete a partition
If you want to delete a partition native a disk, you have the right to use the adhering to PS cmdlet to do this action (I will delete the E drive situated on Partition Number 2 from Disk Number 1. First, you need to uncover the partition number native the wanted disk, making use of the below cmdlet: Get-Disk -Number 1 | Get-Partition
Now you deserve to delete the wanted partition utilizing the listed below cmdlet:Remove-Partition -DiskNumber 1 -PartitionNumber 2FYI
: you can likewise use the DriveLetter
parameter, and also the cmdlet will remove the partition linked with that drive letter. Ns will use the WhatIf
parameter to show you what would happen if I run this command without actually applying the actions: Remove-Partition -DriveLetter E -WhatIf
Thank you for following all along. In my following post, i will present you How to control Widows volumes on your an equipment using the DiskPart tool.
See more: Chase Bank 575 Washington Blvd Jersey City Nj 07310, J P Morgan Chase Backup Ccc
Take care, please share if you uncovered this short article helpful, and also please leaving a comment if you have any questions.