set-SilverfortServiceAccountPolicy
SYNOPSIS
Add or modify a Service-account policy
SYNTAX
set-SilverfortServiceAccountPolicy [-ObjectGUID] <String> [-jwtToken] <String> [-Endpoint] <String>
[-KeyType] <String> [-Key] <String> [-Action] <String> [<CommonParameters>]
DESCRIPTION
This function will add of modify a Service-account policy
EXAMPLES
EXAMPLE 1
set-SilverfortServiceAccountPolicy -ObjectGUID 'a40d2bc5-71b4-0d4b-8456-27fec179a7ff' -jwtToken $jwtToken -Endpoint 'SOURCE' -KeyType 'IP' -Key '10.54.25.78' -Action 'add'
Add 10.54.25.78 as a source in the policy for the service-account sys_silverforttest (GUID: a40d2bc5-71b4-0d4b-8456-27fec179a7ff)
EXAMPLE 2
set-SilverfortServiceAccountPolicy -ObjectGUID 'a40d2bc5-71b4-0d4b-8456-27fec179a7ff' -jwtToken $jwtToken -Endpoint 'DESTINATION' -KeyType 'GUID' -Key '7b823405-b41b-154a-8c15-9204a0b7d131' -Action 'remove'
Remove SRVCON09 (GUID: 7b823405-b41b-154a-8c15-9204a0b7d131) as a destination in the policy for the service-account sys_silverforttest (GUID: a40d2bc5-71b4-0d4b-8456-27fec179a7ff)
CHANGELOG YYYY-MM-DD - Naam - Wat gewijzigd 2025-04-03 - MM - Initieel script
PARAMETERS
-ObjectGUID
Guid of the serviceaccount.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-jwtToken
A valid JWT-token
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Endpoint
Will you add/remove a SOURCE or a DESTINATION?
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-KeyType
Which keytype you want to add/remove [ "ip", "guid" ]
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Key
The identifier of the source (ip, guid)
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Action
What do you want to do [ "add", "remove" ]
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 6
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.