Windows Management

From Hornbill
Jump to navigation Jump to search
Home > Administration > IT Operations Management > ITOM Package Library > Windows Management Index

activedirectory_logo.png

Introduction

The 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.

Related Articles

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

Itomtarget keysafe.png

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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - Any warnings returned, in the event that the outcome is warn
  • displayName
  • 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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - Any warnings returned, in the event that the outcome is warn
  • value

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 Variable
  • EVValue (MANDATORY) - The Value for the Environment Variable

Output Parameters

  • outcome (MANDATORY) - Can be ok/warn/fail depending on the output of the operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - Any warnings returned, in the event that the outcome is warn
  • id
  • 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 operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 process
  • ArgumentList - Any arguments to pass to the process
  • RedirectStandardError - File that the Standard Error stream will be output to
  • RedirectStandardOutput - File that the Standard Output stream will be passed to
  • WorkingDirectory - The working directory for the process

Output Parameters

  • outcome (MANDATORY) - Can be ok/warn/fail depending on the output of the operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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/Unrestricted
  • Scope (MANDATORY) - MachinePolicy/UserPolicy/CurrentUser/LocalMachine

Output Parameters

  • outcome (MANDATORY) - Can be ok/warn/fail depending on the output of the operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 Rule
  • DisplayName - Display Name of the Firewall Rule
  • GroupName - Name of the Firewall Rule Group
  • GroupDisplayName - Display Name of the Firewall Rule Group
  • Direction - Inbound/Outbound

Output Parameters

  • outcome (MANDATORY) - Can be ok/warn/fail depending on the output of the operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 Rule
  • DisplayName - Display Name of the Firewall Rule
  • GroupName - Name of the Firewall Rule Group
  • GroupDisplayName - Display Name of the Firewall Rule Group
  • Direction - Inbound/Outbound

Output Parameters

  • outcome (MANDATORY) - Can be ok/warn/fail depending on the output of the operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 Rule
  • DisplayName - Display Name of the Firewall Rule

Output Parameters

  • outcome (MANDATORY) - Can be ok/warn/fail depending on the output of the operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - Any warnings returned, in the event that the outcome is warn
  • name - The Name of the Rule
  • displayName - The Display Name of the Rule
  • description - The Description of the Rule
  • displayGroup - The Display Name of the Group thqt the Rule is a member of
  • group - The Group that the Rule is a member of
  • enabled - Is the Rule enabled
  • profile - The Rule Profile
  • direction - The Direction of the Rule (Inbound/Outbound)
  • action - The Rule Action (Block/Allow)
  • owner - The Rule Owner
  • primaryStatus - The Primary Status of the Rule
  • enforcementStatus - The Enforcement Status of the Rule
  • policyStoreSource - The Policy Store Source
  • policyStoreSourceType - 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 Rule
  • DisplayName (MANDATORY) - Display Name of the Firewall Rule
  • Direction - The Direction of the Rule (Inbound/Outbound)
  • PolicyStore - The Policy Store
  • Description - The Description of the Rule
  • Group - The Group that the Rule is to be a member of
  • Enabled - Is the Rule enabled
  • Profile - The Rule Profile - Any/Domain/Private/Public/NotApplicable
  • Platform - The Rule Platform
  • Action - The Rule Action - NotConfigured/Block/Allow
  • EdgeTraversalPolicy - The Rule Edge Traversal Policy - Allow/Block/DeferToUser/DeferToApp
  • LooseSourceMapping - Use Loose Source Mapping
  • LocalOnlyMapping -Use Local Only Mapping
  • Owner - The Rule Owner
  • LocalAddress - The LocalAddress value
  • RemoteAddress - The Remote Address value
  • Protocol - The Protocol value
  • LocalPort - The Local Port value
  • RemotePort - The Remote Port Value
  • IcmpType - The ICMP Type codes
  • DynamicTarget - Defines a Dynamic Target - Any/ProximityApps/ProximitySharing/WifiDirectPrinting/WifiDirectDisplay/WifiDirectDevices
  • Program - The Program
  • Package - The Package
  • Service - The Service
  • InterfaceAlias - The Interface Alias
  • InterfaceType - The Interface Type - Any / Wired / Wireless / RemoteAccess
  • Encryption - Specifies if Encryption in authentication is required - NotRequired/Required/Dynamic
  • OverrideBlockRules - Override Block Rules

Output Parameters

  • outcome (MANDATORY) - Can be ok/warn/fail depending on the output of the operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - Any warnings returned, in the event that the outcome is warn
  • name - The Name of the Rule
  • displayName - 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 Rule
  • DisplayName - Display Name of the Firewall Rule

Output Parameters

  • outcome (MANDATORY) - Can be ok/warn/fail depending on the output of the operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - 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 Rule
  • DisplayName - Display Name of the Firewall Rule
  • GroupName - Name of the Firewall Rule Group
  • GroupDisplayName - Display Name of the Firewall Rule Group
  • NewDisplayName -The New Display Name of the Firewall Rule
  • Direction - The Direction of the Rule (Inbound/Outbound)
  • PolicyStore - The Policy Store
  • Description - The Description of the Rule
  • Enabled - Is the Rule enabled
  • Profile - The Rule Profile - Any/Domain/Private/Public/NotApplicable
  • Platform - The Rule Platform
  • Action - The Rule Action - NotConfigured/Block/Allow
  • EdgeTraversalPolicy - The Rule Edge Traversal Policy - Allow/Block/DeferToUser/DeferToApp
  • LooseSourceMapping - Use Loose Source Mapping
  • LocalOnlyMapping -Use Local Only Mapping
  • Owner - The Rule Owner
  • LocalAddress - The LocalAddress value
  • RemoteAddress - The Remote Address value
  • Protocol - The Protocol value
  • LocalPort - The Local Port value
  • RemotePort - The Remote Port Value
  • IcmpType - The ICMP Type codes
  • DynamicTarget - Defines a Dynamic Target - Any/ProximityApps/ProximitySharing/WifiDirectPrinting/WifiDirectDisplay/WifiDirectDevices
  • Program - The Program
  • Package - The Package
  • Service - The Service
  • InterfaceAlias - The Interface Alias
  • InterfaceType - The Interface Type - Any / Wired / Wireless / RemoteAccess
  • Encryption - Specifies if Encryption in authentication is required - NotRequired/Required/Dynamic
  • OverrideBlockRules - Override Block Rules

Output Parameters

  • outcome (MANDATORY) - Can be ok/warn/fail depending on the output of the operation
  • error - Any errors returned, in the event that the outcome is fail
  • warning - Any warnings returned, in the event that the outcome is warn