Avatar of rookie_b
rookie_b
Flag for United Kingdom of Great Britain and Northern Ireland

asked on 

Parse dirquota output in PowerShell

I am having to use dirquota to collect quota information from a number of servers, as FSRM Powershell is not an option. I need to somehow parse the output for a;l properties  to a csv file

How do I do that?
Here is an example:
dirquota q l /remote:server /path:D:\...

Open in new window

And here is the output it produces:

Quota Path:             D:\parent\folder1
Description:            None
Share Path:             \\server\share\folder1
                       
Source Template:        1 TB Limit Reports to User (Matches template)
Quota Status:           Enabled
Limit:                  1.00 TB (Hard)
Used:                   160.92 GB (16%)
Available:              863.08 GB
Peak Usage:             160.92 GB (05/07/2020 16:10)
Thresholds:
   Warning ( 85%):      E-mail, Report
   Limit (100%):        E-mail, Report

Quota Path:             D:\parent\folder2
Description:            None
Share Path:             \\server\share\folder2
Source Template:        1 TB Limit Reports to User (Matches template)
Quota Status:           Enabled
Limit:                  1.00 TB (Hard)
Used:                   14.63 GB (1%)
Available:              1,009.37 GB
Peak Usage:             17.34 GB (25/07/2020 09:18)
Thresholds:
   Warning ( 85%):      E-mail, Report
   Limit (100%):        E-mail, Report

Open in new window



PowershellWindows Server 2012Windows Server 2008

Avatar of undefined
Last Comment
oBdA

8/22/2022 - Mon