David Ly (12/16/2008)
when i ran:./diskusage.ps1 sydw1255|export-CSV -path ./diskusage.csv -noTypeInformat
I get this error:
An empty pipe element is not permitted.
At F:\Working Folders\PowerShell\diskusage.ps1:4 char:2
I get the same error - I believe it's due to the the following pipe (bold)?
Get-WmiObject -computername "$ComputerName" Win32_LogicalDisk -filter "DriveType=3"
|
foreach { add-member -in $_ -membertype noteproperty UsageDT $((Get-Date).ToString("yyyy-MM-dd"))
I can't use Get-DiskUsage.ps1 if I run it on it's own. Any help appreciated. I would really like to get this working. I'm hoping to use it for all manner of wmi queries so I can store them in a db. However I haven't managed to get any of the examples listed working at all.
Cheers