scriptingmisaly

PS C:> $drive = gwmi win32_logicaldisk | where {$_.deviceid -like “c:”}

PS C:> “Free size on C: {0:N2}” -f ($drive.freespace / 1MB) + ” MB”

Free size on C: 237 788,60 MB

… gwmi is an alias for Get-WmiObject commandlet, you can use -computer parameter after call selection if you want check a remote computer (eg.: gwmi win32_logicaldisk -computer server1).

View original post

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Category

Uncategorized