diff --git a/docs/Add-FGTUserLDAP.md b/docs/Add-FGTUserLDAP.md new file mode 100644 index 000000000..7591c54b9 --- /dev/null +++ b/docs/Add-FGTUserLDAP.md @@ -0,0 +1,293 @@ +--- +external help file: PowerFGT-help.xml +Module Name: PowerFGT +online version: +schema: 2.0.0 +--- + +# Add-FGTUserLDAP + +## SYNOPSIS +Add a FortiGate LDAP Server + +## SYNTAX + +``` +Add-FGTUserLDAP [-name] [-server] [[-secondary_server] ] + [[-tertiary_server] ] [[-cnid] ] [-dn] [[-type] ] [[-username] ] + [[-password] ] [[-secure] ] [[-data] ] [[-vdom] ] + [[-connection] ] [-ProgressAction ] [] +``` + +## DESCRIPTION +Add a FortiGate LDAP Server (Server, dc, cnid...) + +## EXAMPLES + +### EXAMPLE 1 +``` +Add-FGTUserLDAP -Name MyFGTUserLDAP -server ldap.powerfgt -dn "dc=fgt,dc=power,dc=powerfgt" +``` + +Add a LDAP Server named MyFGTUserLDAP using ldap.powerfgt with Base DN dc=fgt,dc=power,dc=powerfgt + +### EXAMPLE 2 +``` +Add-FGTUserLDAP -Name MyFGTUserLDAP -server ldap.powerfgt -dn "dc=fgt,dc=power,dc=powerfgt" -cnid sAMAccountName +``` + +Add a LDAP Server named MyFGTUserLDAP using ldap.powerfgt with Base DN dc=fgt,dc=power,dc=powerfgt and sAMAccountName as CNID + +### EXAMPLE 3 +``` +$mypassword = ConvertTo-SecureString mypassword -AsPlainText -Force +PS C:\>Add-FGTUserLDAP -Name MyFGTUserLDAP -server ldap.powerfgt -dn "dc=fgt,dc=power,dc=powerfgt" -type regular -username svc_powerfgt -password $mypassword +``` + +Add a LDAP Server named MyFGTUserLDAP using ldap.powerfgt with Base DN dc=fgt,dc=power,dc=powerfgt of type regular with specified username and password for binding + +### EXAMPLE 4 +``` +Add-FGTUserLDAP -Name MyFGTUserLDAP -server ldap.powerfgt -dn "dc=fgt,dc=power,dc=powerfgt" -secure ldaps +``` + +Add a LDAP Server named MyFGTUserLDAP using ldap.powerfgt with Base DN dc=fgt,dc=power,dc=powerfgt, and secure connection (LDAPS) + +### EXAMPLE 5 +``` +$mypassword = ConvertTo-SecureString mypassword -AsPlainText -Force +Add-FGTUserLDAP -Name MyFGTUserLDAP -server ldap.powerfgt -dn "dc=fgt,dc=power,dc=powerfgt" -secondary_server ldap2.powerfgt -tertiary_server ldap3.powerfgt -cnid SAMAccountName -type simple -username svc_powerfgt -password $mypassword -secure ldaps +``` + +Add a LDAP Server named MyFGTUserLDAP using ldap.powerfgt as primary server, ldap2.powerfgt as secondary server and ldap3.powerfgt as tertiary server with Base DN dc=fgt,dc=power,dc=powerfgt, SAMAccountName as CNID, a regular account and secure connection (LDAPS) + +### EXAMPLE 6 +``` +$data = @{ "port" = 10389 } +PS C:\>Add-FGTUserLDAP -Name MyFGTUserLDAP -server ldap.powerfgt -dn "dc=fgt,dc=power,dc=powerfgt" -data $data +``` + +Add a LDAP Server named MyFGTUserLDAP using ldap.powerfgt with Base DN dc=fgt,dc=power,dc=powerfgt and port 10389 via -data parameter + +## PARAMETERS + +### -name +{{ Fill name Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 1 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -server +{{ Fill server Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -secondary_server +{{ Fill secondary_server Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 3 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -tertiary_server +{{ Fill tertiary_server Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 4 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -cnid +{{ Fill cnid Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 5 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -dn +{{ Fill dn Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: True +Position: 6 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -type +{{ Fill type Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 7 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -username +{{ Fill username Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 8 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -password +{{ Fill password Description }} + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: False +Position: 9 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -secure +{{ Fill secure Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: 10 +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -data +{{ Fill data Description }} + +```yaml +Type: Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +Position: 11 +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: 12 +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: 13 +Default value: $DefaultFGTConnection +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/Confirm-FGTUserLDAP.md b/docs/Confirm-FGTUserLDAP.md new file mode 100644 index 000000000..6b2a6bb9f --- /dev/null +++ b/docs/Confirm-FGTUserLDAP.md @@ -0,0 +1,75 @@ +--- +external help file: PowerFGT-help.xml +Module Name: PowerFGT +online version: +schema: 2.0.0 +--- + +# Confirm-FGTUserLDAP + +## SYNOPSIS +{{ Fill in the Synopsis }} + +## SYNTAX + +``` +Confirm-FGTUserLDAP [-argument] [-ProgressAction ] [] +``` + +## DESCRIPTION +{{ Fill in the Description }} + +## EXAMPLES + +### Example 1 +```powershell +PS C:\> {{ Add example code here }} +``` + +{{ Add example description here }} + +## PARAMETERS + +### -argument +{{ Fill argument Description }} + +```yaml +Type: Object +Parameter Sets: (All) +Aliases: + +Required: True +Position: 0 +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 + +### None + +## OUTPUTS + +### System.Object +## NOTES + +## RELATED LINKS diff --git a/docs/Remove-FGTUserLDAP.md b/docs/Remove-FGTUserLDAP.md new file mode 100644 index 000000000..339161829 --- /dev/null +++ b/docs/Remove-FGTUserLDAP.md @@ -0,0 +1,143 @@ +--- +external help file: PowerFGT-help.xml +Module Name: PowerFGT +online version: +schema: 2.0.0 +--- + +# Remove-FGTUserLDAP + +## SYNOPSIS +Remove a FortiGate LDAP Server + +## SYNTAX + +``` +Remove-FGTUserLDAP [-userldap] [-vdom ] [-connection ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Remove a LDAP Server on the FortiGate + +## EXAMPLES + +### EXAMPLE 1 +``` +$MyFGTUserLDAP = Get-FGTUserLDAP -name PowerFGT +PS C:\>$MyFGTUserLDAP | Remove-FGTUserLDAP +``` + +Remove user object $MyFGTUserLDAP + +### EXAMPLE 2 +``` +$MyFGTUserLDAP = Get-FGTUserLDAP -name MyFGTUserLDAP +PS C:\>$MyFGTUserLDAP | Remove-FGTUserLDAP -confirm:$false +``` + +Remove UserLDAP object $MyFGTUserLDAP with no confirmation + +## PARAMETERS + +### -userldap +{{ Fill userldap Description }} + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: True (ByValue) +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-FGTUserLDAP.md b/docs/Set-FGTUserLDAP.md new file mode 100644 index 000000000..663f14f28 --- /dev/null +++ b/docs/Set-FGTUserLDAP.md @@ -0,0 +1,328 @@ +--- +external help file: PowerFGT-help.xml +Module Name: PowerFGT +online version: +schema: 2.0.0 +--- + +# Set-FGTUserLDAP + +## SYNOPSIS +Change a FortiGate LDAP Server + +## SYNTAX + +``` +Set-FGTUserLDAP [-userldap] [-name ] [-server ] [-secondary_server ] + [-tertiary_server ] [-cnid ] [-dn ] [-type ] [-username ] + [-password ] [-secure ] [-data ] [-vdom ] [-connection ] + [-ProgressAction ] [-WhatIf] [-Confirm] [] +``` + +## DESCRIPTION +Set a FortiGate LDAP Server (Server, dc, cnid...) + +## EXAMPLES + +### EXAMPLE 1 +``` +$MyFGTUserLDAP = Get-FGTUserLDAP -name MyFGTUserLDAP +PS C:\>$MyFGTUserLDAP | Set-FGTUserLDAP -server mynewldapserver +``` + +Change server of MyFGTUserLDAP to mynewldapserver + +### EXAMPLE 2 +``` +$MyFGTUserLDAP = Get-FGTUserLDAP -name MyFGTUserLDAP +$mypassword = ConvertTo-SecureString mypassword -AsPlainText -Force +PS C:\>$MyFGTUserLDAP | Set-FGTUserLDAP -username myusername -password $mypassword -type regular +``` + +Change type to regular and change username and password + +### EXAMPLE 3 +``` +$MyFGTUserLDAP = Get-FGTUserLDAP -name MyFGTUserLDAP +PS C:\>$MyFGTUserLDAP | Set-FGTUserLDAP -secure ldaps +``` + +Change MyFGTUserLDAP to user secure connection (LDAPS and port 636) + +### EXAMPLE 4 +``` +$data = @{ "port" = "10389" } +PS C:\>$MyFGTUserLDAP = Get-FGTUserLDAP -name MyFGTUserLDAP +PS C:\>$MyFGTUserLDAP | Set-FGTUserLDAP -data $data +``` + +Change MyFGTUserLDAP to port 10389 + +## PARAMETERS + +### -userldap +{{ Fill userldap Description }} + +```yaml +Type: PSObject +Parameter Sets: (All) +Aliases: + +Required: True +Position: 2 +Default value: None +Accept pipeline input: True (ByValue) +Accept wildcard characters: False +``` + +### -name +{{ Fill name Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -server +{{ Fill server Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -secondary_server +{{ Fill secondary_server Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -tertiary_server +{{ Fill tertiary_server Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -cnid +{{ Fill cnid Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -dn +{{ Fill dn Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -type +{{ Fill type Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -username +{{ Fill username Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -password +{{ Fill password Description }} + +```yaml +Type: SecureString +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -secure +{{ Fill secure Description }} + +```yaml +Type: String +Parameter Sets: (All) +Aliases: + +Required: False +Position: Named +Default value: None +Accept pipeline input: False +Accept wildcard characters: False +``` + +### -data +{{ Fill data Description }} + +```yaml +Type: Hashtable +Parameter Sets: (All) +Aliases: + +Required: False +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