locked
Formatted output to track Drive growth with appended time stamp on specific frequency using Powershell RRS feed

  • Question

  • Can I get little help on the issue I am facing:

    I wanted the output to be like below columns:

    I have so far tried below code and would need little help.

    $i=1

    while($i -le 50){

    $d=Get-Date

    $d=$d.ToString('MM-dd-yyyy_hh-mm-ss')

    $d| out-file "c:\temp\App_Drive_time.txt" -append

    Get-WmiObject win32_logicaldisk -ComputerName Server1 -Filter "volumename='SQLFS'" | select freespace,Size |` 

    Export-Csv "c:\temp\App_M_Usage_Details.csv" -Append -NoTypeInformation

    Start-Sleep -Seconds 300

    $i=$i+1}



    Best Regards,SQLBoy



    • Edited by Kumar GK Monday, March 11, 2019 2:19 PM
    Monday, March 11, 2019 2:16 PM

All replies