none
Powershell output running out of space RRS feed

  • Question

  • Hi,

    When i am running a script to get Name, IP and OU details from a list of computers. The output of the script is truncated.

    Name                       IPv4Address                DistinguishedName       
    ----                       -----------                -----------------       
    PS6645                     10.44.168.215              CN=PS6645,OU=Computers...

    machine distingushedname is not shown completely. Who can i increase the width of the output.

    I tried to use OUT-file and Export-csv But not getting the complete format.

    SCRIPT --

    $Computers = "d:\checkfile.txt"      # contants list of persistent machines
    $Comp = Get-Content $Computers
    ForEach ($Computer In $Comp)
    {
      Try
      {
        Get-ADComputer $Computer -Properties * | FT Name,IPv4Address,DistinguishedName | Out-File -Enc UTF8 -Append .\found.txt
      }
      Catch
      {
        $Computer  + "    not-in-AD" | Out-File -Enc UTF8 -Append .\notfound.csv  # stores output in this file
      }
    }

    • Moved by Bill_Stewart Sunday, June 29, 2014 6:41 PM Abandoned
    Thursday, January 23, 2014 3:49 PM

All replies