Approve Manual Agents based on agents computer name and domain name regular expression match
The “OpsMgr 2012 Self Maintenance Approve Manual Agents Rule” runs on a schedule and approve manually installed agents of which computer name and domain name match the configurable computer name and domain name regular expression.
This rule can be customized using overrides:
IntervalMinutes: How often (in minutes) does this rule run.
AgentNameRegex: Regular Expression for acceptable Agent computer names
AgentDomainRegex: Regular Expression for acceptable Agent domain names
MaxToApprove: Maxinum number of manually installed agents to be approved at a time.
SyncTime: What time does this rule run.
TimeoutSeconds: Timeout in seconds for the PowerShell script inside the rule.
This rule will approve manually installed agents (up to the number configured for MaxToAPprove) if both agent's computer name and domain name match configured regular expressions.
An information alert is generated if the rule has approved at least one (1) agent(s).
No further actions are required.
Target | Microsoft.SystemCenter.AllManagementServersPool | ||
Category | Operations | ||
Enabled | False | ||
Alert Generate | True | ||
Alert Severity | Information | ||
Alert Priority | Low | ||
Remotable | True | ||
Alert Message |
|
ID | Module Type | TypeId | RunAs |
---|---|---|---|
DS | DataSource | OpsMgr.2012.Self.Maintenance.Approve.Manual.Agents.DataSource | Default |
FilterResult | ConditionDetection | System.ExpressionFilter | Default |
GenerateAlert | WriteAction | System.Health.GenerateAlert | Default |
<Rule ID="OpsMgr.2012.Self.Maintenance.Approve.Manual.Agents.Rule" Target="SC!Microsoft.SystemCenter.AllManagementServersPool" Enabled="false" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Operations</Category>
<DataSources>
<DataSource ID="DS" TypeID="OpsMgr.2012.Self.Maintenance.Approve.Manual.Agents.DataSource">
<IntervalMinutes>15</IntervalMinutes>
<AgentNameRegex>ENTER AGENT NAME REGULAR EXPRESSION</AgentNameRegex>
<AgentDomainRegex>ENTER AGENT DOMAIN REGULAR EXPRESSION</AgentDomainRegex>
<MaxToApprove>0</MaxToApprove>
<TimeoutSeconds>120</TimeoutSeconds>
</DataSource>
</DataSources>
<ConditionDetection ID="FilterResult" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">Property[@Name='ApprovedCount']</XPathQuery>
</ValueExpression>
<Operator>Greater</Operator>
<ValueExpression>
<Value Type="Integer">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
<WriteActions>
<WriteAction ID="GenerateAlert" TypeID="Health!System.Health.GenerateAlert">
<Priority>0</Priority>
<Severity>0</Severity>
<AlertMessageId>$MPElement[Name="OpsMgr.2012.Self.Maintenance.Approve.Manual.Agents.Rule.AlertMessage"]$</AlertMessageId>
<AlertParameters>
<AlertParameter1>$Data/Property[@Name='AgentNameRegex']$</AlertParameter1>
<AlertParameter2>$Data/Property[@Name='AgentDomainRegex']$</AlertParameter2>
<AlertParameter3>$Data/Property[@Name='ApprovedComputers']$</AlertParameter3>
<AlertParameter4>$Data/Property[@Name='ApprovedCount']$</AlertParameter4>
<AlertParameter5>$Data/Property[@Name='MaxToApprove']$</AlertParameter5>
</AlertParameters>
</WriteAction>
</WriteActions>
</Rule>