PowerShell for Windows Admins:

Disks


February 26, 2014  4:47 PM

Useful storage cmdlets



Posted by: Richard Siddaway
Disks, PowerShell v4

Scanning through the Storage module there is a bunch of useful cmdlets – starting with the Get* cmdlets: Get-Command -Module Storage...

April 12, 2013  12:41 PM

Creating a new disk



Posted by: Richard Siddaway
Disks, PowerShell 3, Windows Server 2012

I really like Windows Server Core. The concept has come of age in Windows 2012.

I needed to add a new disk to a virtual machine  - that’s easy using the Hyper-V cmdlets. But what about formating the disk.

A module new to Windows 2012 & Windows can be used.  Its...


January 21, 2012  7:28 AM

SMART disk failure data



Posted by: Richard Siddaway
Disks, PowerShell, WMI

We can access the SMART disk failure data using

Get-WmiObject -Namespace root\wmi -Class MSStorageDriver_FailurePredictData

 

The important properties are:

Active           : True


January 20, 2012  2:58 PM

SMART disks



Posted by: Richard Siddaway
Disks, PowerShell, WMI

A question on the forum about using WMI to work with SMART disks got my digging into the subject.  SMART disks - http://en.wikipedia.org/wiki/S.M.A.R.T – detect and report on disk problems...


January 15, 2012  3:43 PM

Boot partition



Posted by: Richard Siddaway
Disks, PowerShell v2, WMI

Do you know which disk partition your system boots from?

Its easy to find out

function get-bootpartition {            
[			


August 7, 2011  10:05 AM

MSDiskDriver_Performance



Posted by: Richard Siddaway
Disks

We have looked at the MSDiskDriver_Geometry  class now lets look at the MSDiskDriver_Performance class

This is a bit more complicated because the Perfdata property is actually an instance of the MSDiskDriver_PerformanceData class


				
								
				 

				Bookmark and Share

				   

				 0 Comments
				   

				  RSS Feed
				   

				  Email a friend

			
			
			


August 7, 2011  9:26 AM

MSDiskDriver classes



Posted by: Richard Siddaway
Disks

The root\wmi namespace contains four MSDiskDriver related classes

gwmi -Namespace root\wmi -Class msdiskdriver* -List | select name

MSDiskDriver
MSDiskDriver_Performance
MSDiskDriver_PerformanceData
MSDiskDriver_Geometry

 

The...


August 5, 2011  1:11 PM

Change Volume Label



Posted by: Richard Siddaway
Disks

While we are looking at disks I’ll add this function to the mix

function set-volumelabel {            
[
				
								
				 

				Bookmark and Share

				   

				 0 Comments
				   

				  RSS Feed
				   

				  Email a friend

			
			
			


August 5, 2011  11:58 AM

Setting the drive letter



Posted by: Richard Siddaway
Disks

I’ve been working on some WMI  functions for disks recently. First off setting the disk drive letter.

function set-driveletter {            

				
								
				 

				Bookmark and Share

				   

				 0 Comments
				   

				  RSS Feed
				   

				  Email a friend

			
			
			


July 7, 2011  2:23 PM

Next partition



Posted by: Richard Siddaway
Disks

I also need to generate a partition number for Mount-VHD

Similar idea but use the Win32_DiskPartition class

function get-nextpartition {            
            
			


Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: