New-TssDiscoveryAccountRule

SYNOPSIS

Create a Discovery account rule

SYNTAX

New-TssDiscoveryAccountRule [-TssSession] <Session> [-AccountAlerts] [-AccountNameContains <String>]
 [-ActionCreateSecrets] [-ComputerNameContains <String>] [-CurrentPassphrase <SecureString>]
 [-CurrentPassword <SecureString>] [-CurrentPrivateKey <SecureString>] -DiscoverySourceId <Int32>
 [-FilterFields <Object[]>] [-FolderId <Int32>] [-ImportOnlyPolledLastScan] [-IncludeChildOUs] [-IsActive]
 [-MatchingCondition <String>] [-NewPassword <SecureString>] [-OperatingSystemContains <String>]
 [-OrganizationUnitId <Int32>] [-PasswordChangingPrivilegedAccountSecretId <Int32[]>]
 [-PasswordChangingType <String>] [-PasswordOption <String>] -RuleDescription <String> -RuleName <String>
 -ScanTemplateId <Int32> [-SecretNamePattern <String>] [-SecretPermissions <String>]
 [-SecretTemplateId <Int32>] [-SiteId <Int32>] [-SubscribedSpecificGroupId <Int32[]>]
 [-SubscriberType <String>] [-TakeOverAccountType <String>] [-TakeOverPasswordTypeId <Int32>]
 [-TakeoverSecretId <Int32[]>] [-TakeOverThreshold <Int32>] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

Creates a Discovery account rule that matches discovered accounts of one discovery source by scan template, organizational unit and name filters, and optionally creates secrets for them. Returns the created rule.

EXAMPLES

EXAMPLE 1

$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
New-TssDiscoveryAccountRule -TssSession $session -RuleName 'Local admins' -RuleDescription 'Local admin accounts' -DiscoverySourceId 1 -ScanTemplateId 1 -AccountNameContains admin -IsActive

Create an active rule that matches local accounts whose name contains admin

EXAMPLE 2

$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
New-TssDiscoveryAccountRule -TssSession $session -RuleName 'Import service accounts' -RuleDescription 'Imports service accounts' -DiscoverySourceId 1 -ScanTemplateId 1 -ActionCreateSecrets -SecretTemplateId 6003 -FolderId 12 -SiteId 1 -PasswordOption Current -SecretPermissions InheritPermission

Create a rule that imports matched accounts of discovery source 1 into folder 12

PARAMETERS

-TssSession

TssSession object created by New-TssSession for authentication

Type: Session
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-AccountAlerts

Send an alert to the subscribers when the rule matches new accounts

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-AccountNameContains

Only match accounts whose name contains this text

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ActionCreateSecrets

Create secrets for matched accounts. Requires PasswordOption, SecretPermissions and SiteId

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-ComputerNameContains

Only match computers whose name contains this text

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CurrentPassphrase

Passphrase of the current private key, when PasswordOption is PrivateKey

Type: SecureString
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CurrentPassword

Current password to store in created secrets, when PasswordOption is Current

Type: SecureString
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-CurrentPrivateKey

Current private key to store in created secrets, when PasswordOption is PrivateKey

Type: SecureString
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DiscoverySourceId

Discovery source the rule applies to

Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-FilterFields

Dynamic filters for the scan template: objects or hashtables with scanItemFieldId (int) and filterFieldValue (string)

Type: Object[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-FolderId

Folder where created secrets go

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-ImportOnlyPolledLastScan

Only import accounts found by the last scan

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-IncludeChildOUs

Include child organizational units of OrganizationUnitId

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-IsActive

Make the rule active

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-MatchingCondition

How ComputerNameContains and AccountNameContains combine: And or Or

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-NewPassword

New password to set, when PasswordOption is ChangeTo

Type: SecureString
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OperatingSystemContains

Only match computers whose operating system contains this text

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OrganizationUnitId

Limit the rule to one organizational unit

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-PasswordChangingPrivilegedAccountSecretId

Secret ids of the privileged accounts used to change passwords, when PasswordChangingType is PrivilegedAccount

Type: Int32[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PasswordChangingType

Credentials used to change passwords: SecretCredentials or PrivilegedAccount

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-PasswordOption

What password created secrets get: Current, ChangeTo, Random, PrivateKey or PublicKey

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleDescription

Rule description

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-RuleName

Rule name

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ScanTemplateId

Scan template the rule applies to

Type: Int32
Parameter Sets: (All)
Aliases:

Required: True
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SecretNamePattern

Pattern used to name created secrets

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecretPermissions

How created secrets get permissions: InheritPermission or CopyPermission

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SecretTemplateId

Secret template used for created secrets

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SiteId

Site used for created secrets

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-SubscribedSpecificGroupId

Group ids that receive alerts, when SubscriberType is SpecificUsers

Type: Int32[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-SubscriberType

Who receives alerts: Admins or SpecificUsers

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TakeOverAccountType

Takeover account mode: Single or Multiple

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TakeOverPasswordTypeId

Password type id used for takeover

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-TakeoverSecretId

Secret ids of the accounts used for takeover

Type: Int32[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TakeOverThreshold

Takeover threshold

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: 0
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

Thycotic.PowerShell.Discovery.AccountRule

NOTES

Requires TssSession object returned by New-TssSession

https://thycotic-ps.github.io/thycotic.secretserver/commands/discovery/New-TssDiscoveryAccountRule

https://github.com/thycotic-ps/thycotic.secretserver/blob/main/src/functions/discovery/New-TssDiscoveryAccountRule.ps1


Thycotic.SecretServer PowerShell Module — Not supported under any Delinea support agreement.

This site uses Just the Docs, a documentation theme for Jekyll.