A PowerShell Changes operation executes a given PowerShell script and determines whether there are changes based on whether the script returns
This operation allows users to define their own custom change detection mechanism for operation lists that cannot be described through the current set of agents.
There are a number of technologies that the PowerShell Script is dependant on. Specifically:
- PowerShell needs to be installed on the host machine of the UNIFYNow Service installation
The PowerShell Changes operation is used to describe whether an operation list should continue into its list of standard operations. It can be used in place of standard change detection mechanisms (e.g. the Active Directory Changes operation) for target systems that cannot be described with the available agents / operations.
Whether or not to continue is defined by whether the script returns a true or false in the global context of the script, which can be represented in any of the following manners:
return $true; return $false; return 1; return 0; return "True"; return "False";
In addition to the common operation configurations shared by all Changes Operations, the PowerShell Changes operation requires the following by way of configuration:
|Script||The plain-text PowerShell script to be executed. If the script returns
The following are a few examples to get started:
Changes have occurred if a file exists
return Test-Path 'C:\log\deltafile.txt';
Changes always occur
Compare the current and last changes with hypothetical methods LastChange and CurrentChange.
$currentChange = CurrentChange(); return $currentChange != $lastChange;
Customer support service by UserEcho