$CMDStrFreeSpc = "wmic /node:d2j7jsr1 logicaldisk where drivetype=3 get name, freespace, systemname, filesystem, size, volumeserialnumber /format:csv >>`"$FNLog`""
Out-File -InputObject $CMDStrFreeSpc -Append $FNRunCMD -Encoding ascii
ASKER
robocopy "z:\cad\pjs\_MISCELLANEOUS-DETAILS" "g:\dir\Backup\BupOfRecentPjs\cad\pjs\_MISCELLANEOUS-DETAILS" /xf Thumbs.db *.dwl* /e /np /nfl /ndl /r:0 /w:0 /dcopy:t /log+:"c:\local\CopyPjs10DaysOld_Rslt_Acad.txt"
robocopy "z:\cad\pjs\_UTILITY_NOTES" "g:\dir\Backup\BupOfRecentPjs\cad\pjs\_UTILITY_NOTES" /xf Thumbs.db *.dwl* /e /np /nfl /ndl /r:0 /w:0 /dcopy:t /log+:"c:\local\CopyPjs10DaysOld_Rslt_Acad.txt"
wmic /node:d2j7jsr1 logicaldisk where drivetype=3 get name, freespace, systemname, filesystem, size, volumeserialnumber >>"c:\local\CopyPjs10DaysOld_Rslt_Acad.txt"
Windows PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language built on the .NET Framework. PowerShell provides full access to the Component Object Model (COM) and Windows Management Instrumentation (WMI), enabling administrators to perform administrative tasks on both local and remote Windows systems as well as WS-Management and Common Information Model (CIM) enabling management of remote Linux systems and network devices.
TRUSTED BY
Open in new window
If all you want is a csv with the disk information, you can use Export-Csv directly:Open in new window