dbeckwitt Posted August 20, 2019 Posted August 20, 2019 I've written a script to scan the network and insert all existing active IP addresses to the proper location in the registry, however Pulseway manager doesn't pick that up (even on service restart). Where do I need to insert those changes? Sample script below- It relys on a txt file for a list of active IP's (generated separately) cls # Remove any existing registry entries $ExistingKeys = Get-ChildItem "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\" | Select-Object -expand Name $Count = 0 ForEach ($Key in $ExistingKeys){ Remove-Item "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\Device$Count" $Count++ } #Load List of IP's to monitor and insert values into registry $IPList = Get-Content "C:\updates\IPList.txt" $Count = 0; foreach ($IP in $IPList) { New-Item "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\Device$Count"; Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\Device$Count" -Name ("Address") -Type String -Value $IP; Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\Device$Count" -Name ("AliasName") -Type String -Value "Camera $Count"; Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\Device$Count" -Name ("Priority1") -Type String -Value 2; Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\Device$Count" -Name ("Priority2") -Type String -Value 1; Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\Device$Count" -Name ("ResponseMinutes") -Type String -Value 1; Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\Device$Count" -Name ("ResponseTime") -Type String -Value 300; Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\DevicesPingResponses\Device$Count" -Name ("UseAlias") -Type String -Value 0; $Count++ } exit 0;
Staff Chris Posted August 21, 2019 Staff Posted August 21, 2019 Hi @dbeckwitt, You will need to update the count of currently active Ping monitoring under that registry key. HKEY_LOCAL_MACHINE\SOFTWARE\MMSOFT Design\PC Monitor\DevicesPingResponses\Count
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now