<WriteActionModuleType ID="URLGenie.DisableWatcherNode.POSH.Write.DS" Accessibility="Internal" Batching="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="KeyName" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" minOccurs="1" name="TimeoutSeconds" type="xsd:integer"/>
</Configuration>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<WriteAction ID="POSH" TypeID="Windows!Microsoft.Windows.PowerShellWriteAction">
<ScriptName>DisableURLGenieWatcher.ps1</ScriptName>
<ScriptBody><Script>#========================================================================
# Created on: 5/14/2013 6:23 PM
# Created by: Tyson Paul ( https://blogs.msdn.microsoft.com/tysonpaul/ )
# Organization:
# Filename: DisableURLGenieWatcher.ps1
# Version: 2018.08.07: Small formatting changes.
# 2013.5.14.1823: Original
# Description: Will remove registry key and value/data so host will NOT be detected as URLGenie watcher node
#========================================================================
Param(
[string]$Keyname='SOFTWARE\Microsoft\Microsoft Operations Manager\MP\URLGenie\MgmtGroups\$Target/ManagementGroup/Name$' # Name/path of registry key under which to create the entry/string for the config file folder path.
)
###############################################################################
# Function: Test-RegSubKey
# Description: Test the existence of the registry key
# Return Value: True/false respectively
Function Test-RegSubKey{
Param(
[string]$server = ".",
[string]$hive,
[string]$keyName
)