diff --git a/EventSentry-help.xml b/EventSentry-help.xml index 00042bb..413384d 100644 --- a/EventSentry-help.xml +++ b/EventSentry-help.xml @@ -363,11 +363,11 @@ Add ESVariable - {{ Defines a new variable }} + {{ Adds a new variable to EventSentry }} - {{ Defines a new variable }} + {{ Adds a new variable to EventSentry }} @@ -624,11 +624,11 @@ Remove ESHost - {{ Removes a host from a group }} + {{ Removes a host }} - {{ Removes a host from a group }} + {{ Removes a host }} @@ -636,7 +636,7 @@ Group - {{ Name of the group from which the host should be removed from }} + {{ Name of the group the host is a member of }} String @@ -648,7 +648,7 @@ Hostname - {{ Host to remove }} + {{ Name of the host to remove }} String @@ -663,7 +663,7 @@ Group - {{ Name of the group from which the host should be removed from }} + {{ Name of the group the host is a member of }} String @@ -675,7 +675,7 @@ Hostname - {{ Host to remove }} + {{ Name of the host to remove }} String @@ -721,6 +721,85 @@ + + + Reset-ESSharedSecret + Reset + ESSharedSecret + + {{ Resets the shared secret of one or more hosts with the collector }} + + + + {{ Resets the shared secret of one or more hosts with the collector, for example when reinstalling the OS or the remote agent }} + + + + Reset-ESSharedSecret + + Hostname + + {{ Hostname to reset the shared secret for. Multiple hostnames can be separated with a colon }} + + String + + String + + + None + + + + + + Hostname + + {{ Hostname to reset the shared secret for. Multiple hostnames can be separated with a colon }} + + String + + String + + + None + + + + + + None + + + + + + + + + + System.Object + + + + + + + + + + + + + + -------------------------- Example 1 -------------------------- + PS C:\> {{ Reset-ESSharedSecret SRV-LOC1-0017 }} + + {{ Resets the shared secret of SRV-LOC1-0017 }} + + + + + Set-ESAuthPasswordWindows @@ -866,7 +945,7 @@ PropertyValue - {{ The value of the property to be set, for boolean values use "yes", "no", "true" or "false" }} + {{ The value of the property to be set }} String @@ -905,7 +984,7 @@ PropertyValue - {{ The value of the property to be set, for boolean values use "yes", "no", "true" or "false" }} + {{ The value of the property to be set }} String diff --git a/EventSentry.psd1 b/EventSentry.psd1 index 753bf35..7eed170 100644 Binary files a/EventSentry.psd1 and b/EventSentry.psd1 differ diff --git a/EventSentry.psm1 b/EventSentry.psm1 index 7833257..55a5d25 100644 --- a/EventSentry.psm1 +++ b/EventSentry.psm1 @@ -622,6 +622,23 @@ function Set-ESVariable } } +function Reset-ESSharedSecret +{ + Param( + [Parameter(Mandatory=$true)] + [string]$Hostname + ) + + if (ManagementConsoleIsRunning) + { throw "EventSentry Management Console is running, only read-only actions can be performed." } + + $regPathCollector = $ESRegPath + "\collector" + + Set-ItemProperty -Path $regPathCollector -Name "reset_shared_secrets_hosts" -Value $Hostname -Force | Out-Null + + saveConfig +} + function Remove-ESHost { Param( diff --git a/Reset-ESSharedSecret.md b/Reset-ESSharedSecret.md new file mode 100644 index 0000000..9bb14b5 --- /dev/null +++ b/Reset-ESSharedSecret.md @@ -0,0 +1,60 @@ +--- +external help file: EventSentry-help.xml +Module Name: EventSentry +online version: +schema: 2.0.0 +--- + +# Reset-ESSharedSecret + +## SYNOPSIS +{{ Resets the shared secret of one or more hosts with the collector }} + +## SYNTAX + +``` +Reset-ESSharedSecret [-Hostname] [] +``` + +## DESCRIPTION +{{ Resets the shared secret of one or more hosts with the collector, for example when reinstalling the OS or the remote agent }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Reset-ESSharedSecret SRV-LOC1-0017 }} +``` + +{{ Resets the shared secret of SRV-LOC1-0017 }} + +## PARAMETERS + +### -Hostname +{{ Hostname to reset the shared secret for. Multiple hostnames can be separated with a colon }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +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](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS