$cred = get-Credential $computers = get-Content c:\neeraj\complist.txt foreach ( $item in $computers) { get-WmiObject win32_logicaldisk -Credential $cred -ComputerName $item -Filter "Drivetype=3" | ft SystemName,DeviceID,VolumeName,@{Label="Total SIze";Expression={$_.Size / 1gb -as [int] }},@{Label="Free Size";Expression={$_.freespace / 1gb -as [int] }} -autosize }
Welcome to tech-jockey!
This blog is designed to built tech solutions with collaboration of members who believe in sharing.
Guests inputs are most welcome.
Comment, like and share.
You can also help tech-jockey to grow
Please Click here to help.
Team Tech-Jockey !!
Thursday, June 9, 2016
Check disk space through powershell
Subscribe to:
Post Comments (Atom)
Content of this blog has been moved to GITHUB
Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...
-
(gwmi -Namespace root\wmi -Class mpio_disk_info).driveinfo | % {Write-host "Name: $($_.name) Paths: $($_.numberpaths)"}
-
Here is what you need to do: Step 1: Restart your machine. Its always good to go for the ‘when-nothing-works-try-this’ solution Step 2:...
No comments:
Post a Comment
Thanks for showing interest in tech-jockey.