Powershell: Registry Abfrage und Formatierung
Hallo zusammen.
Ich starte mit folgender Abfrage eine Suche in der Registry, was auch funktioniert.
Allerdings würde ich das gerne formatiert in einen GridView exportieren, so dass auch mind. 2 Spalten zu sehen sind.
Also, links der Name und rechts der Pfad oder Wert.
Beispiel:
Microsoft-Windows-exFAT-SQM
Microsoft-Windows-Fat-SQM
SQLBrowser "C:\Program Files (x86)\Microsoft SQL Server\90\Shared\sqlbrowser.exe"
SQLWriter "C:\Program Files\Microsoft SQL Server\90\Shared\sqlwriter.exe"
SqlServerWriter
Leider tue ich mich hiermit etwas schwer.
Jemand eine Idee?
Ich starte mit folgender Abfrage eine Suche in der Registry, was auch funktioniert.
$keys= Get-ChildItem -path HKLM:\system\ -Recurse -ErrorAction SilentlyContinue | where { $_.Name -match "SQL*" }
$Items = $Keys | Foreach-Object {Get-ItemProperty $_.PsPath }
ForEach ($Item in $Items) {"{0,-35} {1,-10} " -f $Item.PSChildName, $Item.ImagePath, $Item.WorkingPath}
Allerdings würde ich das gerne formatiert in einen GridView exportieren, so dass auch mind. 2 Spalten zu sehen sind.
Also, links der Name und rechts der Pfad oder Wert.
Beispiel:
Microsoft-Windows-exFAT-SQM
Microsoft-Windows-Fat-SQM
SQLBrowser "C:\Program Files (x86)\Microsoft SQL Server\90\Shared\sqlbrowser.exe"
SQLWriter "C:\Program Files\Microsoft SQL Server\90\Shared\sqlwriter.exe"
SqlServerWriter
Leider tue ich mich hiermit etwas schwer.
Jemand eine Idee?
Please also mark the comments that contributed to the solution of the article
Content-Key: 459050
Url: https://administrator.de/contentid/459050
Printed on: April 26, 2024 at 22:04 o'clock
2 Comments
Latest comment
Out-Gridview ist dein Freund.
Get-ChildItem -path HKLM:\system -Recurse -ErrorAction SilentlyContinue | where { $_.Name -match "SQL.*" } | %{Get-Itemproperty $_.PsPath | select PsChildName, ImagePath, Workingpath} | Out-Gridview