How to modify column width for powershell command results

Page 1 of 2 12 LastLast

  1. Posts : 42,746
    windows 10 professional version 1607 build 14393.969 64 bit
       #1

    How to modify column width for powershell command results


    This link displayed a powershell command to view drivers:
    How to check device driver versions on Windows 10 | Windows Central

    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.

    Code:
    PS C:\WINDOWS\system32> Get-WmiObject Win32_PnPSignedDriver| select DeviceName, Manufacturer, DriverVersion
    
    DeviceName                                                                    Manufacturer                   DriverVers
                                                                                                                 ion
    ----------                                                                    ------------                   ----------
    Local Print Queue                                                             Microsoft                      10.0.17...
    Local Print Queue                                                             Microsoft                      10.0.17...
    Local Print Queue                                                             Microsoft                      10.0.17...
    Local Print Queue                                                             Microsoft                      10.0.17...
    Local Print Queue                                                             Microsoft                      10.0.17...
    WAN Miniport (Network Monitor)                                                Microsoft                      10.0.17...
    WAN Miniport (IPv6)                                                           Microsoft                      10.0.17...
    WAN Miniport (IP)                                                             Microsoft                      10.0.17...
    WAN Miniport (PPPOE)                                                          Microsoft                      10.0.17...
    WAN Miniport (PPTP)                                                           Microsoft                      10.0.17...
    WAN Miniport (L2TP)                                                           Microsoft                      10.0.17...
    WAN Miniport (IKEv2)                                                          Microsoft                      10.0.17...
    WAN Miniport (SSTP)                                                           Microsoft                      10.0.17...
    Generic software device                                                       Microsoft                      10.0.17...
    Generic software device                                                       Microsoft                      10.0.17...
    Local Print Queue                                                             HP                             10.0.17...
    HP OfficeJet Pro 8710 PCL-3                                                   HP                             20.79.1...
    HP OfficeJet Pro 8710 [F77F41]                                                Microsoft                      10.0.17...
    Generic software device                                                       Microsoft                      10.0.17...
    Generic software device                                                       Microsoft                      10.0.17...
    Generic software device                                                       Microsoft                      10.0.17...
    Generic software device                                                       Microsoft                      10.0.17...
    Remote Desktop Device Redirector Bus                                          Microsoft                      10.0.17...
    Plug and Play Software Device Enumerator                                      (Standard system devices)      10.0.17...
    Microsoft System Management BIOS Driver                                       (Standard system devices)      10.0.17...
    NDIS Virtual Network Adapter Enumerator                                       Microsoft                      10.0.17...
    Microsoft Basic Render Driver                                                 Microsoft                      10.0.17...
    ACPI Fixed Feature Button                                                     (Standard system devices)      10.0.17...
    Motherboard resources                                                         (Standard system devices)      10.0.17...
    Trusted Platform Module 1.2                                                   (Standard)                     10.0.17...
    Microsoft Windows Management Interface for ACPI                               Microsoft                      10.0.17...
    ACPI Lid                                                                      (Standard system devices)      10.0.17...
    ACPI Sleep Button                                                             (Standard system devices)      10.0.17...
    Microsoft AC Adapter                                                          Microsoft                      10.0.17...
    Microsoft ACPI-Compliant Control Method Battery                               Microsoft                      10.0.17...
    Microsoft ACPI-Compliant Control Method Battery                               Microsoft                      10.0.17...
    Microsoft Windows Management Interface for ACPI                               Microsoft                      10.0.17...
    HP Mobile Data Protection Sensor                                              HP Inc.                        7.0.9.1
    Motherboard resources                                                         (Standard system devices)      10.0.17...
    Synaptics SMBus Driver                                                        Synaptics                      19.0.19.69
    Intel(R) 8 Series Chipset Family SATA AHCI Controller                         Intel Corporation              14.8.16...
    Synaptics SMBus TouchPad                                                      Synaptics                      19.0.19.69
    HP LAN/WLAN/WWAN Switching and Hotkey Service                                 HP Inc.                        7.0.15.1
    Keyboard_Filter_01
    Standard 101/102-Key or Microsoft Natural PS/2 Keyboard for HP Hotkey Support HP Inc.                        11.0.8.1
    Printer Port Logical Interface                                                (Standard system devices)      10.0.17...
    ECP Printer Port                                                              (Standard port types)          10.0.17...
    Extended IO Bus                                                               (Standard system devices)      10.0.17...
    System timer                                                                  (Standard system devices)      10.0.17...
    System CMOS/real time clock                                                   (Standard system devices)      10.0.17...
    Motherboard resources                                                         (Standard system devices)      10.0.17...
    Motherboard resources                                                         (Standard system devices)      10.0.17...
    Numeric data processor                                                        (Standard system devices)      10.0.17...
    Programmable interrupt controller                                             (Standard system devices)      10.0.17...
    High precision event timer                                                    (Standard system devices)      10.0.17...
    Legacy device                                                                 Intel                          10.0.17...
    Direct memory access controller                                               (Standard system devices)      10.0.17...
    Microsoft ACPI-Compliant Embedded Controller                                  (Standard system devices)      10.0.17...
    Intel(R) QM87 LPC Controller - 8C4F                                           INTEL                          10.1.1.40
    Generic USB Hub                                                               (Generic USB Hub)              10.0.17...
    USB Root Hub                                                                  (Standard USB Host Controller) 10.0.17...
    Intel(R) 8 Series/C220 Series USB EHCI #1 - 8C26                              Intel                          10.0.17...
    Realtek PCIE CardReader                                                       Realtek Semiconductor Corp.    10.0.17...
    PCI Express Downstream Switch Port                                            (Standard system devices)      10.0.17...
    PCI Express Downstream Switch Port                                            (Standard system devices)      10.0.17...
    Microsoft Wi-Fi Direct Virtual Adapter                                        Microsoft                      10.0.17...
    Microsoft Wi-Fi Direct Virtual Adapter                                        Microsoft                      10.0.17...
    Intel(R) Dual Band Wireless-AC 7260                                           Intel Corporation              18.33.14.3
    PCI Express Downstream Switch Port                                            (Standard system devices)      10.0.17...
    PCI Express Upstream Switch Port                                              (Standard system devices)      10.0.17...
    Intel(R) 8 Series/C220 Series PCI Express Root Port #7 - 8C1C                 INTEL                          10.1.1.40
    Disk drive                                                                    (Standard disk drives)         10.0.17...
    Standard SATA AHCI Controller                                                 Standard SATA AHCI Controller  10.0.17...
    Intel(R) 8 Series/C220 Series PCI Express Root Port #5 - 8C18                 INTEL                          10.1.1.40
    Intel(R) 8 Series/C220 Series PCI Express Root Port #1 - 8C10                 INTEL                          10.1.1.40
    Audio Endpoint                                                                Microsoft                      10.0.17...
    Audio Endpoint                                                                Microsoft                      10.0.17...
    Audio Endpoint                                                                Microsoft                      10.0.17...
    Realtek High Definition Audio                                                 Realtek                        6.0.1.8287
    High Definition Audio Controller                                              Microsoft                      10.0.17...
    Generic USB Hub                                                               (Generic USB Hub)              10.0.17...
    USB Root Hub                                                                  (Standard USB Host Controller) 10.0.17...
    Intel(R) 8 Series/C220 Series USB EHCI #2 - 8C2D                              Intel                          10.0.17...
    Intel(R) Ethernet Connection I217-LM                                          Intel                          12.15.23.7
    Intel(R) Active Management Technology - SOL                                   Intel                          11.6.0....
    Intel(R) Management Engine Interface                                          Intel                          11.6.0....
    HP HD Webcam                                                                  SunplusIT                      3.6.8.5
    USB Composite Device                                                          (Standard USB Host Controller) 10.0.17...
    Bluetooth Device (Personal Area Network)                                      Microsoft                      10.0.17...
    Microsoft Bluetooth Enumerator                                                Microsoft                      10.0.17...
    Bluetooth Device (RFCOMM Protocol TDI)                                        Microsoft                      10.0.17...
    Microsoft Bluetooth LE Enumerator                                             Microsoft                      10.0.17...
    Intel(R) Wireless Bluetooth(R)                                                Intel Corporation              20.100.5.1
    Synaptics FP Sensors (WBF) (PID=003f)                                         Synaptics FP Sensors           4.5.356.0
    USB Root Hub (USB 3.0)                                                        (Standard USB HUBs)            10.0.17...
    USB xHCI Compliant Host Controller                                            Generic USB xHCI Host Contr... 10.0.17...
    NVIDIA High Definition Audio                                                  NVIDIA                         1.3.38.16
    High Definition Audio Controller                                              Microsoft                      10.0.17...
    Generic PnP Monitor                                                           (Standard monitor types)       10.0.17...
    NVIDIA Quadro K4100M                                                          NVIDIA                         25.21.1...
    Intel(R) Xeon(R) processor E3 - 1200 v3/4th Gen Core processor PCI Express... INTEL                          10.1.1.40
    Intel(R) Xeon(R) processor E3 - 1200 v3/4th Gen Core processor DRAM Contro... INTEL                          10.1.1.40
    PCI Express Root Complex                                                      (Standard system devices)      10.0.17...
    HID-compliant wireless radio controls                                         (Standard system devices)      10.0.17...
    HP Wireless Button Driver                                                     HP                             1.1.19.1
    ACPI Thermal Zone                                                             (Standard system devices)      10.0.17...
    ACPI Thermal Zone                                                             (Standard system devices)      10.0.17...
    ACPI Thermal Zone                                                             (Standard system devices)      10.0.17...
    ACPI Thermal Zone                                                             (Standard system devices)      10.0.17...
    ACPI Thermal Zone                                                             (Standard system devices)      10.0.17...
    ACPI Thermal Zone                                                             (Standard system devices)      10.0.17...
    Intel Processor                                                               Intel                          10.0.17...
    Intel Processor                                                               Intel                          10.0.17...
    Intel Processor                                                               Intel                          10.0.17...
    Intel Processor                                                               Intel                          10.0.17...
    Intel Processor                                                               Intel                          10.0.17...
    Intel Processor                                                               Intel                          10.0.17...
    Intel Processor                                                               Intel                          10.0.17...
    Intel Processor                                                               Intel                          10.0.17...
    Microsoft ACPI-Compliant System                                               Microsoft                      10.0.17...
    ACPI x64-based PC                                                             (Standard computers)           10.0.17...
    Charge Arbitration Driver                                                     (Standard system devices)      10.0.17...
    UMBus Root Bus Enumerator                                                     Microsoft                      10.0.17...
    Microsoft Kernel Debug Network Adapter                                        Microsoft                      10.0.17...
    Microsoft Storage Spaces Controller                                           Microsoft                      10.0.17...
    Microsoft Virtual Drive Enumerator                                            Microsoft                      10.0.17...
    Composite Bus Enumerator                                                      Microsoft                      10.0.17...
    Microsoft Hyper-V Virtualization Infrastructure Driver                        Microsoft                      10.0.17...
    Microsoft Basic Display Driver                                                (Standard display types)       10.0.17...
    Volume                                                                        Microsoft                      10.0.17...
    Generic volume shadow copy                                                    Microsoft                      10.0.17...
    Generic volume shadow copy                                                    Microsoft                      10.0.17...
    Generic volume shadow copy                                                    Microsoft                      10.0.17...
    Volume                                                                        Microsoft                      10.0.17...
    Volume                                                                        Microsoft                      10.0.17...
    Volume                                                                        Microsoft                      10.0.17...
    Volume                                                                        Microsoft                      10.0.17...
    Volume Manager                                                                Microsoft                      10.0.17...
    
                                                                                                                 2:5.1,2...
                                                                                                                 2:5.1,2...
                                                                                                                 2:5.1,2...
                                                                                                                 2:5.1,2...
                                                                                                                 2:5.1,2...
    
    
    PS C:\WINDOWS\system32>


    What modifications can be made so that the column/rows display data instead of ..........................





    How do you run the get-windowsdriver command?

    https://docs.microsoft.com/en-us/pow...?view=win10-ps

    Code:
    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.
    
    PS C:\WINDOWS\system32> get-windowsdriver
    Get-WindowsDriver : Parameter set cannot be resolved using the specified named parameters.
    At line:1 char:1
    + get-windowsdriver
    + ~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (:) [Get-WindowsDriver], ParameterBindingException
        + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Dism.Commands.GetWindowsDriverCommand
    
    PS C:\WINDOWS\system32>
      My Computer


  2. Posts : 5,557
    Windows 11 Pro 64-bit
       #2

    Change the output in Powershell to 80 columns by 50 lines.

    Code:
    MODE CON COLS=80 LINES=50
      My Computer


  3. Posts : 17,089
    Windows 10 Home x64 Version 22H2 Build 19045.4894
       #3

    Export to a csv file instead of displaying the results

    Get-WmiObject Win32_PnPSignedDriver | select DeviceName, Manufacturer, DriverVersion | Export-CSV "E:\DriversArchive\DriverStuff.csv"

    Denis
      My Computer


  4. Posts : 42,746
    windows 10 professional version 1607 build 14393.969 64 bit
    Thread Starter
       #4

    Try3 said:
    Export to a csv file instead of displaying the results

    Get-WmiObject Win32_PnPSignedDriver | select DeviceName, Manufacturer, DriverVersion | Export-CSV "E:\DriversArchive\DriverStuff.csv"

    Denis
    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.

    PS C:\WINDOWS\system32> Get-WmiObject Win32_PnPSignedDriver | select DeviceName, Manufacturer, DriverVersion | Export-CSV "c:\DriversArchive\DriverStuff.csv"
    Export-CSV : Could not find a part of the path 'C:\DriversArchive\DriverStuff.csv'.
    At line:1 char:88
    + ... turer, DriverVersion | Export-CSV "c:\DriversArchive\DriverStuff.csv"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OpenError: (:) [Export-Csv], DirectoryNotFoundException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ExportCsvCommand

    PS C:\WINDOWS\system32>

    E: was changed to C:
      My Computer


  5. Posts : 42,746
    windows 10 professional version 1607 build 14393.969 64 bit
    Thread Starter
       #5

    FreeBooter said:
    Change the output in Powershell to 80 columns by 50 lines.

    Code:
    MODE CON COLS=80 LINES=50
    What are the default settings?

    On this computer they were not modified.

    It's surprising that the article had no comments on the need to modify the default settings to be able to view results.



    Code:
    High Definition Audio Controller                                              M
    Generic PnP Monitor                                                           (
    NVIDIA Quadro K4100M                                                          N
    Intel(R) Xeon(R) processor E3 - 1200 v3/4th Gen Core processor PCI Express... I
    Intel(R) Xeon(R) processor E3 - 1200 v3/4th Gen Core processor DRAM Contro... I
    PCI Express Root Complex                                                      (
    HID-compliant wireless radio controls                                         (
    HP Wireless Button Driver                                                     H
    ACPI Thermal Zone                                                             (
    ACPI Thermal Zone                                                             (
    ACPI Thermal Zone                                                             (
    ACPI Thermal Zone                                                             (
    ACPI Thermal Zone                                                             (
    ACPI Thermal Zone                                                             (
    Intel Processor                                                               I
    Intel Processor                                                               I
    Intel Processor                                                               I
    Intel Processor                                                               I
    Intel Processor                                                               I
    Intel Processor                                                               I
    Intel Processor                                                               I
    Intel Processor                                                               I
    Microsoft ACPI-Compliant System                                               M
    ACPI x64-based PC                                                             (
    Charge Arbitration Driver                                                     (
    UMBus Root Bus Enumerator                                                     M
    Microsoft Kernel Debug Network Adapter                                        M
    Microsoft Storage Spaces Controller                                           M
    Microsoft Virtual Drive Enumerator                                            M
    Composite Bus Enumerator                                                      M
    Microsoft Hyper-V Virtualization Infrastructure Driver                        M
    Microsoft Basic Display Driver                                                (
    Volume                                                                        M
    Generic volume shadow copy                                                    M
    Generic volume shadow copy                                                    M
    Generic volume shadow copy                                                    M
    Volume                                                                        M
    Volume                                                                        M
    Volume                                                                        M
    Volume                                                                        M
    Volume Manager                                                                M
    
    
    
    
    
    
    
    
    PS C:\WINDOWS\system32>


    It cut off more displayed results.

    How do you return to default?
    How do you fix the ...........?
      My Computer


  6. Posts : 17,089
    Windows 10 Home x64 Version 22H2 Build 19045.4894
       #6

    zbook said:
    Windows PowerShell
    Copyright (C) Microsoft Corporation. All rights reserved.

    PS C:\WINDOWS\system32> Get-WmiObject Win32_PnPSignedDriver | select DeviceName, Manufacturer, DriverVersion | Export-CSV "c:\DriversArchive\DriverStuff.csv"
    Export-CSV : Could not find a part of the path 'C:\DriversArchive\DriverStuff.csv'.
    At line:1 char:88
    + ... turer, DriverVersion | Export-CSV "c:\DriversArchive\DriverStuff.csv"
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : OpenError: (:) [Export-Csv], DirectoryNotFoundException
    + FullyQualifiedErrorId : FileOpenFailure,Microsoft.PowerShell.Commands.ExportCsvCommand

    PS C:\WINDOWS\system32>

    E: was changed to C:
    c:\DriversArchive exists, does it? The folder needs to exist in order for the file to be created in it.

    I have just retested the command and it works on my computer. I tested it in an Admin PS window and in a std PS window.

    Denis
      My Computer


  7. Posts : 42,746
    windows 10 professional version 1607 build 14393.969 64 bit
    Thread Starter
       #7

    There was a command that I wanted to test on this computer before using it in a thread.

    The command worked but the results were not viewable in the last column.
    Most of the drivers displayed some numbers with ...............

    So the thread was opened.

    Neither method displays the results.

    What other modifications are there to view the results of the last column?
      My Computer


  8. Posts : 989
    Microsoft Windows 10 Home
       #8

    Use Out-Grideview:

    Code:
    Get-WmiObject Win32_PnPSignedDriver|
       select DeviceName, Manufacturer, DriverVersion |
       Out-Gridview
    How to modify column width for powershell command results-screenshot-548-.png

    Read the help you linked to: (also must run from Admin PowerShell console)
    Code:
    Get-WindowsDriver -Online -All
    Keith
      My Computer


  9. Posts : 42,746
    windows 10 professional version 1607 build 14393.969 64 bit
    Thread Starter
       #9

    KeithM said:
    Use Out-Grideview:

    Code:
    Get-WmiObject Win32_PnPSignedDriver|
       select DeviceName, Manufacturer, DriverVersion |
       Out-Gridview
    How to modify column width for powershell command results-screenshot-548-.png

    Read the help you linked to: (also must run from Admin PowerShell console)
    Code:
    Get-WindowsDriver -Online -All
    Keith
    The method opened a new box and displayed the drivers properly.

    All commands were ran using administrative PS.

    How do you return PS to the default settings?
    There isn't a method to modify PS to be able to view results without ..........?
      My Computer


  10. Posts : 989
    Microsoft Windows 10 Home
       #10

    zbook said:
    How do you return PS to the default settings?
    There isn't a method to modify PS to be able to view results without ..........?
    Format-List is another option...
    Code:
    Get-WmiObject Win32_PnPSignedDriver|
       select DeviceName, Manufacturer, DriverVersion |
       Format-List
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 01:17.
Find Us




Windows 10 Forums