Mark Minasi's Tech Forum
Register Calendar Latest Topics Chat
 
 
 


Reply
  Author   Comment  
jsclmedave

Administrator
Registered:
Posts: 445
Reply with quote  #1 
We have some servers using a SolarWinds Application called WPM.  These "Player" Servers have some specific settings that if changed, will cause the application to fail and start creating alerts that Web Sites are not responding.

So the purpose of this script is to check those settings - when needed - to ensure that the they are still set correctly.

One of the settings on SOME of the players, is the entry of the REG Key - 


IE11_8888.gif 


Default Setting for this key -

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

Name: SolarWinds.SEUM.Agent.Worker.exe
Type: REG_DWORD
Data: 0x00002af8 (11000)


However, on "some" of the players that are targeting specific Web Site for monitoring purposes this value needs to be changed to 8888


HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BROWSER_EMULATION

Name: SolarWinds.SEUM.Agent.Worker.exe
Type: REG_DWORD
Data: 0x000022b8 (8888)

I am able to get the DWORD value specifying that the Key exists but not the actual Data Value which I need to verify is 0x000022b8 (8888)


Code:

$opt = New-CimSessionOption -Protocol Dcom
$csvalue = New-CimSession -ComputerName ServerA -SessionOption $opt
$IE118888HKLM=2147483650
$IE118888REGcim = Get-CimClass -Namespace root\default -class StdRegProv -CimSession $csvalue
$IE118888value = 'SolarWinds.SEUM.Recorder.exe'
$IE118888Path = 'SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION'
$IE118888enumArgs = @{hDefKey=$IE118888HKLM;sSubKeyName=$IE118888Path}
$IE118888paramHash = @{
cimclass = $IE118888REGcim
CimSession = $csvalue
Name = 'GetDWORDValue'
Arguments = $IE118888enumArgs}
Invoke-CimMethod @IE118888paramHash | Select-Object ReturnValue
ReturnValue
-----------
          1



I have tried adding the $IE118888value = 'SolarWinds.SEUM.Recorder.exe' and adding it to the Arg - $IE118888enumArgs = @{hDefKey=$IE118888HKLM;sSubKeyName=$IE118888Path;sValueName=$IE118888value} but it still will not show what the Data Value is.


Do I need a Foreach like in Jeff Example pulling the Software Loaded Onto a PC..?
https://www.petri.com/powershell-problem-solver-finding-installed-software-part-4

Ive tried several things and none of them are working. 

I know I had this sorted out before, but I cannot find my notes on how I figured out which value to pull and when and from where...

I know the exact location for the Data Value I just cannot for the life of me remember how to GET that Data Value...



Thanks in Advance!!


__________________
Tim Bolton @jsclmedave
Email: [string](0..20|%{[char][int](32+('527377347976847978324785847679797514357977').substring(($_*2),2))}) -replace ' '  

New to the forum? Please Read this
0
jsclmedave

Administrator
Registered:
Posts: 445
Reply with quote  #2 
It's now working...


Code:



$opt = New-CimSessionOption -Protocol Dcom
$csvalue = New-CimSession -ComputerName localHost -SessionOption $opt
$IE118888HKLM=2147483650
$IE118888REGcim = Get-CimClass -Namespace root\default -class StdRegProv -CimSession $csvalue
$IE118888value = "SolarWinds.SEUM.Agent.Worker.exe"
$IE118888Path = 'SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BROWSER_EMULATION'
$IE118888enumArgs = @{hDefKey=$IE118888HKLM;sSubKeyName=$IE118888Path;sValueName=$IE118888value}
$IE118888paramHash = @{
cimclass = $IE118888REGcim
CimSession = $csvalue
Name = 'GetDWORDValue'
Arguments = $IE118888enumArgs}
$IE8888 = Invoke-CimMethod @IE118888paramHash | Select uValue

$IE8888.uValue


8888




I placed the $IE118888value in Double Quotes " "   - $IE118888value = "SolarWinds.SEUM.Agent.Worker.exe"

And 

Re-Added the sValueName=$IE118888value

$IE118888enumArgs = @{hDefKey=$IE118888HKLM;sSubKeyName=$IE118888Path;sValueName=$IE118888value}






__________________
Tim Bolton @jsclmedave
Email: [string](0..20|%{[char][int](32+('527377347976847978324785847679797514357977').substring(($_*2),2))}) -replace ' '  

New to the forum? Please Read this
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.