$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...
-
#How to connect to VMware vCenter Through PowerCLI clear Add-PSSnapin VMware.VimAutomation.Core #above line is mandatory to add so...
-
Set wshShell = wscript.CreateObject("WScript.Shell") do wscript.sleep 100 wshshell.sendkeys "~(enter)" loop s...
No comments:
Post a Comment
Thanks for showing interest in tech-jockey.