From da0d68b983f0b913a126167cb09e938008d3ad25 Mon Sep 17 00:00:00 2001 From: FortiPower GitHub Actions Bot <> Date: Mon, 16 Sep 2024 05:03:27 +0000 Subject: [PATCH] Update doc via platyPS and GitHub Actions --- docs/Add-FGTUserLocal.md | 20 +-- docs/Set-FGTMonitorUserLocalChangePassword.md | 150 ++++++++++++++++++ docs/Set-FGTUserLocal.md | 19 +-- 3 files changed, 171 insertions(+), 18 deletions(-) create mode 100644 docs/Set-FGTMonitorUserLocalChangePassword.md diff --git a/docs/Add-FGTUserLocal.md b/docs/Add-FGTUserLocal.md index 492b78298..c5fc7f273 100644 --- a/docs/Add-FGTUserLocal.md +++ b/docs/Add-FGTUserLocal.md @@ -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 powerfgt@fgt.power +PS > Add-FGTUserLocal -Name MyFGTUserLocal -passwd $mypassword -status -two_factor email -email_to powerfgt@fgt.power ``` -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 powerfgt@fgt.power +PS > Add-FGTUserLocal -Name MyFGTUserLocal -passwd $mypassword -status -two_factor fortitoken -fortitoken XXXXXXXXXXXXXXXX -email_to powerfgt@fgt.power ``` -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 powerfgt@fgt.power -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 powerfgt@fgt.power ``` +Add Local User object name MyFGTUserLocal, password mypassword, with email and two factor via SMS and SMS Phone via -data parameter + ## PARAMETERS ### -name diff --git a/docs/Set-FGTMonitorUserLocalChangePassword.md b/docs/Set-FGTMonitorUserLocalChangePassword.md new file mode 100644 index 000000000..14282be59 --- /dev/null +++ b/docs/Set-FGTMonitorUserLocalChangePassword.md @@ -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] -new_password [-vdom ] + [-connection ] [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## 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 diff --git a/docs/Set-FGTUserLocal.md b/docs/Set-FGTUserLocal.md index d9968c0f9..4406500dd 100644 --- a/docs/Set-FGTUserLocal.md +++ b/docs/Set-FGTUserLocal.md @@ -20,7 +20,7 @@ Set-FGTUserLocal [-userlocal] [-name ] [-status] [-two_factor [-Confirm] [] ``` -### local +### password ``` Set-FGTUserLocal [-userlocal] [-name ] [-status] [-passwd ] [-two_factor ] [-two_factor_notification ] [-fortitoken ] [-email_to ] @@ -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,15 +45,15 @@ 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 newpowerfgt@fgt.power +PS > $MyFGTUserLocal | Set-FGTUserLocal -email_to newpowerfgt@fgt.power ``` Change MyFGTUserLocal to set email to newpowerfgt@fgt.power @@ -61,11 +61,12 @@ Change MyFGTUserLocal to set email to newpowerfgt@fgt.power ### 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