Skip to content

Commit

Permalink
Set-TssDistributedEngineSite - corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmelton committed Oct 15, 2021
1 parent 9598175 commit 1952309
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 5 deletions.
29 changes: 26 additions & 3 deletions docs/commands/distributed-engines/Set-TssDistributedEngineSite.md
Expand Up @@ -6,7 +6,7 @@ Adjust Site configuration options
## SYNTAX

```
Set-TssDistributedEngineSite [-TssSession] <Session> [-Id] <Int32[]> [-SiteName <String>]
Set-TssDistributedEngineSite [-TssSession] <Session> [-Id] <Int32[]> [-SiteName <String>] [-Active]
[-WinRmEndpoint <String>] [-EnableCredSsp] [-PowerShellRunAsSecret <Int32>] [-EnableRdpProxy]
[-RdpProxyPort <Int32>] [-EnableSshProxy] [-SshProxyPort <Int32>] [-CallbackInterval <Int32>]
[-SiteConnectorId <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
Expand All @@ -20,11 +20,19 @@ Adjust Site configuration options
### EXAMPLE 1
```
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
Set-TssDistributedEngineSite -TssSession session -Id
Set-TssDistributedEngineSite -TssSession session -Id 5 -EnableCredSsp:$false
```

Disable CredSSP for Site ID 5

### EXAMPLE 2
```
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
Set-TssDistributedEngineSite -TssSession session -Id 10 -Active:$false
```

Disable Site 10

## PARAMETERS

### -TssSession
Expand Down Expand Up @@ -72,6 +80,21 @@ Accept pipeline input: False
Accept wildcard characters: False
```

### -Active
Activate the Site

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:

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

### -WinRmEndpoint
WinRM Endpoint URL

Expand Down Expand Up @@ -193,7 +216,7 @@ Accept wildcard characters: False
```

### -SiteConnectorId
{{ Fill SiteConnectorId Description }}
Site Connector ID

```yaml
Type: Int32
Expand Down
Expand Up @@ -8,10 +8,16 @@ function Set-TssDistributedEngineSite {
.EXAMPLE
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
Set-TssDistributedEngineSite -TssSession session -Id
Set-TssDistributedEngineSite -TssSession session -Id 5 -EnableCredSsp:$false
Disable CredSSP for Site ID 5
.EXAMPLE
$session = New-TssSession -SecretServer https://alpha -Credential $ssCred
Set-TssDistributedEngineSite -TssSession session -Id 10 -Active:$false
Disable Site 10
.LINK
https://thycotic-ps.github.io/thycotic.secretserver/commands/distributed-engines/Set-TssDistributedEngineSite
Expand All @@ -38,6 +44,10 @@ function Set-TssDistributedEngineSite {
[string]
$SiteName,

# Activate the Site
[switch]
$Active,

# WinRM Endpoint URL
[string]
$WinRmEndpoint,
Expand Down Expand Up @@ -71,6 +81,7 @@ function Set-TssDistributedEngineSite {
[int]
$CallbackInterval,

# Site Connector ID
[int]
$SiteConnectorId
)
Expand All @@ -89,6 +100,7 @@ function Set-TssDistributedEngineSite {

$setBody = @{ data = @{ } }
switch ($setParams.Keys) {
'TssSession' { <# do nothing, added for performance #> }
'Active' {
$activeValue = @{
dirty = $true
Expand Down
Expand Up @@ -3,7 +3,7 @@ BeforeDiscovery {
}
Describe "$commandName verify parameters" {
BeforeDiscovery {
[object[]]$knownParameters = 'TssSession','Id','SiteName','WinRmEndpoint','EnableCredSsp','PowerShellRunAsSecret','EnableRdpProxy','RdpProxyPort','EnableSshProxy','SshProxyPort','CallbackInterval','SiteConnectorId'
[object[]]$knownParameters = 'TssSession','Id','SiteName','Active','WinRmEndpoint','EnableCredSsp','PowerShellRunAsSecret','EnableRdpProxy','RdpProxyPort','EnableSshProxy','SshProxyPort','CallbackInterval','SiteConnectorId'

[object[]]$currentParams = ([Management.Automation.CommandMetaData]$ExecutionContext.SessionState.InvokeCommand.GetCommand($commandName,'Function')).Parameters.Keys
[object[]]$commandDetails = [System.Management.Automation.CommandInfo]$ExecutionContext.SessionState.InvokeCommand.GetCommand($commandName,'Function')
Expand Down

0 comments on commit 1952309

Please sign in to comment.