Dos disk size command
l, /allLinks count all hardlinks separately (By default, files with multiple j, /secnario=SCENARIO specifies the scenario name for the INI file NOTE: SCENARIO name must be speificed via /j (/scenario)
i, /iniFile=FILE takes all the parameters from an INI file. h, /humanReadable displays size in human readable format LastWriteTime 0x200 file last write timestamp LastAccessTime 0x100 file last access timestamp
SizePerDir 0x004 sum of SizeOnDisk for top level childĬhildDirs 0x010 number of child directoriesįilesPerDir 0x020 number of top level child filesĭirsPerDir 0x040 number of top level child directoriesĬreationTime 0x080 file creation timestamp g, /displayFlag=FLAG specifies the flags value to determin which column(s) to display f, /minSizeOnDisk=SIZE displays directory information only if its SizeOnDisk e, /minFileSize=SIZE displays directory information only if its FileSize d, /maxDepth=N displays directory information only if it is N or a, /systemAndReserve displays size for system files and reserved space
#Dos disk size command full#
TIP: It is always smart to have monitoring tools (Like HP SiteScope or HP Operations Manager for example) that will control critical points in your system and send you alerts when for example disk free space drops a certain level.This program is at the beginning of development, with some features not working as expected and some spelling errors in the usage instructions.įor those interested, the full usage instructions are below: DiskUsage - Disk Usageĭescription: Summarize disk usage recursively for the given directory. For example, we can use MS SQL Database and create table DiskFreeSpace based on resultset type name ( Report.DiskSpaceInfo ) where we can record the resultset and use MS SQL Reporting Services to show the results collected over a certain period of time. Type Name of resultset gives us a possibility to further expend the use of resultset. Report.DiskSpaceInfo Type Name for Get-DiskFreeSpace CmdLet resultset Get-DiskFreeSpace -client "OK" -solution "FIN" | Get-Member So if we call PowerShell Get-Member CmdLet to get the type of resultset for Get-DiskFreeSpace CmdLet we will get Report.DiskSpaceInfo type and not standard PowerShell PSObject type. Notice the name of the resultset ( Report.DiskSpaceInfo). Write-Output $obj Type Name Of The Resultset Objects $obj = New-Object -TypeName PSObject -Property $properties Get-CimInstance -Class CIM_LogicalDisk -ComputerName (Get-Content -Path 'C:\Temp\Servers.txt') | Select-Object Space(GB)" Expression= We use the CIM_LogicalDisk CIM Class combined with the ComputerName parameter that has been fed from the text file with the list of servers. We basically load the content of the text file using Get-Content CmdLet and PowerShell will go through the list and run the same command as in the previous solution for each server on the list.
Properties of Win32_LogicalDisk WMI Class Solution 2 – Get Disk Size And Disk Free Space For The List Of Servers (Remote Computers)įor the list of computers, we can use the same calls as for the previous solution only to use the ComputerName parameter and add the list of servers as a txt file.Ĭreate the list of servers in the text file and save in, for example, C:\Temp folder.