Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Function Get-RegistryKeyPropertiesAndValues
- {
- Param(
- [Parameter(Mandatory=$true)]
- [string]$path)
- Push-Location
- Set-Location -Path $path
- Get-Item . |
- Select-Object -ExpandProperty property |
- ForEach-Object {
- New-Object psobject -Property @{“property”=$_;
- “Value” = (Get-ItemProperty -Path . -Name $_).$_}}
- Pop-Location
- }
- $RegistryPath = Get-RegistryKeyPropertiesAndValues
- HKCU:SoftwareXYZABCAutostart | ft value -AutoSize
- $RegistryPath
- ForEach-Object {
- New-Object psobject -Property @{“property”=$_;
- $Value = Get-ItemProperty -Path
- {ExecuteCommand} $Value
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement