2

When I'm using Get-Package I get this list.

Name                           Version          Source                           ProviderName                                                                                                                                   
----                           -------          ------                           ------------                                                                                                                                   
Intel(R) Wireless Manageabi... 1.0.0.0                                           msi                                                                                                                                            
Microsoft Visual C++ 2017 x... 14.11.25325                                       msi                                                                                                                                            
Microsoft VC++ redistributa... 12.0.0.0                                          msi                                                                                                                                            
Intel(R) Management Engine ... 1.0.0.0                                           msi                                                                                                                                            
Intel(R) Management Engine ... 1914.12.0.1255                                    Programs                                                                                                                                       
Microsoft Visual C++ 2017 x... 14.11.25325                                       msi                                                                                                                                            
DcuMSMWrap                     5.0.3            C:\Program Files (x86)\Dell\U... msi                                                                                                                                            
Dell Command | Update for W... 3.1.0            C:\Program Files\Dell\Command... msi                                                                                                                                            
Intel® Optane™ Pinning Expl... 17.5.3.1026                                       msi                                                                                                                                            
7-Zip 19.00 (x64)              19.00                                             Programs                                                                                                                                       
Mozilla Firefox 76.0.1 (x64... 76.0.1                                            Programs                                                                                                                                       
Dell SupportAssist             3.5.0.448        C:\Program Files\Dell\Support... msi                                                                                                                                            
Dell SupportAssist             3.5.0.448                                         Programs                                                                                                                                       
Dell Data Vault (64 bit)       5.2.11.111                                        msi                                                                                                                                            
Intel(R) Trusted Connect Se... 1.52.230.1                                        msi                                                                                                                                            
Intel(R) Trusted Connect Se... 1.52.230.1                                        msi                                                                                                                                            
Adobe Acrobat Reader DC - D... 20.9.20063       C:\Program Files (x86)\Adobe\... msi                                                                                                                                            
Mozilla Maintenance Service    76.0.1                                            Programs                                                                                                                                       
...
..
.

Too long strings are shortened. I would like to get the full string but there seems to be no flag to do so. How could I retrieve the full length string of the installed packages?

Or how else could I get a representation of the package to uninstall it via PowerShell?

4
  • Get-Package returns a collection of objects, each object in that collection, has a [Name, Version, Source, ProviderName] property. I asked for an example of one of those values, specifically the Name property for one of those objects. I suspected, the formatted output was simply not display the entire value. *You wanted to know how to do that, I was unwilling to provide those instructions, I was more than willing to answer your question.
    – Ramhound
    May 19, 2020 at 14:44
  • @duri - I actually did. You indicated you want to uninstall Packages through PowerShell in order to do that you need to use the Name of the package. I was already at the next step since I already know what you will need to accomplish your goal. I also don't have the environment that makes providing PowerShell code possible.
    – Ramhound
    May 19, 2020 at 14:47
  • the truncation IS NOT from the command. it is from the display system. that system will truncate any value that is too long to fit into the predefined spacing the display format for that type allows in that situation. you can get around it by using the Format-List cmdlet to change to a vertical listing, OR by using the Format-Table cmdlet with the -AutoSize parameter, OR by showing only the name values directly with something like (Get-Package).Name. [grin]
    – Lee_Dailey
    May 20, 2020 at 0:37
  • You don't need to show the full names if you process things inside the pipeline, insider PS without worrying about being able to read things. Tell PS what you want to uninstall, and then find and uninstall it. May 20, 2020 at 4:13

1 Answer 1

2

Possible answer from stackoverflow:

Get-Package | ft -AutoSize

At least in Windows 10 it shows quite clearly the columns

3
  • Yeah that does it. Pretty weird to have to rely on a additional tool to get the output of the others straight.
    – dun
    May 19, 2020 at 14:12
  • 1
    It's not an additional tool, it's a builtin argument that allows you to get what you want, not what the system needs. PS works just fine inside itself. It offers the functions to make things more "friendly", but the default mode is not to be "friendly" but to be functional. May 20, 2020 at 4:12
  • The format you see is specifically set to show all things on one screen and thus truncation is needed. This is not unique to PowerShell btw. PowerShell will use table view for up to 5 properties returned, if you return more than that, it will default to the table view, unless you use Format-Table. Even the Format-Table has several switches. See the help file on this topic. For Example - to see more on the screen: [Get-Package | Format-Table -AutoSize -Wrap], and that -wrap can make text hard to read. PS formatters are their own files. You can mess with them, but in most cases, it's not a thing
    – postanote
    May 20, 2020 at 18:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.