-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update doc via platyPS and GitHub Actions
- Loading branch information
FortiPower GitHub Actions Bot
committed
Sep 16, 2024
1 parent
b963339
commit da0d68b
Showing
3 changed files
with
171 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,35 +26,37 @@ Add a FortiGate Local User (Name, Password, MFA) | |
|
||
### EXAMPLE 1 | ||
``` | ||
Add-FGTUserLocal -Name FGT -passwd MyFGT -status | ||
$mypassword = ConvertTo-SecureString mypassword -AsPlainText -Force | ||
PS > Add-FGTUserLocal -Name MyFGTUserLocal -passwd $mypassword -status:$false | ||
``` | ||
|
||
Add Local User object name FGT, password MyFGT and enable it | ||
Add Local User object name MyFGTUserLocal, password MyFGT and disabled it | ||
|
||
### EXAMPLE 2 | ||
``` | ||
$mypassword = ConvertTo-SecureString mypassword -AsPlainText -Force | ||
Add-FGTUserLocal -Name FGT -passwd $mypassword -status -two_factor email -email_to [email protected] | ||
PS > Add-FGTUserLocal -Name MyFGTUserLocal -passwd $mypassword -status -two_factor email -email_to [email protected] | ||
``` | ||
|
||
Add Local User object name FGT, password mypassword and enable it, with two factor authentication by email | ||
Add Local User object name MyFGTUserLocal, password mypassword with two factor authentication by email | ||
|
||
### EXAMPLE 3 | ||
``` | ||
$mypassword = ConvertTo-SecureString mypassword -AsPlainText -Force | ||
Add-FGTUserLocal -Name FGT -passwd $mypassword -status -two_factor fortitoken -fortitoken XXXXXXXXXXXXXXXX -email_to [email protected] | ||
PS > Add-FGTUserLocal -Name MyFGTUserLocal -passwd $mypassword -status -two_factor fortitoken -fortitoken XXXXXXXXXXXXXXXX -email_to [email protected] | ||
``` | ||
|
||
Add Local User object name FGT, password mypassword and enable it, with two factor authentication by fortitoken | ||
Add Local User object name MyFGTUserLocal, password mypassword, with two factor authentication by fortitoken | ||
|
||
### EXAMPLE 4 | ||
``` | ||
$data = @{ "sms-phone" = "XXXXXXXXXX" } | ||
$mypassword = ConvertTo-SecureString mypassword -AsPlainText -Force | ||
PS C:\>Add-FGTUserLocal -Name FGT -passwd $mypassword -status -two_factor sms -data $data -email_to [email protected] | ||
Add Add Local User object name FGT, password mypassword and enable it, with email and two factor via SMS and SMS Phone via -data parameter | ||
PS > $mypassword = ConvertTo-SecureString mypassword -AsPlainText -Force | ||
PS > Add-FGTUserLocal -Name MyFGTUserLocal -passwd $mypassword -status -two_factor sms -data $data -email_to [email protected] | ||
``` | ||
|
||
Add Local User object name MyFGTUserLocal, password mypassword, with email and two factor via SMS and SMS Phone via -data parameter | ||
|
||
## PARAMETERS | ||
|
||
### -name | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
--- | ||
external help file: PowerFGT-help.xml | ||
Module Name: PowerFGT | ||
online version: | ||
schema: 2.0.0 | ||
--- | ||
|
||
# Set-FGTMonitorUserLocalChangePassword | ||
|
||
## SYNOPSIS | ||
Set User Local Change Password | ||
|
||
## SYNTAX | ||
|
||
``` | ||
Set-FGTMonitorUserLocalChangePassword [-userlocal] <PSObject> -new_password <SecureString> [-vdom <String[]>] | ||
[-connection <PSObject>] [-ProgressAction <ActionPreference>] [-WhatIf] [-Confirm] [<CommonParameters>] | ||
``` | ||
|
||
## DESCRIPTION | ||
Set User Local Change Password (For \> FortiOS 7.4.X) | ||
|
||
## EXAMPLES | ||
|
||
### EXAMPLE 1 | ||
``` | ||
$mynewpassword = ConvertTo-SecureString mypassword -AsPlainText -Force | ||
PS > Get-FGTUserLocal MyFGTUserLocal | Set-FGTMonitorUserLocalChangePassword -new_password $mynewpassword | ||
``` | ||
|
||
Change password for MyFGTUserLocal | ||
|
||
## PARAMETERS | ||
|
||
### -userlocal | ||
{{ Fill userlocal Description }} | ||
|
||
```yaml | ||
Type: PSObject | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: True | ||
Position: 2 | ||
Default value: None | ||
Accept pipeline input: True (ByValue) | ||
Accept wildcard characters: False | ||
``` | ||
### -new_password | ||
{{ Fill new_password Description }} | ||
```yaml | ||
Type: SecureString | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: True | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -vdom | ||
{{ Fill vdom Description }} | ||
```yaml | ||
Type: String[] | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -connection | ||
{{ Fill connection Description }} | ||
```yaml | ||
Type: PSObject | ||
Parameter Sets: (All) | ||
Aliases: | ||
|
||
Required: False | ||
Position: Named | ||
Default value: $DefaultFGTConnection | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -WhatIf | ||
Shows what would happen if the cmdlet runs. | ||
The cmdlet is not run. | ||
```yaml | ||
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. | ||
```yaml | ||
Type: SwitchParameter | ||
Parameter Sets: (All) | ||
Aliases: cf | ||
|
||
Required: False | ||
Position: Named | ||
Default value: None | ||
Accept pipeline input: False | ||
Accept wildcard characters: False | ||
``` | ||
### -ProgressAction | ||
{{ Fill ProgressAction Description }} | ||
```yaml | ||
Type: ActionPreference | ||
Parameter Sets: (All) | ||
Aliases: proga | ||
|
||
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](http://go.microsoft.com/fwlink/?LinkID=113216). | ||
## INPUTS | ||
## OUTPUTS | ||
## NOTES | ||
## RELATED LINKS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ Set-FGTUserLocal [-userlocal] <PSObject> [-name <String>] [-status] [-two_factor | |
[-Confirm] [<CommonParameters>] | ||
``` | ||
|
||
### local | ||
### password | ||
``` | ||
Set-FGTUserLocal [-userlocal] <PSObject> [-name <String>] [-status] [-passwd <SecureString>] | ||
[-two_factor <String>] [-two_factor_notification <String>] [-fortitoken <String>] [-email_to <String>] | ||
|
@@ -36,7 +36,7 @@ Change a FortiGate Local User | |
### EXAMPLE 1 | ||
``` | ||
$MyFGTUserLocal = Get-FGTUserLocal -name MyFGTUserLocal | ||
PS C:\>$MyFGTUserLocal | Set-FGTUserLocal -status $false | ||
PS > $MyFGTUserLocal | Set-FGTUserLocal -status:$false | ||
``` | ||
|
||
Change MyFGTUserLocal to status disable | ||
|
@@ -45,27 +45,28 @@ Change MyFGTUserLocal to status disable | |
``` | ||
$MyFGTUserLocal = Get-FGTUserLocal -name MyFGTUserLocal | ||
$mypassword = ConvertTo-SecureString mypassword -AsPlainText -Force | ||
PS C:\>$MyFGTUserLocal | Set-FGTUserLocal -passwd $mypassword | ||
PS > $MyFGTUserLocal | Set-FGTUserLocal -passwd $mypassword | ||
``` | ||
|
||
Change MyFGTUserLocal to value (Password) MyFGTUserLocalPassword | ||
Change Password for MyFGTUserLocal local user | ||
|
||
### EXAMPLE 3 | ||
``` | ||
$MyFGTUserLocal = Get-FGTUserLocal -name MyFGTUserLocal | ||
PS C:\>$MyFGTUserLocal | Set-FGTUserLocal -email_to [email protected] | ||
PS > $MyFGTUserLocal | Set-FGTUserLocal -email_to [email protected] | ||
``` | ||
|
||
Change MyFGTUserLocal to set email to [email protected] | ||
|
||
### EXAMPLE 4 | ||
``` | ||
$data = @{ "sms-phone" = "XXXXXXXXXX" } | ||
PS C:\>$MyFGTUserLocal = Get-FGTUserLocal -name MyFGTUserLocal | ||
PS C:\>$MyFGTUserLocal | Set-FGTUserLocal -data $data | ||
Change MyFGTUserLocal to set SMS Phone | ||
PS > $MyFGTUserLocal = Get-FGTUserLocal -name MyFGTUserLocal | ||
PS > $MyFGTUserLocal | Set-FGTUserLocal -data $data | ||
``` | ||
|
||
Change MyFGTUserLocal to set SMS Phone | ||
|
||
## PARAMETERS | ||
|
||
### -userlocal | ||
|
@@ -118,7 +119,7 @@ Accept wildcard characters: False | |
```yaml | ||
Type: SecureString | ||
Parameter Sets: local | ||
Parameter Sets: password | ||
Aliases: | ||
|
||
Required: False | ||
|