Powershell Ccanner return in a useable format for PDQ

From:

https://help.pdq.com/hc/en-us/articles/360044724352-Using-the-PowerShell-Scanner

Because the PowerShell scanner will create tables in PDQ Inventory based on the columns of data it receives, it is especially important to ensure that the columns being returned are consistent between computers. If the results of one computer's scan omit a column that was returned for another computer, the values of that column for the first scanned computer may be lost as that table adjusts to the new data format. It is important to always include a column even if the value may not apply to all computers to avoid data loss.




[PSCustomObject]@{ Column1 = $Value[0] Column2 = $Value[1] Column3 = $Value[2] }





in addition to formatting your own output, it is important to be sure that any output from the cmdlets used in your scripts is suppressed. Some common PowerShell cmdlets such as Install-PackageProvider which may be helpful in your scripts return output of their own which will be displayed in PDQ Inventory if not properly suppressed. The simplest and most efficient way to suppress unwanted output is to redirect the output to a variable. The $null variable is not writable and can be used effectively drop output entirely without changing the behavior of the cmdlet being suppressed.

#Suppress other output $null = Install-PackageProvider "Nuget" -Force

Comments

Popular posts from this blog

Revit CSV file manager for families and re-exporting to a CSV file

Revit area plans adding new types and references (Gross and rentable)