I am having an issue with exporting results to a txt in Powershell. I have 2 commands I need to run and when they are done, I am hoping to get something like this:
Name Version
---- -------
Mitel Connect 214.100.1252.0
Cylance Unified Agent 2.4.1070.1
Instead of this:
Name Version
---- -------
Mitel Connect 214.100.1252.0
Name Version
---- -------
Cylance Unified Agent 2.4.1070.1
Here is the code:
get-package 'Microsoft Edge','Mitel Connect', '*7-Zip*','*Cylance*','*Office Profession*','*Dameware*','Cisco AnyConnect Secure Mobility Client' | select name,version | Out-File "C:\temp\export.txt" -Append
Get-WmiObject -Class Win32_Product | where Name -eq "Manageengine AssetExplorer Agent" | select Name, Version | Out-File "C:\temp\export.txt" -Append
I have tried piping the code, google and nothing works,
Does anyone have any idea who to get the output?