Solved Powershell Partition Information

feetand nches

New member
Power User
VIP
Local time
11:57 AM
Messages
555
Hey guys, I was looking for an alternative to "diskpart" in Powershell, but all that I tried did not even work, can't imagine what I'm doing wrong. Just trying to learn, not super important if folks are busy. Here is one of the things I tried from Technet, along with many others:
Get-Partition

1. Get-Partition
And tried it many different ways, get-partition, get-partition-0 etc, etc. many different ways.

2. I also used diskpart as regular user, but it would not allow me to "Select All" CTRL + C to Copy the Partition info. I had to Open CMD as Administrator in order to do this, is that Normal? Just want to make sure my system is working properly.

I was hoping for something simple, I saw some rather complicated Commands that I avoided for now but open to anything I guess. Seems like diskpart works very well, the output is very nice, but I find the CMD a little quirky compared to say Linux Terminal.

Thanks, Nasty7
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP Pavilion dv7-6c23cl
OS
Windows 7 Home Premium 64bit
CPU
AMD A8-3520M
Motherboard
Hewlett-Packard 180B (Socket FS1)
Memory
6.00GB DDR3 @ 674MHz (9-9-9-24)
Graphics Card(s)
512MB ATI AMD Radeon HD 6620G
Sound Card
IDT High Definition Audio CODEC
Monitor(s) Displays
Generic PnP Monitor
Screen Resolution
(1600x900@60Hz)
Hard Drives
Samsung 850 EVO 250GB SSD
Mouse
Logitec M525
Internet Speed
30-75Mbps
Antivirus
Avast Free, Unfortunately
Browser
Google Chrome, Firefox, IE
Have you been read this article? It's can help you.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell
OS
Win7
Antivirus
ESET
Browser
Chrome
Haha, that is way over my head. I need something more simple, and don't know why the commands I linked to don't work. Thanks though, that looks interesting.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP Pavilion dv7-6c23cl
OS
Windows 7 Home Premium 64bit
CPU
AMD A8-3520M
Motherboard
Hewlett-Packard 180B (Socket FS1)
Memory
6.00GB DDR3 @ 674MHz (9-9-9-24)
Graphics Card(s)
512MB ATI AMD Radeon HD 6620G
Sound Card
IDT High Definition Audio CODEC
Monitor(s) Displays
Generic PnP Monitor
Screen Resolution
(1600x900@60Hz)
Hard Drives
Samsung 850 EVO 250GB SSD
Mouse
Logitec M525
Internet Speed
30-75Mbps
Antivirus
Avast Free, Unfortunately
Browser
Google Chrome, Firefox, IE
Haha, that is way over my head. I need something more simple, and don't know why the commands I linked to don't work. Thanks though, that looks interesting.
Sorry, I've tried :(
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Dell
OS
Win7
Antivirus
ESET
Browser
Chrome
I think I'm just not understanding this article, and the process it is describing. Probably because there are no good expamples.
Get-Partition
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP Pavilion dv7-6c23cl
OS
Windows 7 Home Premium 64bit
CPU
AMD A8-3520M
Motherboard
Hewlett-Packard 180B (Socket FS1)
Memory
6.00GB DDR3 @ 674MHz (9-9-9-24)
Graphics Card(s)
512MB ATI AMD Radeon HD 6620G
Sound Card
IDT High Definition Audio CODEC
Monitor(s) Displays
Generic PnP Monitor
Screen Resolution
(1600x900@60Hz)
Hard Drives
Samsung 850 EVO 250GB SSD
Mouse
Logitec M525
Internet Speed
30-75Mbps
Antivirus
Avast Free, Unfortunately
Browser
Google Chrome, Firefox, IE
Looks like Powershell is not going to do the same as dispart as well or as easily.
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP Pavilion dv7-6c23cl
OS
Windows 7 Home Premium 64bit
CPU
AMD A8-3520M
Motherboard
Hewlett-Packard 180B (Socket FS1)
Memory
6.00GB DDR3 @ 674MHz (9-9-9-24)
Graphics Card(s)
512MB ATI AMD Radeon HD 6620G
Sound Card
IDT High Definition Audio CODEC
Monitor(s) Displays
Generic PnP Monitor
Screen Resolution
(1600x900@60Hz)
Hard Drives
Samsung 850 EVO 250GB SSD
Mouse
Logitec M525
Internet Speed
30-75Mbps
Antivirus
Avast Free, Unfortunately
Browser
Google Chrome, Firefox, IE
Hi,

