Snow Inventory Agent Script - Collect custom registry keys 4
Here you can find the release notes for Snow Inventory Agent Script - Collect custom registry keys 4.
4.2.0 latest
Release date: 2024-08-21
COMPATIBLE VERSIONS
Snow Inventory Agent for Windows | Microsoft PowerShell |
---|---|
5 or later | 3 and later |
INFORMATION
The Scan-CustomRegistry.ps1
script improves the out-of-the-box functionality of the Snow Inventory Agent for Windows and allows the inventory of additional registry keys without interfering with the default registry keys queried by the Agent itself.
The script must be executed as part of the Snow Inventory Agent for Windows, according to the topic Running PowerShell scripts as part of the scanning process on Snow Docs. Otherwise the results will not be included in the snowpack.
In the case that you want to run a manual scan, this script must be executed with appropriate permissions, so execute it using only sc.exe control SnowInventoryAgent5 128
, as described in the Windows Agent - Command line topic on Snow Docs.
For debugging purposes, the script can be executed manually and supports common parameters, so you will receive detailed Logs using the command Scan-CustomRegistry.ps1 -Debug -InformationAction 'Continue'
.
Function
The script requires a keys.csv
file to be present in the same folder as the script. The file needs to be semicolon separated and requires the header key;property;lognotfound
, that needs to be part of that file.
key
- supports
*
as a placeholder where it uses Get-ChildItem to resolve the Path - supports PSDrive and PsProvider::PsPath style. more on About Registry Provider
property
- property to look for
ognotfound (optional)
- This column is optional. It accepts the values
true
andfalse
. If set totrue
, the script will report a<CustomRegKey>
with thekey
set toHKEY_LOCAL_MACHINE\SOFTWARE\Snow Software\Scan-CustomRegistry[Key number]
and- if the key is not present: The
property
set to the requested and the thevalue
askey not found
- if the property is not present: The
property
set to the requested and thevalue
asproperty not found
- if the key is not present: The
Example keys.csv
key;property;lognotfound
HKLM:\SOFTWARE\7-Zip;TestName;true
HKLM:\SOFTWARE\7-Zip;Path64;false
Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Powershell\*\PowershellEngine;PowerShellVersion;false
HKCU:\SOFTWARE\TeamViewer;MRU;true
HKLM:\SOFTWARE\DaxStudio;ExcelBitness;true
HKLM:\SOFTWARE\Snow Software\Inventory Provider\*;NextScheduledRun;true
This script scans for the keys and properties using Get-ItemProperty. They will be included in the Agent snowpack as <CustomRegKey>
. They also will be included as <Software>
using the key
as pathName
, property
as manufacturer
and value
as name
, so custom software recognition rules can be created to handle them.
MediumIntegrity
This script does not need medium integrity to access most registry keys. If you require that functionality, the #MediumIntegrityLevel
comment needs to be added to the script and the script needs to be resigned with a valid signature.
Troubleshooting
Not all users have access to all keys. If you receive Requested registry access is not allowed
messages. Try to elevate.
Depending on the registry keys to query, custom encryption might need to be applied in Snow Inventory Agent for Windows prior to version 7, as it will not be executed in medium integrity.
NEW
- Found registry values will also be reported as
<Software>
rows.
FIXED
- When a property is not found, and the
lognotfound
option is set totrue
, the script now returnsproperty not found
correctly. - When a key is not found, and the
lognotfound
option is set totrue
, the script now returnskey not found
correctly.
DEPRECATED
- There will be no encrypted snow-ps1 version of this script provided by Snow Software
4.1.0
Release date: 2024-05-08
COMPATIBLE VERSIONS
Snow Inventory Agent for Windows | Microsoft PowerShell |
---|---|
5 or later | 3 and later |
INFORMATION
The Scan-CustomRegistry.ps1
script improves the out-of-the-box functionality of the Snow Inventory Agent for Windows and allows the inventory of additional registry keys without interfering with the default registry keys queried by the Agent itself.
The script must be executed as part of the Snow Inventory Agent for Windows, according to the topic Running PowerShell scripts as part of the scanning process on Snow Docs. Otherwise the results will not be included in the snowpack.
In the case that you want to run a manual scan, this script must be executed with appropriate permissions, so execute it using only sc.exe control SnowInventoryAgent5 128
, as described in the Windows Agent - Command line topic on Snow Docs.
For debugging purposes, the script can be executed manually and supports common parameters, so you will receive detailed Logs using the command Scan-CustomRegistry.ps1 -Debug -InformationAction 'Continue'
.
Function
The script requires a keys.csv
file to be present in the same folder as the script. The file needs to be semicolon separated and requires the header key;property;lognotfound
, that needs to be part of that file.
key
- supports
*
as a placeholder where it uses Get-ChildItem to resolve the Path - supports PSDrive and PsProvider::PsPath style. more on About Registry Provider
property
- property to look for
lognotfound (optional)
- This column is optional. It accepts the values
true
andfalse
. if not present or set totrue
, the script will report a registry key with the keyHKEY_LOCAL_MACHINE\SOFTWARE\Snow Software
the desired property and the valueproperty not found
.
Example keys.csv
key;property;value
HKLM:\SOFTWARE\7-Zip;TestName;true
HKLM:\SOFTWARE\7-Zip;Path64;false
Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Powershell\*\PowershellEngine;PowerShellVersion;false
HKCU:\SOFTWARE\TeamViewer;MRU;true
HKLM:\SOFTWARE\DaxStudio;ExcelBitness;true
HKLM:\SOFTWARE\Snow Software\Inventory Provider\*;NextScheduledRun;true
This script scans for the keys and properties using Get-ItemProperty. They will be included in the Agent snowpack as <CustomRegKey>
.
MediumIntegrity
This script does not need medium integrity to access most registry keys. If you require that functionality, the #MediumIntegrityLevel
comment needs to be added to the script and the script needs to be resigned with a valid signature.
Troubleshooting
Not all users have access to all keys. If you receive Requested registry access is not allowed
messages. Try to elevate.
Depending on the registry keys to query, custom encryption might need to be applied in Snow Inventory Agent for Windows prior to version 7, as it will not be executed in medium integrity.
CORRECTIONS
- File encoding changed to UTF-8-BOM to prevent HashMismatch errors (04771125).
DEPRECATED
- There will be no encrypted snow-ps1 version of this script provided by Snow Software
4.0
Release date: 2024-02-08
COMPATIBLE VERSIONS
Snow Inventory Agent for Windows | Microsoft PowerShell |
---|---|
5 or later | 3 and later |
INFORMATION
The Scan-CustomRegistry.ps1
script improves the out-of-the-box functionality of the Snow Inventory Agent for Windows and allows the inventory of additional registry keys without interfering with the default registry keys queried by the agent itself.
The script must be executed as part of the Snow Inventory Agent for Windows, according to the topic Running PowerShell scripts as part of the scanning process on Snow Docs. Otherwise the results will not be included in the snowpack.
In the case that you want to run a manual scan, this script must be executed with appropriate permissions, so execute it using only sc.exe control SnowInventoryAgent5 128
, as described in the Windows Agent - Command line topic on Snow Docs.
For debugging purposes, the script can be executed manually and supports common parameters, so you will receive detailed logs using the command Scan-CustomRegistry.ps1 -Debug -InformationAction 'Continue'
.
Function
The script requires a keys.csv
file to be present in the same folder as the script. The file needs to be semicolon separated and requires the header key;property;lognotfound
, that needs to be part of that file.
key
- supports
*
as a placeholder where it uses Get-ChildItem to resolve the Path - supports PSDrive and PsProvider::PsPath style. more on About Registry Provider
property
- property to look for
lognotfound (optional)
- This column is optional. It accepts the values
true
andfalse
. if not present or set totrue
, the script will report a registry key with the keyHKEY_LOCAL_MACHINE\SOFTWARE\Snow Software
the desired property and the valueproperty not found
.
Example keys.csv
key;property;value
HKLM:\SOFTWARE\7-Zip;TestName;true
HKLM:\SOFTWARE\7-Zip;Path64;false
Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Powershell\*\PowershellEngine;PowerShellVersion;false
HKCU:\SOFTWARE\TeamViewer;MRU;true
HKLM:\SOFTWARE\DaxStudio;ExcelBitness;true
HKLM:\SOFTWARE\Snow Software\Inventory Provider\*;NextScheduledRun;true
This script scans for the keys and properties using Get-ItemProperty. They will be included in the agent snowpack as <CustomRegKey>
.
MediumIntegrity
This script does not need medium integrity to access most registry keys. If you require that functionality, the #MediumIntegrityLevel
comment needs to be added to the script and the script needs to be resigned with a valid signature.
Troubleshooting
Not all users have access to all keys. If you receive Requested registry access is not allowed
messages. Try to elevate.
Depending on the registry keys to query, custom encryption might need to be applied in Snow Inventory Agent for Windows prior to version 7, as it will not be executed in medium integrity.
NEW
- Snow Inventory Agent for Windows 7 support.
- The script is now signed by Snow Software AB.
DEPRECATED
- There will be no encrypted snow-ps1 version of this script provided by Snow Software
Flexera does not own the third party trademarks, software, products, or tools (collectively, the "Third Party Products") referenced herein. Third Party Product updates, including user interface updates, may not be reflected in this content.