virtual storage pool creation

Hello everyone,

complete powershell noobie here. Im currently doing my MCSA Win Server 2016 certification and doing various labs. One of the labs focuses on the creation of virtual storage pools. The lab goes like this, the get-physicaldisk cmdlet lists the available physical disks, i believe there are 6 of them, and then groups them under 1 variable based on their “poolability” and then using said variable to create the storage pool. One thing to note is that all the physical drives have the same default name.

My question is, how would i go about using powershell to create a storage pool but not use all the available physical drives but rather just a select few, lets say 3 of them. I reckon you could name the disks you want to be pooled by their -friendlyname but since all the disks in question have the same identical default name it doesnt work.

I’ve been told i can use the “select -first 3” cmdlet for example but im having trouble with the exact syntax of the entire command. Im not sure if im supposed to start with “get-phyiscaldisk” first then filter them to select the first 3 and then use the “new-storagepool” cmdlet or if its the other way around.

Any input is greatly appreciated, thanks

 

What happens when you run Get-PhysicalDisk | Select-Object -First 3???
You might sart with learning the very basics of Powershell first. Otherwise you will not be able to understand the help you can get in a forum like this.

Fair enough, do you have any tutorials you would recommend? seeing as there are so many different resources its difficult to know where to start.

thanks

Actually that does not matter in my opinion. Any will be good to teach you the basics.

These two are well known to be good:

Getting Started with PowerShell 3.0 (Don’t worry if this is about version 3.0 - the basics did not change that much since then)

Windows PowerShell™ 4: TFM