Get-Partition is part of a big module of neat cmdlets that deal with partitions, disks, etc., which can very well replace Diskpart if preferred.

This is the extent of the Storage module as of PowerShell v5 (Windows 10). As you can probably infer, it has quite a bit more capability on offer over Diskpart, about 140 cmdlets to play around with.

Get-Command -Module Storage
 
Code:
PS C:\Users\Pyprohly> Get-Command -Module Storage

CommandType     Name                                               Version    Source
-----------     ----                                               -------    ------
Alias           Disable-PhysicalDiskIndication                     2.0.0.0    Storage
Alias           Disable-StorageDiagnosticLog                       2.0.0.0    Storage
Alias           Enable-PhysicalDiskIndication                      2.0.0.0    Storage
Alias           Enable-StorageDiagnosticLog                        2.0.0.0    Storage
Alias           Flush-Volume                                       2.0.0.0    Storage
Alias           Get-DiskSNV                                        2.0.0.0    Storage
Alias           Get-PhysicalDiskSNV                                2.0.0.0    Storage
Alias           Get-StorageEnclosureSNV                            2.0.0.0    Storage
Alias           Initialize-Volume                                  2.0.0.0    Storage
Alias           Write-FileSystemCache                              2.0.0.0    Storage
Function        Add-InitiatorIdToMaskingSet                        2.0.0.0    Storage
Function        Add-PartitionAccessPath                            2.0.0.0    Storage
Function        Add-PhysicalDisk                                   2.0.0.0    Storage
Function        Add-TargetPortToMaskingSet                         2.0.0.0    Storage
Function        Add-VirtualDiskToMaskingSet                        2.0.0.0    Storage
Function        Block-FileShareAccess                              2.0.0.0    Storage
Function        Clear-Disk                                         2.0.0.0    Storage
Function        Clear-FileStorageTier                              2.0.0.0    Storage
Function        Clear-StorageDiagnosticInfo                        2.0.0.0    Storage
Function        Connect-VirtualDisk                                2.0.0.0    Storage
Function        Debug-FileShare                                    2.0.0.0    Storage
Function        Debug-StorageSubSystem                             2.0.0.0    Storage
Function        Debug-Volume                                       2.0.0.0    Storage
Function        Disable-PhysicalDiskIdentification                 2.0.0.0    Storage
Function        Disable-StorageEnclosureIdentification             2.0.0.0    Storage
Function        Disable-StorageHighAvailability                    2.0.0.0    Storage
Function        Disconnect-VirtualDisk                             2.0.0.0    Storage
Function        Dismount-DiskImage                                 2.0.0.0    Storage
Function        Enable-PhysicalDiskIdentification                  2.0.0.0    Storage
Function        Enable-StorageEnclosureIdentification              2.0.0.0    Storage
Function        Enable-StorageHighAvailability                     2.0.0.0    Storage
Function        Format-Volume                                      2.0.0.0    Storage
Function        Get-DedupProperties                                2.0.0.0    Storage
Function        Get-Disk                                           2.0.0.0    Storage
Function        Get-DiskImage                                      2.0.0.0    Storage
Function        Get-DiskStorageNodeView                            2.0.0.0    Storage
Function        Get-FileIntegrity                                  2.0.0.0    Storage
Function        Get-FileShare                                      2.0.0.0    Storage
Function        Get-FileShareAccessControlEntry                    2.0.0.0    Storage
Function        Get-FileStorageTier                                2.0.0.0    Storage
Function        Get-InitiatorId                                    2.0.0.0    Storage
Function        Get-InitiatorPort                                  2.0.0.0    Storage
Function        Get-MaskingSet                                     2.0.0.0    Storage
Function        Get-OffloadDataTransferSetting                     2.0.0.0    Storage
Function        Get-Partition                                      2.0.0.0    Storage
Function        Get-PartitionSupportedSize                         2.0.0.0    Storage
Function        Get-PhysicalDisk                                   2.0.0.0    Storage
Function        Get-PhysicalDiskStorageNodeView                    2.0.0.0    Storage
Function        Get-ResiliencySetting                              2.0.0.0    Storage
Function        Get-StorageAdvancedProperty                        2.0.0.0    Storage
Function        Get-StorageDiagnosticInfo                          2.0.0.0    Storage
Function        Get-StorageEnclosure                               2.0.0.0    Storage
Function        Get-StorageEnclosureStorageNodeView                2.0.0.0    Storage
Function        Get-StorageEnclosureVendorData                     2.0.0.0    Storage
Function        Get-StorageFaultDomain                             2.0.0.0    Storage
Function        Get-StorageFileServer                              2.0.0.0    Storage
Function        Get-StorageFirmwareInformation                     2.0.0.0    Storage
Function        Get-StorageHealthAction                            2.0.0.0    Storage
Function        Get-StorageHealthReport                            2.0.0.0    Storage
Function        Get-StorageHealthSetting                           2.0.0.0    Storage
Function        Get-StorageJob                                     2.0.0.0    Storage
Function        Get-StorageNode                                    2.0.0.0    Storage
Function        Get-StoragePool                                    2.0.0.0    Storage
Function        Get-StorageProvider                                2.0.0.0    Storage
Function        Get-StorageReliabilityCounter                      2.0.0.0    Storage
Function        Get-StorageSetting                                 2.0.0.0    Storage
Function        Get-StorageSubSystem                               2.0.0.0    Storage
Function        Get-StorageTier                                    2.0.0.0    Storage
Function        Get-StorageTierSupportedSize                       2.0.0.0    Storage
Function        Get-SupportedClusterSizes                          2.0.0.0    Storage
Function        Get-SupportedFileSystems                           2.0.0.0    Storage
Function        Get-TargetPort                                     2.0.0.0    Storage
Function        Get-TargetPortal                                   2.0.0.0    Storage
Function        Get-VirtualDisk                                    2.0.0.0    Storage
Function        Get-VirtualDiskSupportedSize                       2.0.0.0    Storage
Function        Get-Volume                                         2.0.0.0    Storage
Function        Get-VolumeCorruptionCount                          2.0.0.0    Storage
Function        Get-VolumeScrubPolicy                              2.0.0.0    Storage
Function        Grant-FileShareAccess                              2.0.0.0    Storage
Function        Hide-VirtualDisk                                   2.0.0.0    Storage
Function        Initialize-Disk                                    2.0.0.0    Storage
Function        Mount-DiskImage                                    2.0.0.0    Storage
Function        New-FileShare                                      2.0.0.0    Storage
Function        New-MaskingSet                                     2.0.0.0    Storage
Function        New-Partition                                      2.0.0.0    Storage
Function        New-StorageFileServer                              2.0.0.0    Storage
Function        New-StoragePool                                    2.0.0.0    Storage
Function        New-StorageSubsystemVirtualDisk                    2.0.0.0    Storage
Function        New-StorageTier                                    2.0.0.0    Storage
Function        New-VirtualDisk                                    2.0.0.0    Storage
Function        New-VirtualDiskClone                               2.0.0.0    Storage
Function        New-VirtualDiskSnapshot                            2.0.0.0    Storage
Function        New-Volume                                         2.0.0.0    Storage
Function        Optimize-StoragePool                               2.0.0.0    Storage
Function        Optimize-Volume                                    2.0.0.0    Storage
Function        Register-StorageSubsystem                          2.0.0.0    Storage
Function        Remove-FileShare                                   2.0.0.0    Storage
Function        Remove-InitiatorId                                 2.0.0.0    Storage
Function        Remove-InitiatorIdFromMaskingSet                   2.0.0.0    Storage
Function        Remove-MaskingSet                                  2.0.0.0    Storage
Function        Remove-Partition                                   2.0.0.0    Storage
Function        Remove-PartitionAccessPath                         2.0.0.0    Storage
Function        Remove-PhysicalDisk                                2.0.0.0    Storage
Function        Remove-StorageFileServer                           2.0.0.0    Storage
Function        Remove-StorageHealthSetting                        2.0.0.0    Storage
Function        Remove-StoragePool                                 2.0.0.0    Storage
Function        Remove-StorageTier                                 2.0.0.0    Storage
Function        Remove-TargetPortFromMaskingSet                    2.0.0.0    Storage
Function        Remove-VirtualDisk                                 2.0.0.0    Storage
Function        Remove-VirtualDiskFromMaskingSet                   2.0.0.0    Storage
Function        Rename-MaskingSet                                  2.0.0.0    Storage
Function        Repair-FileIntegrity                               2.0.0.0    Storage
Function        Repair-VirtualDisk                                 2.0.0.0    Storage
Function        Repair-Volume                                      2.0.0.0    Storage
Function        Reset-PhysicalDisk                                 2.0.0.0    Storage
Function        Reset-StorageReliabilityCounter                    2.0.0.0    Storage
Function        Resize-Partition                                   2.0.0.0    Storage
Function        Resize-StorageTier                                 2.0.0.0    Storage
Function        Resize-VirtualDisk                                 2.0.0.0    Storage
Function        Revoke-FileShareAccess                             2.0.0.0    Storage
Function        Set-Disk                                           2.0.0.0    Storage
Function        Set-FileIntegrity                                  2.0.0.0    Storage
Function        Set-FileShare                                      2.0.0.0    Storage
Function        Set-FileStorageTier                                2.0.0.0    Storage
Function        Set-InitiatorPort                                  2.0.0.0    Storage
Function        Set-Partition                                      2.0.0.0    Storage
Function        Set-PhysicalDisk                                   2.0.0.0    Storage
Function        Set-ResiliencySetting                              2.0.0.0    Storage
Function        Set-StorageFileServer                              2.0.0.0    Storage
Function        Set-StorageHealthSetting                           2.0.0.0    Storage
Function        Set-StoragePool                                    2.0.0.0    Storage
Function        Set-StorageProvider                                2.0.0.0    Storage
Function        Set-StorageSetting                                 2.0.0.0    Storage
Function        Set-StorageSubSystem                               2.0.0.0    Storage
Function        Set-StorageTier                                    2.0.0.0    Storage
Function        Set-VirtualDisk                                    2.0.0.0    Storage
Function        Set-Volume                                         2.0.0.0    Storage
Function        Set-VolumeScrubPolicy                              2.0.0.0    Storage
Function        Show-VirtualDisk                                   2.0.0.0    Storage
Function        Start-StorageDiagnosticLog                         2.0.0.0    Storage
Function        Stop-StorageDiagnosticLog                          2.0.0.0    Storage
Function        Stop-StorageJob                                    2.0.0.0    Storage
Function        Unblock-FileShareAccess                            2.0.0.0    Storage
Function        Unregister-StorageSubsystem                        2.0.0.0    Storage
Function        Update-Disk                                        2.0.0.0    Storage
Function        Update-HostStorageCache                            2.0.0.0    Storage
Function        Update-StorageFirmware                             2.0.0.0    Storage
Function        Update-StoragePool                                 2.0.0.0    Storage
Function        Update-StorageProviderCache                        2.0.0.0    Storage
Function        Write-VolumeCache                                  2.0.0.0    Storage
But I’m taunting here: unfortunately for you, Nasty7, as a Windows 7 user, the Storage module is not available in PowerShell 2, so unless you consider looking into upgrading, Diskpart is the best tool you’ve got for now.


