en-US/DiskReportingTools-help.xml
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-DiskReportingTools</command:name> <command:verb>Get</command:verb> <command:noun>DiskReportingTools</command:noun> <maml:description> <maml:para>Get command details for DiskReportingTools.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Use this command to get a brief summary of commands in the DiskReportingTools module. The command will return a list of commands with their names, aliases, and a brief description.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-DiskReportingTools</maml:name> </command:syntaxItem> </command:syntax> <command:parameters /> <command:inputTypes> <command:inputType> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>ModuleCommand</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/yourls/newsletter</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-DiskReportingTools ModuleName: DiskReportingTools [v0.12.0] Name Alias Synopsis ---- ----- -------- Get-DiskReportingTools Get command details for DiskReportingTools. Get-RecycleBinSize rbsz Get recycle bin size New-HtmlDriveReport Create a drive HTML report Show-DriveUsage sdu Display a colorized graph of disk usage Show-DriveView sdv Display a summary view of all drives. Show-FolderUsage sfu Show folder usage by file extension.</dev:code> <dev:remarks> <maml:para>The output only shows exported commands. Users on non-Windows platforms will get a different set of commands.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://jdhitsolutions.com/yourls/c42e81</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-Module</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Get-Command</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-RecycleBinSize</command:name> <command:verb>Get</command:verb> <command:noun>RecycleBinSize</command:noun> <maml:description> <maml:para>Get recycle bin size</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Use this command to get the size of the recycle bin on a computer. The command will return size information for each drive found.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-RecycleBinSize</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="CN"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>Specify the name of a remote computer</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>localhost</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Specify an alternate credential.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="CN"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>Specify the name of a remote computer</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>localhost</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Specify an alternate credential.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>RecycleBinInfo</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/yourls/newsletter</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Get-RecycleBinSize -ComputerName SRV1 Computername: SRV1 Drive RecycleBinMB ----- ------------ C: 908.53</dev:code> <dev:remarks> <maml:para>The default is a formatted view.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> rbsz "win10","win11" -Credential $artd Computername: WIN10 Drive RecycleBinMB ----- ------------ C: 2907.99 Computername: WIN11 Drive RecycleBinMB ----- ------------ C: 301.09</dev:code> <dev:remarks> <maml:para>This command is using the Get-RecycleBinSize alias to query remote computers using an alternate credential.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://jdhitsolutions.com/yourls/086fc2</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>New-HtmlDriveReport</command:name> <command:verb>New</command:verb> <command:noun>HtmlDriveReport</command:noun> <maml:description> <maml:para>Create a drive HTML report</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This creates an Html drive report with a gradient table displaying drive usage.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>New-HtmlDriveReport</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="CN"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>Specify the name of a remote computer. You must have admin rights. The default is the localhost</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>local host</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>HeadingTitle</maml:name> <maml:description> <maml:para>Specify the heading title for the HTML report. This will be displayed at the top of the page.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Drive Report</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Passthru</maml:name> <maml:description> <maml:para>Get the report file.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Specify the file name and path for the HTML report</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>DriveReport.html</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="Title"> <maml:name>ReportTitle</maml:name> <maml:description> <maml:para>Specify the page title for the HTML report</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Drive Report</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Specify an alternate credential.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="CN"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>Specify the name of a remote computer. You must have admin rights. The default is the localhost</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>local host</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>HeadingTitle</maml:name> <maml:description> <maml:para>Specify the heading title for the HTML report. This will be displayed at the top of the page.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Drive Report</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Passthru</maml:name> <maml:description> <maml:para>Get the report file.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Specify the file name and path for the HTML report</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>DriveReport.html</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="Title"> <maml:name>ReportTitle</maml:name> <maml:description> <maml:para>Specify the page title for the HTML report</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Drive Report</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Specify an alternate credential.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>System.IO.FileInfo</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/yourls/newsletter</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> New-HtmlDriveReport -Passthru -Path c:\temp\srv1-drive.html -ReportTitle "SRV1 Drive Report" -ComputerName SRV1 -HeadingTitle "Drive Utilization" Directory: C:\temp Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 5/20/2025 4:11 PM 1876 srv1-drive.html</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://jdhitsolutions.com/yourls/c9011d</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Show-DriveUsage</command:name> <command:verb>Show</command:verb> <command:noun>DriveUsage</command:noun> <maml:description> <maml:para>Display a colorized graph of disk usage</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command uses the PowerShell console to display a colorized graph of disk usage. The graph will be color coded depending on the amount of free disk space. By default the command will display all fixed drives but you can limit output to a single drive.</maml:para> <maml:para>This command writes an object to the pipeline, but the properties are ANSI formatted strings.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Show-DriveUsage</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Drive</maml:name> <maml:description> <maml:para>The name of the drive to check, including the colon. See examples. This parameter is only supported on Windows.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="named" aliases="CN"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The name of the computer to query. This command has aliases of: CN This parameter is only supported on Windows.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>$env:COMPUTERNAME</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="RunAs"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Specify an alternate credential. This parameter is only supported on Windows.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Raw</maml:name> <maml:description> <maml:para>Display raw output without formatting.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>Drive</maml:name> <maml:description> <maml:para>The name of the drive to check, including the colon. See examples. This parameter is only supported on Windows.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="named" aliases="CN"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The name of the computer to query. This command has aliases of: CN This parameter is only supported on Windows.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>$env:COMPUTERNAME</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="RunAs"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Specify an alternate credential. This parameter is only supported on Windows.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Raw</maml:name> <maml:description> <maml:para>Display raw output without formatting.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>System.Management.Automation.PSCredential</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>System.Int32</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>PSDriveUsageRaw</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/yourls/newsletter</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Show-DriveUsage WIN10-ENT-01 C: [||||| ] 9.14% D: [||||| ] 9.12% E: [||||||||||||||||||||||||||||||||||| ] 70.71% F: [||||||||||||||||||||||||| ] 49.77%</dev:code> <dev:remarks> <maml:para>The output would be colored blocks for drives C: and D:, yellow for F: and green for E:</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Show-DriveUsage -computer chi-dc04 -drive c: CHI-DC04 C: [||||||||||||||||||||||||| ] 49.63%</dev:code> <dev:remarks> <maml:para></maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> $r = Show-DriveUsage -ComputerName Win10 -Raw PS C:\> $r ComputerName Drives ------------ ------ WIN10 {@{VolumeName=; DeviceID=C:; Size=135951020032; FreeSpace=84002979840; PercentageFree⦠PS C:\> $r.drives VolumeName : DeviceID : C: Size : 135951020032 FreeSpace : 84002979840 PercentageFree : 30.8945750536581 Compressed : False</dev:code> <dev:remarks> <maml:para>Return raw data so you can create your own formatting or visualization.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 4 --------------------------</maml:title> <dev:code>PS /home/jeff> Show-DriveUsage BAMBAM /dev/sdd [|||||||||||||||||||||||||||||||||||||||||||| ] 94%</dev:code> <dev:remarks> <maml:para>An example of output on a Linux system.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://jdhitsolutions.com/yourls/029bca</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Show-DriveView</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Show-DriveView</command:name> <command:verb>Show</command:verb> <command:noun>DriveView</command:noun> <maml:description> <maml:para>Display a summary view of all drives.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>This command will display a summary view of all local, fixed drives. The default behavior is to send the output to Out-GridView. But if you are running PowerShell 7 and have the Microsoft.PowerShell.ConsoleGuiTools module installed, you can use the dynamic ConsoleGridView parameter.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Show-DriveView</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="CN"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The name of a remote computer.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Localhost</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Title</maml:name> <maml:description> <maml:para>Specify the grid title.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Drive Report</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Specify an alternate credential.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Raw</maml:name> <maml:description> <maml:para>Display raw output without formatting.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="CN"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>The name of a remote computer.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Localhost</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Title</maml:name> <maml:description> <maml:para>Specify the grid title.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Drive Report</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Specify an alternate credential.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Raw</maml:name> <maml:description> <maml:para>Display raw output without formatting.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>System.Management.Automation.PSCredential</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>None</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>PSObject</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/yourls/newsletter</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Show-DriveView</dev:code> <dev:remarks> <maml:para>This will show all drives on the local computer in an Out-GridView.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Get-Content C:\scripts\company.txt | Show-DriveView -Title "Company Servers" -cgv</dev:code> <dev:remarks> <maml:para>Get the server names from a text file and pipe them to Show-DriveView. This example is using the parameter alias for the dynamic parameter ConsoleGridView. This implies a PowerShell 7 environment with the Microsoft.PowerShell.ConsoleGuiTools module installed. The output will be a ConsoleGridView window with the title "Company Servers".</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS C:\> Show-DriveView -ComputerName DOM1 -Raw ComputerName : DOM1 DeviceID : C: Type : LocalDisk Size : 135951020032 FreeSpace : 119664275456 UsedSpace : 16286744576 Free% : 88.02</dev:code> <dev:remarks> <maml:para>Get raw data for your own processing and formatting.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://jdhitsolutions.com/yourls/aac2ca</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Show-DriveUsage</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Show-FolderUsage</command:name> <command:verb>Show</command:verb> <command:noun>FolderUsage</command:noun> <maml:description> <maml:para>Show folder usage by file extension.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>Use this cmdlet to show folder usage by file extension. The default output is a color formatted display of extensions showing a percentage of the total folder size. The output is limited to files that meet a minimum threshold percentage of the total folder size. The default threshold is 5%. You can change this value with the -Threshold parameter.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Show-FolderUsage</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Specify the path to the folder to analyze. Use a full file system path</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="CN"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>Specify the name of a remote computer. You must have admin rights. The default is the localhost. This is a dynamic parameter and only available on Windows platforms.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="RunAs"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Specify an alternate credential for the remote computer. This is a dynamic parameter and only available on Windows platforms.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Raw</maml:name> <maml:description> <maml:para>Display raw output without formatting.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"> <maml:name>Threshold</maml:name> <maml:description> <maml:para>Specify the minimum percentage to display. The default is 5%</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Double</command:parameterValue> <dev:type> <maml:name>Double</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>5</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Sort</maml:name> <maml:description> <maml:para>Sort the graphical output by size or extension name in ascending order.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Size</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Descending</maml:name> <maml:description> <maml:para>Sort the graphical output in descending order.</maml:para> </maml:description> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Specify the path to the folder to analyze. Use a full file system path</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="1" aliases="CN"> <maml:name>ComputerName</maml:name> <maml:description> <maml:para>Specify the name of a remote computer. You must have admin rights. The default is the localhost. This is a dynamic parameter and only available on Windows platforms.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="RunAs"> <maml:name>Credential</maml:name> <maml:description> <maml:para>Specify an alternate credential for the remote computer. This is a dynamic parameter and only available on Windows platforms.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PSCredential</command:parameterValue> <dev:type> <maml:name>PSCredential</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Raw</maml:name> <maml:description> <maml:para>Display raw output without formatting.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="named" aliases="none"> <maml:name>Threshold</maml:name> <maml:description> <maml:para>Specify the minimum percentage to display. The default is 5%</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Double</command:parameterValue> <dev:type> <maml:name>Double</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>5</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Sort</maml:name> <maml:description> <maml:para>Sort the graphical output by size or extension name in ascending order.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String</command:parameterValue> <dev:type> <maml:name>String</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>Size</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Descending</maml:name> <maml:description> <maml:para>Sort the graphical output in descending order.</maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type> <maml:name>SwitchParameter</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>False</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>System.Management.Automation.PSCredential</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> <command:inputType> <dev:type> <maml:name>System.Int32</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> <command:returnValue> <dev:type> <maml:name>PSCustomObject</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para>Learn more about PowerShell: http://jdhitsolutions.com/yourls/newsletter</maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>PS C:\> Show-FolderUsage c:\temp [PROSPERO] C:\Temp .mp3 [ 1|||||||||||| ] 17.54% .zip [ 8|||||||||||||||||||| ] 38.33% .m4a [ 1||||||||||||| ] 18.93% .csv [ 4|||| ] 8.41%</dev:code> <dev:remarks> <maml:para>The output will be color formatted and styled. The number in the graph is the number of files for each extension.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>PS C:\> Show-FolderUsage c:\scripts -ComputerName win10 -Raw | Format-Table Name Count Size Total Pct Path ComputerName ---- ----- ---- ----- --- ---- ------------ .gitignore 1 658.00 127583.00 0.52 C:\Scripts WIN10 .md 7 11212.00 127583.00 8.79 C:\Scripts WIN10 .psd1 2 2277.00 127583.00 1.78 C:\Scripts WIN10 .psm1 1 1770.00 127583.00 1.39 C:\Scripts WIN10 .html 1 1873.00 127583.00 1.47 C:\Scripts WIN10 .txt 2 2316.00 127583.00 1.82 C:\Scripts WIN10 .ps1 9 20647.00 127583.00 16.18 C:\Scripts WIN10 .json 4 5322.00 127583.00 4.17 C:\Scripts WIN10 .xml 1 25339.00 127583.00 19.86 C:\Scripts WIN10 .ps1xml 2 2730.00 127583.00 2.14 C:\Scripts WIN10 .png 1 53439.00 127583.00 41.89 C:\Scripts WIN10</dev:code> <dev:remarks> <maml:para>Get the raw data so that you can do you own formatting or visualization.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>PS /home/jeff> Show-FolderUsage . -Sort Size -Descending [BamBam] /Home/Jeff .mp3 [ 8 |||||||||||||||||||||| ] 39.80 % .zip [ 7 |||||||||||||||| ] 19.33 % .jpg [ 10 |||||||||| ] 15.03 % .m4a [ 1 ||||||| ] 12.22 % .pdf [ 7 |||| ] 5.87 %</dev:code> <dev:remarks> <maml:para>This command is supported on non-Windows platforms, although it can only query the local computer. In this example, the output sorted on the Size in descending order.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://jdhitsolutions.com/yourls/c09320</maml:uri> </maml:navigationLink> <maml:navigationLink> <maml:linkText>Show-DriveUsage</maml:linkText> <maml:uri></maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |