PowerShell Scripts

The following PowerShell scripts are included with SQDR and illustrate the use of the PowerShell cmdlets in the assembly SQDRPowerShell.dll. See the technical document Automating SQDR tasks using PowerShell for additional details about using PowerShell with SQDR.

PowerShell 5.1 or later is required.  

Usage is documented as a comment at the beginning of each script. All of them default to connecting to the local SQDR service (127.0.0.1:7738) if the optional final parameter (host:port) is not specified.

If RBAC (Role Based Access Control) is enabled, you will need to supply credentials as part of the connection string - myuser:mypassword@host:port. For example myuser:mypassword@127.0.0.1:7738.

Some of these PowerShell scripts are used by the supplied VBScript scripts such as TargetChecker.vbs and PauseResumeIRGroup.vbs.

Actions (run, pause, resume)

The syntax for these commands are similar e.g.

Usage:
PS> ./pause-grp <IRGroupName> [host:port]"

SQL wild card % may be used within the IRGroupName

Configuration

Usage:
PS> ./dltsub <Source> <SubscriptionName> [host:port]"

Usage
PS> ./movesub <Source> <SubscriptionName> <ToGroup> [host:port]

 

Checking Status

Usage
PS> ./chksubs <IRGroupName> <SubscriptionName> [host:port]"

The SQL wild card character % may be used within the IRGroupName and SubscriptionName parameters

Usage
PS> ./show-irgrp  [host:port]