Windows Management
Home > Administration > IT Operations Management > ITOM Package Library > Windows Management | Index |
IntroductionThe Windows Management package for Hornbill's IT Operations Management (ITOM) contains operations to automate the management of Services, Processes, Environment Variables and PowerShell Execution Policies on target machines. |
|
Target Environment Requirements
Script Execution Machine Requirements
- If the script execution policy on the machine executing these operations is set to Restricted, then this will need to be updated to something less restrictive. If this is the case, you can use the Set Execution Policy operation within this package to update the Execution Policy on the target device before peforming any of the other operations.
KeySafe Configuration
When creating SIS jobs for operations contained within this package, they need to be run on the target machine as a user who has the correct privileges on the target.
To configure your Target Machine account authentication in KeySafe:
- In the Admin console, navigate to: System > Security > KeySafe;
- Click on + then select
Username + Password
; - Give the KeySafe Key a Title (this is the name/identifier for the target machine account as you will see it when creating an IT Automation Job, or adding an IT Automation node to a Business Process or Runbook);
- Optionally add a description;
- Populate the Username field with the domain/local account username for the account being used on the target machine;
- Populate the Password field with the password for the above account;
- Select Create Key to save.
Once you have created your KeySafe Key, you can then use it when creating IT Automation Jobs from this package. See screenshots to the right for examples.
Package Operations
The Windows Management package contains the following operations, than can be used to create ITOM Jobs directly, or included in your Business Processes and/or IT Operations Management Rubooks.
Services - Start
This operation will start a Service on a Windows device.
Extra Credentials
None required.
Input Parameters
ServiceName
(MANDATORY) - Name of the Service
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Services - Stop
This operation will stop a Service on a Windows device.
Extra Credentials
None required.
Input Parameters
ServiceName
(MANDATORY) - Name of the Service
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Services - Restart
This operation will restart a Service on a Windows device.
Extra Credentials
None required.
Input Parameters
ServiceName
(MANDATORY) - Name of the Service
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Services - Get
This operation will retrieve information about a Service on a Windows device.
Extra Credentials
None required.
Input Parameters
ServiceName
(MANDATORY) - Name of the Service
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warndisplayName
serviceType
status
startup
Services - Startup Disabled
This operation will set the Startup Type of a Service to Disabled on a Windows device.
Extra Credentials
None required.
Input Parameters
ServiceName
(MANDATORY) - Name of the Service
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Services - Startup Manual
This operation will set the Startup Type of a Service to Manual on a Windows device.
Extra Credentials
None required.
Input Parameters
ServiceName
(MANDATORY) - Name of the Service
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Services - Startup Automatic
This operation will set the Startup Type of a Service to Automatic on a Windows device.
Extra Credentials
None required.
Input Parameters
ServiceName
(MANDATORY) - Name of the Service
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Environment Variable - Get
This operation will retrieve the value of an Environment Variable on a Windows device.
Extra Credentials
None required.
Input Parameters
EVName
(MANDATORY) - Name of the Environment Variable
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warnvalue
Environment Variable - Set
This operation will create or overwrite the value of a System Environment Variable on a Windows device.
Extra Credentials
None required.
Input Parameters
EVName
(MANDATORY) - Name of the Environment VariableEVValue
(MANDATORY) - The Value for the Environment Variable
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Environment Variable - Delete
This operation will delete a System Environment Variable on a Windows device.
Extra Credentials
None required.
Input Parameters
EVName
(MANDATORY) - Name of the Environment Variable
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Process - Get
This operation will retrieve the details about a running process on a Windows device. If more than one processes are found, the operation will return details about the first one found.
Extra Credentials
None required.
Input Parameters
ProcName
(MANDATORY) - Name of the Process
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warnid
name
handles
userName
ws
vm
cpu
pm
npm
Process - End
This operation will end a running process on a Windows device. If more than one processes are found using the given name, then the operation will end the first one found.
Extra Credentials
None required.
Input Parameters
ProcName
(MANDATORY) - Name of the process
Optional (decimal) - GracefulTime - The number of seconds to allow the graceful shutdown of the process, before hard-killing it
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Process - Start
This operation will start a running process on a Windows device.
Extra Credentials
None required.
Input Parameters
FilePath
(MANDATORY) - The filepath of the processArgumentList
- Any arguments to pass to the processRedirectStandardError
- File that the Standard Error stream will be output toRedirectStandardOutput
- File that the Standard Output stream will be passed toWorkingDirectory - The
working directory for the process
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Set Execution Policy
This operation will set the PowerShell Execution Policy on a Windows device.
Extra Credentials
None required.
Input Parameters
ExecPolicy
(MANDATORY) - AllSigned/Bypass/Default/RemoteSigned/Restricted/Undefined/UnrestrictedScope
(MANDATORY) - MachinePolicy/UserPolicy/CurrentUser/LocalMachine
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Firewall - Rule Disable
Disables a Windows Firewall Rule, or Group of Rules.
One of Name, DisplayName, GroupName or GroupDisplayName must be provided, and will be used to disable the specified Firewall Rule or Group of Rules.
See the Disable-NetFirewallRule cmdlet documentation for more information: https://docs.microsoft.com/en-us/powershell/module/netsecurity/disable-netfirewallrule?view=win10-ps
Extra Credentials
None required.
Input Parameters
Name
- Name of the Firewall RuleDisplayName
- Display Name of the Firewall RuleGroupName
- Name of the Firewall Rule GroupGroupDisplayName
- Display Name of the Firewall Rule GroupDirection
- Inbound/Outbound
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Firewall - Rule Enable
Enables a Windows Firewall Rule, or Group of Rules.
One of Name, DisplayName, GroupName or GroupDisplayName must be provided, and will be used to enable the specified Firewall Rule or Group of Rules.
See the Enable-NetFirewallRule cmdlet documentation for more information: https://docs.microsoft.com/en-us/powershell/module/netsecurity/enable-netfirewallrule?view=win10-ps
Extra Credentials
None required.
Input Parameters
Name
- Name of the Firewall RuleDisplayName
- Display Name of the Firewall RuleGroupName
- Name of the Firewall Rule GroupGroupDisplayName
- Display Name of the Firewall Rule GroupDirection
- Inbound/Outbound
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Firewall - Rule Get
Retrieves details about a Windows Firewall Rule.
One of Name or DisplayName must be provided.
See the Get-NetFirewallRule cmdlet documentation for more information: https://docs.microsoft.com/en-us/powershell/module/netsecurity/get-netfirewallrule?view=win10-ps
Extra Credentials
None required.
Input Parameters
Name
- Name of the Firewall RuleDisplayName
- Display Name of the Firewall Rule
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warnname
- The Name of the RuledisplayName
- The Display Name of the Ruledescription
- The Description of the RuledisplayGroup
- The Display Name of the Group thqt the Rule is a member ofgroup
- The Group that the Rule is a member ofenabled
- Is the Rule enabledprofile
- The Rule Profiledirection
- The Direction of the Rule (Inbound/Outbound)action
- The Rule Action (Block/Allow)owner
- The Rule OwnerprimaryStatus
- The Primary Status of the RuleenforcementStatus
- The Enforcement Status of the RulepolicyStoreSource
- The Policy Store SourcepolicyStoreSourceType
- The Policy Store Source Type
Firewall - Rule New
Creates a new Windows Firewall Rule.
See the New-NetFirewallRule cmdlet documentation for more information: https://docs.microsoft.com/en-us/powershell/module/netsecurity/new-netfirewallrule?view=win10-ps
Extra Credentials
None required.
Input Parameters
Name
- Name of the Firewall RuleDisplayName
(MANDATORY) - Display Name of the Firewall RuleDirection
- The Direction of the Rule (Inbound/Outbound)PolicyStore
- The Policy StoreDescription
- The Description of the RuleGroup
- The Group that the Rule is to be a member ofEnabled
- Is the Rule enabledProfile
- The Rule Profile - Any/Domain/Private/Public/NotApplicablePlatform
- The Rule PlatformAction
- The Rule Action - NotConfigured/Block/AllowEdgeTraversalPolicy
- The Rule Edge Traversal Policy - Allow/Block/DeferToUser/DeferToAppLooseSourceMapping
- Use Loose Source MappingLocalOnlyMapping
-Use Local Only MappingOwner
- The Rule OwnerLocalAddress
- The LocalAddress valueRemoteAddress
- The Remote Address valueProtocol
- The Protocol valueLocalPort
- The Local Port valueRemotePort
- The Remote Port ValueIcmpType
- The ICMP Type codesDynamicTarget
- Defines a Dynamic Target - Any/ProximityApps/ProximitySharing/WifiDirectPrinting/WifiDirectDisplay/WifiDirectDevicesProgram
- The ProgramPackage
- The PackageService
- The ServiceInterfaceAlias
- The Interface AliasInterfaceType
- The Interface Type - Any / Wired / Wireless / RemoteAccessEncryption
- Specifies if Encryption in authentication is required - NotRequired/Required/DynamicOverrideBlockRules
- Override Block Rules
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warnname
- The Name of the RuledisplayName
- The Display Name of the Rule
Firewall - Rule Remove
Deletes a Windows Firewall Rule.
One of Name or DisplayName must be provided.
See the Remove-NetFirewallRule cmdlet documentation for more information: https://docs.microsoft.com/en-us/powershell/module/netsecurity/remove-netfirewallrule?view=win10-ps
Extra Credentials
None required.
Input Parameters
Name
- Name of the Firewall RuleDisplayName
- Display Name of the Firewall Rule
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn
Firewall - Rule Update
Updates an existing Windows Firewall Rule.
One of Name, DisplayName, GroupName or GroupDisplayName must be provided, and will be used to update the specified Firewall Rule or Group of Rules.
See the Set-NetFirewallRule cmdlet documentation for more information: https://docs.microsoft.com/en-us/powershell/module/netsecurity/set-netfirewallrule?view=win10-ps
Extra Credentials
None required.
Input Parameters
Name
- Name of the Firewall RuleDisplayName
- Display Name of the Firewall RuleGroupName
- Name of the Firewall Rule GroupGroupDisplayName
- Display Name of the Firewall Rule GroupNewDisplayName
-The New Display Name of the Firewall RuleDirection
- The Direction of the Rule (Inbound/Outbound)PolicyStore
- The Policy StoreDescription
- The Description of the RuleEnabled
- Is the Rule enabledProfile
- The Rule Profile - Any/Domain/Private/Public/NotApplicablePlatform
- The Rule PlatformAction
- The Rule Action - NotConfigured/Block/AllowEdgeTraversalPolicy
- The Rule Edge Traversal Policy - Allow/Block/DeferToUser/DeferToAppLooseSourceMapping
- Use Loose Source MappingLocalOnlyMapping
-Use Local Only MappingOwner
- The Rule OwnerLocalAddress
- The LocalAddress valueRemoteAddress
- The Remote Address valueProtocol
- The Protocol valueLocalPort
- The Local Port valueRemotePort
- The Remote Port ValueIcmpType
- The ICMP Type codesDynamicTarget
- Defines a Dynamic Target - Any/ProximityApps/ProximitySharing/WifiDirectPrinting/WifiDirectDisplay/WifiDirectDevicesProgram
- The ProgramPackage
- The PackageService
- The ServiceInterfaceAlias
- The Interface AliasInterfaceType
- The Interface Type - Any / Wired / Wireless / RemoteAccessEncryption
- Specifies if Encryption in authentication is required - NotRequired/Required/DynamicOverrideBlockRules
- Override Block Rules
Output Parameters
outcome
(MANDATORY) - Can be ok/warn/fail depending on the output of the operationerror
- Any errors returned, in the event that the outcome is failwarning
- Any warnings returned, in the event that the outcome is warn