I need something more simple, and don't know why the commands I linked to don't work.
PowerShell errors are always descriptive. Did you read the errors you received?
 

My Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
Thanks Pyprohly, yes I did read the Error's but am a bit of a noob. My comprehension abilities an't so good either because my health is very bad.

But I’m taunting here: unfortunately for you, Nasty7,

as a Windows 7 user, the Storage module is not available in PowerShell 2, so unless you consider looking into upgrading, Diskpart is the best tool you’ve got for now.
Yes, lol...but I appreciate that you did so without being Arrogant or condescending.

I did notice that Powershell Version might be an issue, yes. I did my search on Windows 7, but did not realize at least that one page was for 8.1 only I believe.

Thanks for your knowledge, this clears things up for me. Now, this install I can't mess up, and only have a few Images on a USB Drive, so won't explore Updating/Installing a newer version of P.S. if that is even possible on W7 HomePremium.

Nasty7
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP Pavilion dv7-6c23cl
OS
Windows 7 Home Premium 64bit
CPU
AMD A8-3520M
Motherboard
Hewlett-Packard 180B (Socket FS1)
Memory
6.00GB DDR3 @ 674MHz (9-9-9-24)
Graphics Card(s)
512MB ATI AMD Radeon HD 6620G
Sound Card
IDT High Definition Audio CODEC
Monitor(s) Displays
Generic PnP Monitor
Screen Resolution
(1600x900@60Hz)
Hard Drives
Samsung 850 EVO 250GB SSD
Mouse
Logitec M525
Internet Speed
30-75Mbps
Antivirus
Avast Free, Unfortunately
Browser
Google Chrome, Firefox, IE
Back
Top