Manage-FreeIPA_Build_636781686944329208.psm1

#
# Created by: lucas.cueff[at]lucas-cueff.com
# Build by : You
# v1.0 :
# - Your First Release
#
# Released on: 18/11/2018
#
#'(c) 2018 lucas-cueff.com - Distributed under Artistic Licence 2.0 (https://opensource.org/licenses/artistic-license-2.0).'

<#
    .SYNOPSIS
    Powershell cmdlets to use FreeIPA JSONRPC admin web API
 
    .DESCRIPTION
    Manage-FreeIPA.psm1 module provides a commandline interface to manage your FreeIPA/IPA infrastructure from Powershell (Core/Classic - Windows/Linux/Mac Os).
    cmdlet alias respect the Powershell verb naming convention. All the parameters are based on the IPA Python cli embedded in the product.
    For more information on the FreeIPA API, please connect to thw web interface on your IPA Server : https://yourIPA.tld/ipa/ui/#/p/apibrowser/type=command
    Note : Don't forget to trust your IPA AC / ssl certificate locally before using the Powershell Module.
     
    .EXAMPLE
    C:\PS> import-module Manage-FreeIPA.psm1
     
    .EXTERNALHELP
    Manage-FreeIPA-help.xml
#>

Function Set-FreeIPAAPICredentials {
    [cmdletbinding()]
    Param (
      [parameter(Mandatory=$true)]
      [ValidateNotNullOrEmpty()]
          [SecureString]$AdminLogin,
      [parameter(Mandatory=$true)]
      [ValidateNotNullOrEmpty()]
          [SecureString]$AdminPassword,
      [parameter(Mandatory=$false)]
          [switch]$Remove,
      [parameter(Mandatory=$false)]
          [switch]$EncryptKeyInLocalFile,
      [parameter(Mandatory=$false)]
      [ValidateNotNullOrEmpty()]
          [securestring]$MasterPassword
    )
    if ($Remove.IsPresent) {
      $global:FreeIPAAPICredentials = $Null
    } Else {
        $global:FreeIPAAPICredentials = @{
            user = $AdminLogin
            password = $AdminPassword
        }
      If ($EncryptKeyInLocalFile.IsPresent) {
          If (!$MasterPassword -or !$AdminPassword) {
              Write-warning "Please provide a valid Master Password to protect the credential storage on disk and a valid credential"
              throw 'no credential or master password'
          } Else {
              $SaltBytes = New-Object byte[] 32
              $RNG = New-Object System.Security.Cryptography.RNGCryptoServiceProvider
              $RNG.GetBytes($SaltBytes)
              $Credentials = New-Object System.Management.Automation.PSCredential -ArgumentList 'user', $MasterPassword
              $Rfc2898Deriver = New-Object System.Security.Cryptography.Rfc2898DeriveBytes -ArgumentList $Credentials.GetNetworkCredential().Password, $SaltBytes
              $KeyBytes  = $Rfc2898Deriver.GetBytes(32)
              $EncryptedPass = $AdminPassword | ConvertFrom-SecureString -key $KeyBytes
              $EncryptedLogin = $AdminLogin | ConvertFrom-SecureString -key $KeyBytes
              $ObjConfigFreeIPA = @{
                  Salt = $SaltBytes
                  EncryptedAdminSecret = $EncryptedPass
                  EncryptedAdminAccount = $EncryptedLogin
              }
              $FolderName = 'Manage-FreeIPA'
              $ConfigName = 'Manage-FreeIPA.xml'
              if (!(Test-Path -Path "$($env:AppData)\$FolderName")) {
                  New-Item -ItemType directory -Path "$($env:AppData)\$FolderName" | Out-Null
              }
              if (test-path "$($env:AppData)\$FolderName\$ConfigName") {
                  Remove-item -Path "$($env:AppData)\$FolderName\$ConfigName" -Force | out-null
              }
              $ObjConfigFreeIPA | Export-Clixml "$($env:AppData)\$FolderName\$ConfigName"
          }    
      }
    }
  }
Function Import-FreeIPAAPICrendentials {
      [CmdletBinding()]
      Param(
          [Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
          [ValidateNotNullOrEmpty()]
          [securestring]$MasterPassword
      )
      process {
        $FolderName = 'Manage-FreeIPA'
        $ConfigName = 'Manage-FreeIPA.xml'
          if (!(Test-Path "$($env:AppData)\$($FolderName)\$($ConfigName)")){
              Write-warning 'Configuration file has not been set, Set-FreeIPAAPICredentials to configure the credentials.'
              throw 'error config file not found'
          }
          $ObjConfigFreeIPA = Import-Clixml "$($env:AppData)\$($FolderName)\$($ConfigName)"
          $Credentials = New-Object System.Management.Automation.PSCredential -ArgumentList 'user', $MasterPassword
          try {
              $Rfc2898Deriver = New-Object System.Security.Cryptography.Rfc2898DeriveBytes -ArgumentList $Credentials.GetNetworkCredential().Password, $ObjConfigFreeIPA.Salt
              $KeyBytes  = $Rfc2898Deriver.GetBytes(32)
              $SecStringPass = ConvertTo-SecureString -Key $KeyBytes $ObjConfigFreeIPA.EncryptedAdminSecret
              $SecStringLogin = ConvertTo-SecureString -Key $KeyBytes $ObjConfigFreeIPA.EncryptedAdminAccount
              $global:FreeIPAAPICredentials = @{
                  user = $SecStringLogin
                  password = $SecStringPass
              }
          } catch {
              write-warning "Not able to set correctly your credential, your passphrase my be incorrect"
              write-verbose -message "Error Type: $($_.Exception.GetType().FullName)"
              write-verbose -message "Error Message: $($_.Exception.Message)"
          }
      }
  }
Function Set-FreeIPAAPIServerConfig {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true)]
        [ValidateScript({$_ -match "(http[s]?)(:\/\/)([^\s,]+)"})]
            [String]$URL,
        [parameter(Mandatory=$false)]
        [ValidateNotNullOrEmpty()]
            [String]$ClientVersion
    )
    process {
        if ($URL) {
            $global:FreeIPAAPIServerConfig = @{
                ServerURL = $URL
            }
        } else {
            $global:FreeIPAAPIServerConfig = @{
                ServerURL = "https://yourIPA.domain.tld"
            }
        }
        if ($ClientVersion) {
            $global:FreeIPAAPIServerConfig.add('ClientVersion',$ClientVersion)
        } else {
            $global:FreeIPAAPIServerConfig.add('ClientVersion',"2.229")
        }
    }
  }
Function Get-FreeIPAAPIAuthenticationCookie {
    [CmdletBinding()]
    Param(
        [Parameter(Mandatory=$false,ValueFromPipelineByPropertyName=$true)]
        [ValidateScript({$_ -match "(http[s]?)(:\/\/)([^\s,]+)"})]
            [String]$URL,
        [parameter(Mandatory=$false)]
        [ValidateNotNullOrEmpty()]
            [SecureString]$AdminLogin,
        [parameter(Mandatory=$false)]
        [ValidateNotNullOrEmpty()]
            [SecureString]$AdminPassword,
        [parameter(Mandatory=$false)]
            [switch]$UseCachedURLandCredentials,
        [parameter(Mandatory=$false)]
            [switch]$CloseAllRemoteSession
    )
    if ($CloseAllRemoteSession.IsPresent) {
        Invoke-FreeIPAAPISessionLogout
    } else {
        if (!($UseCachedURLandCredentials.IsPresent)) {
            if ($URL -and $AdminLogin -and $AdminPassword) {
                $global:FreeIPAAPICredentials = @{
                    user = $AdminLogin
                    password = $AdminPassword
                }
                Set-FreeIPAAPIServerConfig -URL $URL

            } else {
                write-warning "if UseCachedURLandCredentials switch is not used URL, AdminLogin, AdminPassword parameters must be used"
                throw 'AdminLogin, AdminPassword parameters must be used'
            }
        }
        try {
            $SecureStringPassToBSTR = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($global:FreeIPAAPICredentials.password)
            $SecureStringLoginToBSTR = [Runtime.InteropServices.Marshal]::SecureStringToBSTR($global:FreeIPAAPICredentials.user)
            $BSTRCredentials = @{
                user = [Runtime.InteropServices.Marshal]::PtrToStringAuto($SecureStringLoginToBSTR)
                password = [Runtime.InteropServices.Marshal]::PtrToStringAuto($SecureStringPassToBSTR) 
            }
            $FreeIPALogin = Invoke-WebRequest "$($global:FreeIPAAPIServerConfig.ServerURL)/ipa/session/login_password" -Session 'FunctionFreeIPASession' -Body $BSTRCredentials -Method 'POST'
        } catch [System.Net.Http.HttpRequestException] {
            switch ($_.Exception.Response.StatusCode.value__) {
                404 { 
                        Write-error -message "Please check that /ipa/session/login_password is available on your FreeIPA server"
                    }
                Default {
                            write-error -message "HTTP Error Code $($_.Exception.Response.StatusCode.Value__) with error message:$($_.Exception.Response.StatusDescription)"
                        }
            }
            Break
        } catch [System.Exception] {
            write-error -message "other error encountered - error message:$($_.Exception.message)"
            break
        }
        $global:FreeIPASession = $FunctionFreeIPASession
        $FreeIPALogin
    }
}
Function Invoke-FreeIPAAPI {
    [CmdletBinding()]
    [OutputType([psobject])]
    param (
        [Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true)]
        [ValidateNotNullOrEmpty()]
            [Object]$inputAPIObject
    )
    begin {
        If (!(get-variable FreeIPASession)) {
            throw "Please use Get-FreeIPAAPIAuthenticationCookie function first to get an authentication cookie"
        }
    } process {
        try {
            $json = $inputAPIObject | ConvertTo-Json -Depth 3
            Write-Verbose -message $json
        } catch {
            write-error -message "Not able to convert input object to json"
            break
        }
        try {
            if ($json) {
                Invoke-RestMethod "$($global:FreeIPAAPIServerConfig.ServerURL)/ipa/session/json" -Method Post -WebSession $global:FreeIPASession -Body $json -ContentType 'application/json' -Headers @{"Referer"="$($global:FreeIPAAPIServerConfig.ServerURL)/ipa/session/json"}
            }            
        } catch [System.Net.Http.HttpRequestException] {
            switch ($_.Exception.Response.StatusCode.value__) {
                404 { 
                        Write-error -message "Please check that /ipa/session/json is available on your FreeIPA server"
                    }
                Default {
                            write-error -message "HTTP Error Code $($_.Exception.Response.StatusCode.Value__) with error message:$($_.Exception.Response.StatusDescription)"
                        }
            }
            Break
        } catch {
            write-error -message "error - please troubleshoot - error message:$($_.Exception.message)"
            break
        }
    }
}
function Invoke-FreeIPAAPIaci_add {
        <#
            .DESCRIPTION
       
    Create new ACI.
     
       .PARAMETER permission
       Permission ACI grants access to
       .PARAMETER group
       User group ACI grants access to
       .PARAMETER permissions
       Permissions to grant(read, write, add, delete, all)
       .PARAMETER attrs
       Attributes
       .PARAMETER type
       type of IPA object (user, group, host, hostgroup, service, netgroup)
       .PARAMETER memberof
       Member of a group
       .PARAMETER filter
       Legal LDAP filter (e.g. ou=Engineering)
       .PARAMETER subtree
       Subtree to apply ACI to
       .PARAMETER targetgroup
       Group to apply ACI to
       .PARAMETER self
       Apply ACI to your own entry (self)
       .PARAMETER prefix
       Prefix used to distinguish ACI types (permission, delegation, selfservice, none)
       .PARAMETER test
       Test the ACI syntax but don't write anything
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ACI name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$permission,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    [ValidateSet("user","group","host","service","hostgroup","netgroup","dnsrecord")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$memberof,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$filter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subtree,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetgroup,
               [parameter(Mandatory=$false)]
                    
                [switch]$self,
               [parameter(Mandatory=$true)]
                    [ValidateSet("permission","delegation","selfservice","none")]
                [String]$prefix,
               [parameter(Mandatory=$false)]
                    
                [switch]$test,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($permission) { $ObjParams | Add-Member -NotePropertyName permission -NotePropertyValue $permission }
       if ($group) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $group }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($memberof) { $ObjParams | Add-Member -NotePropertyName memberof -NotePropertyValue $memberof }
       if ($filter) { $ObjParams | Add-Member -NotePropertyName filter -NotePropertyValue $filter }
       if ($subtree) { $ObjParams | Add-Member -NotePropertyName subtree -NotePropertyValue $subtree }
       if ($targetgroup) { $ObjParams | Add-Member -NotePropertyName targetgroup -NotePropertyValue $targetgroup }
       if ($self.IsPresent) { $ObjParams | Add-Member -NotePropertyName selfaci -NotePropertyValue $true }
       if ($prefix) { $ObjParams | Add-Member -NotePropertyName aciprefix -NotePropertyValue $prefix }
       if ($test.IsPresent) { $ObjParams | Add-Member -NotePropertyName test -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "aci_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIaci_del {
        <#
            .DESCRIPTION
       
    Delete ACI.
     
       .PARAMETER prefix
       Prefix used to distinguish ACI types (permission, delegation, selfservice, none)
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ACI name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateSet("permission","delegation","selfservice","none")]
                [String]$prefix,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($prefix) { $ObjParams | Add-Member -NotePropertyName aciprefix -NotePropertyValue $prefix }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "aci_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIaci_find {
        <#
            .DESCRIPTION
       
    Search for ACIs.

    Returns a list of ACIs

    EXAMPLES:

     To find all ACIs that apply directly to members of the group ipausers:
       ipa aci-find -memberof=ipausers

     To find all ACIs that grant add access:
       ipa aci-find -permissions=add

    Note that the find command only looks for the given text in the set of
    ACIs, it does not evaluate the ACIs to see if something would apply.
    For example, searching on memberof=ipausers will find all ACIs that
    have ipausers as a memberof. There may be other ACIs that apply to
    members of that group indirectly.
     
       .PARAMETER name
       ACI name
       .PARAMETER permission
       Permission ACI grants access to
       .PARAMETER group
       User group ACI grants access to
       .PARAMETER permissions
       Permissions to grant(read, write, add, delete, all)
       .PARAMETER attrs
       Attributes
       .PARAMETER type
       type of IPA object (user, group, host, hostgroup, service, netgroup)
       .PARAMETER memberof
       Member of a group
       .PARAMETER filter
       Legal LDAP filter (e.g. ou=Engineering)
       .PARAMETER subtree
       Subtree to apply ACI to
       .PARAMETER targetgroup
       Group to apply ACI to
       .PARAMETER self
       Apply ACI to your own entry (self)
       .PARAMETER prefix
       Prefix used to distinguish ACI types (permission, delegation, selfservice, none)
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$permission,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    [ValidateSet("user","group","host","service","hostgroup","netgroup","dnsrecord")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$memberof,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$filter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subtree,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetgroup,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$self,
               [parameter(Mandatory=$false)]
                    [ValidateSet("permission","delegation","selfservice","none")]
                [String]$prefix,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName aciname -NotePropertyValue $name }
       if ($permission) { $ObjParams | Add-Member -NotePropertyName permission -NotePropertyValue $permission }
       if ($group) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $group }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($memberof) { $ObjParams | Add-Member -NotePropertyName memberof -NotePropertyValue $memberof }
       if ($filter) { $ObjParams | Add-Member -NotePropertyName filter -NotePropertyValue $filter }
       if ($subtree) { $ObjParams | Add-Member -NotePropertyName subtree -NotePropertyValue $subtree }
       if ($targetgroup) { $ObjParams | Add-Member -NotePropertyName targetgroup -NotePropertyValue $targetgroup }
       if ($self.IsPresent) { $ObjParams | Add-Member -NotePropertyName selfaci -NotePropertyValue $true }
       if ($prefix) { $ObjParams | Add-Member -NotePropertyName aciprefix -NotePropertyValue $prefix }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "aci_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIaci_mod {
        <#
            .DESCRIPTION
       
    Modify ACI.
     
       .PARAMETER permission
       Permission ACI grants access to
       .PARAMETER group
       User group ACI grants access to
       .PARAMETER permissions
       Permissions to grant(read, write, add, delete, all)
       .PARAMETER attrs
       Attributes
       .PARAMETER type
       type of IPA object (user, group, host, hostgroup, service, netgroup)
       .PARAMETER memberof
       Member of a group
       .PARAMETER filter
       Legal LDAP filter (e.g. ou=Engineering)
       .PARAMETER subtree
       Subtree to apply ACI to
       .PARAMETER targetgroup
       Group to apply ACI to
       .PARAMETER self
       Apply ACI to your own entry (self)
       .PARAMETER prefix
       Prefix used to distinguish ACI types (permission, delegation, selfservice, none)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ACI name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$permission,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    [ValidateSet("user","group","host","service","hostgroup","netgroup","dnsrecord")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$memberof,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$filter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subtree,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetgroup,
               [parameter(Mandatory=$false)]
                    
                [switch]$self,
               [parameter(Mandatory=$true)]
                    [ValidateSet("permission","delegation","selfservice","none")]
                [String]$prefix,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($permission) { $ObjParams | Add-Member -NotePropertyName permission -NotePropertyValue $permission }
       if ($group) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $group }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($memberof) { $ObjParams | Add-Member -NotePropertyName memberof -NotePropertyValue $memberof }
       if ($filter) { $ObjParams | Add-Member -NotePropertyName filter -NotePropertyValue $filter }
       if ($subtree) { $ObjParams | Add-Member -NotePropertyName subtree -NotePropertyValue $subtree }
       if ($targetgroup) { $ObjParams | Add-Member -NotePropertyName targetgroup -NotePropertyValue $targetgroup }
       if ($self.IsPresent) { $ObjParams | Add-Member -NotePropertyName selfaci -NotePropertyValue $true }
       if ($prefix) { $ObjParams | Add-Member -NotePropertyName aciprefix -NotePropertyValue $prefix }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "aci_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIaci_rename {
        <#
            .DESCRIPTION
       
    Rename an ACI.
     
       .PARAMETER permission
       Permission ACI grants access to
       .PARAMETER group
       User group ACI grants access to
       .PARAMETER permissions
       Permissions to grant(read, write, add, delete, all)
       .PARAMETER attrs
       Attributes
       .PARAMETER type
       type of IPA object (user, group, host, hostgroup, service, netgroup)
       .PARAMETER memberof
       Member of a group
       .PARAMETER filter
       Legal LDAP filter (e.g. ou=Engineering)
       .PARAMETER subtree
       Subtree to apply ACI to
       .PARAMETER targetgroup
       Group to apply ACI to
       .PARAMETER self
       Apply ACI to your own entry (self)
       .PARAMETER prefix
       Prefix used to distinguish ACI types (permission, delegation, selfservice, none)
       .PARAMETER newname
       New ACI name
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ACI name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$permission,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    [ValidateSet("user","group","host","service","hostgroup","netgroup","dnsrecord")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$memberof,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$filter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subtree,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetgroup,
               [parameter(Mandatory=$false)]
                    
                [switch]$self,
               [parameter(Mandatory=$true)]
                    [ValidateSet("permission","delegation","selfservice","none")]
                [String]$prefix,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$newname,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($permission) { $ObjParams | Add-Member -NotePropertyName permission -NotePropertyValue $permission }
       if ($group) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $group }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($memberof) { $ObjParams | Add-Member -NotePropertyName memberof -NotePropertyValue $memberof }
       if ($filter) { $ObjParams | Add-Member -NotePropertyName filter -NotePropertyValue $filter }
       if ($subtree) { $ObjParams | Add-Member -NotePropertyName subtree -NotePropertyValue $subtree }
       if ($targetgroup) { $ObjParams | Add-Member -NotePropertyName targetgroup -NotePropertyValue $targetgroup }
       if ($self.IsPresent) { $ObjParams | Add-Member -NotePropertyName selfaci -NotePropertyValue $true }
       if ($prefix) { $ObjParams | Add-Member -NotePropertyName aciprefix -NotePropertyValue $prefix }
       if ($newname) { $ObjParams | Add-Member -NotePropertyName newname -NotePropertyValue $newname }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "aci_rename/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIaci_show {
        <#
            .DESCRIPTION
       
    Display a single ACI given an ACI name.
     
       .PARAMETER prefix
       Prefix used to distinguish ACI types (permission, delegation, selfservice, none)
       .PARAMETER location
       Location of the ACI
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ACI name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateSet("permission","delegation","selfservice","none")]
                [String]$prefix,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$location,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($prefix) { $ObjParams | Add-Member -NotePropertyName aciprefix -NotePropertyValue $prefix }
       if ($location) { $ObjParams | Add-Member -NotePropertyName location -NotePropertyValue $location }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "aci_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIadtrust_is_enabled {
        <#
            .DESCRIPTION
       Determine whether ipa-adtrust-install has been run on this system
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "adtrust_is_enabled/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_add {
        <#
            .DESCRIPTION
       
    Add an automember rule.
     
       .PARAMETER desc
       A description of this auto member rule
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automember_rule
       Automember Rule
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$true)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automember_rule,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_add/1"
                params  = @(@($automember_rule),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_add_condition {
        <#
            .DESCRIPTION
       
    Add conditions to an automember rule.
     
       .PARAMETER desc
       A description of this auto member rule
       .PARAMETER inclusive_regex
       Inclusive Regex
       .PARAMETER exclusive_regex
       Exclusive Regex
       .PARAMETER key
       Attribute to filter via regex. For example fqdn for a host, or manager for a user
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automember_rule
       Automember Rule
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$inclusive_regex,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$exclusive_regex,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$key,
               [parameter(Mandatory=$true)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automember_rule,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($inclusive_regex) { $ObjParams | Add-Member -NotePropertyName automemberinclusiveregex -NotePropertyValue $inclusive_regex }
       if ($exclusive_regex) { $ObjParams | Add-Member -NotePropertyName automemberexclusiveregex -NotePropertyValue $exclusive_regex }
       if ($key) { $ObjParams | Add-Member -NotePropertyName key -NotePropertyValue $key }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_add_condition/1"
                params  = @(@($automember_rule),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_default_group_remove {
        <#
            .DESCRIPTION
       
    Remove default (fallback) group for all unmatched entries.
     
       .PARAMETER desc
       A description of this auto member rule
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$true)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_default_group_remove/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_default_group_set {
        <#
            .DESCRIPTION
       
    Set default (fallback) group for all unmatched entries.
     
       .PARAMETER desc
       A description of this auto member rule
       .PARAMETER default_group
       Default (fallback) group for entries to land
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$default_group,
               [parameter(Mandatory=$true)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($default_group) { $ObjParams | Add-Member -NotePropertyName automemberdefaultgroup -NotePropertyValue $default_group }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_default_group_set/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_default_group_show {
        <#
            .DESCRIPTION
       
    Display information about the default (fallback) automember groups.
     
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_default_group_show/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_del {
        <#
            .DESCRIPTION
       
    Delete an automember rule.
     
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automember_rule
       Automember Rule
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$automember_rule,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_del/1"
                params  = @(@($automember_rule),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_find {
        <#
            .DESCRIPTION
       
    Search for automember rules.
     
       .PARAMETER desc
       A description of this auto member rule
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("automember-rule")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$true)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_mod {
        <#
            .DESCRIPTION
       
    Modify an automember rule.
     
       .PARAMETER desc
       A description of this auto member rule
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automember_rule
       Automember Rule
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$true)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automember_rule,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_mod/1"
                params  = @(@($automember_rule),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_rebuild {
        <#
            .DESCRIPTION
       Rebuild auto membership.
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER users
       Rebuild membership for specified users
       .PARAMETER hosts
       Rebuild membership for specified hosts
       .PARAMETER no_wait
       Don't wait for rebuilding membership
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_wait,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($users) { $ObjParams | Add-Member -NotePropertyName users -NotePropertyValue $users }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName hosts -NotePropertyValue $hosts }
       if ($no_wait.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_wait -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_rebuild/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_remove_condition {
        <#
            .DESCRIPTION
       
    Remove conditions from an automember rule.
     
       .PARAMETER desc
       A description of this auto member rule
       .PARAMETER inclusive_regex
       Inclusive Regex
       .PARAMETER exclusive_regex
       Exclusive Regex
       .PARAMETER key
       Attribute to filter via regex. For example fqdn for a host, or manager for a user
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automember_rule
       Automember Rule
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$inclusive_regex,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$exclusive_regex,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$key,
               [parameter(Mandatory=$true)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automember_rule,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($inclusive_regex) { $ObjParams | Add-Member -NotePropertyName automemberinclusiveregex -NotePropertyValue $inclusive_regex }
       if ($exclusive_regex) { $ObjParams | Add-Member -NotePropertyName automemberexclusiveregex -NotePropertyValue $exclusive_regex }
       if ($key) { $ObjParams | Add-Member -NotePropertyName key -NotePropertyValue $key }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_remove_condition/1"
                params  = @(@($automember_rule),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomember_show {
        <#
            .DESCRIPTION
       
    Display information about an automember rule.
     
       .PARAMETER type
       Grouping to which the rule applies
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automember_rule
       Automember Rule
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateSet("group","hostgroup")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automember_rule,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automember_show/1"
                params  = @(@($automember_rule),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountkey_add {
        <#
            .DESCRIPTION
       Create a new automount key.
       .PARAMETER key
       Automount key name.
       .PARAMETER info
       Mount information
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER automountmap
       Automount map name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$key,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$info,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountmap,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($key) { $ObjParams | Add-Member -NotePropertyName automountkey -NotePropertyValue $key }
       if ($info) { $ObjParams | Add-Member -NotePropertyName automountinformation -NotePropertyValue $info }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountkey_add/1"
                params  = @(@($automountlocation,$automountmap),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountkey_del {
        <#
            .DESCRIPTION
       Delete an automount key.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER key
       Automount key name.
       .PARAMETER info
       Mount information
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER automountmap
       Automount map name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$key,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$info,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountmap,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }
       if ($key) { $ObjParams | Add-Member -NotePropertyName automountkey -NotePropertyValue $key }
       if ($info) { $ObjParams | Add-Member -NotePropertyName automountinformation -NotePropertyValue $info }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountkey_del/1"
                params  = @(@($automountlocation,$automountmap),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountkey_find {
        <#
            .DESCRIPTION
       Search for an automount key.
       .PARAMETER key
       Automount key name.
       .PARAMETER info
       Mount information
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER automountmap
       Automount map name.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$key,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$info,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountmap,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($key) { $ObjParams | Add-Member -NotePropertyName automountkey -NotePropertyValue $key }
       if ($info) { $ObjParams | Add-Member -NotePropertyName automountinformation -NotePropertyValue $info }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountkey_find/1"
                params  = @(@($automountlocation,$automountmap,$criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountkey_mod {
        <#
            .DESCRIPTION
       Modify an automount key.
       .PARAMETER key
       Automount key name.
       .PARAMETER info
       Mount information
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER newinfo
       New mount information
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rename
       Rename the automount key object
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER automountmap
       Automount map name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$key,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$info,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$newinfo,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountmap,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($key) { $ObjParams | Add-Member -NotePropertyName automountkey -NotePropertyValue $key }
       if ($info) { $ObjParams | Add-Member -NotePropertyName automountinformation -NotePropertyValue $info }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($newinfo) { $ObjParams | Add-Member -NotePropertyName newautomountinformation -NotePropertyValue $newinfo }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountkey_mod/1"
                params  = @(@($automountlocation,$automountmap),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountkey_show {
        <#
            .DESCRIPTION
       Display an automount key.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER key
       Automount key name.
       .PARAMETER info
       Mount information
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER automountmap
       Automount map name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$key,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$info,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountmap,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($key) { $ObjParams | Add-Member -NotePropertyName automountkey -NotePropertyValue $key }
       if ($info) { $ObjParams | Add-Member -NotePropertyName automountinformation -NotePropertyValue $info }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountkey_show/1"
                params  = @(@($automountlocation,$automountmap),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountlocation_add {
        <#
            .DESCRIPTION
       Create a new automount location.
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER location
       Automount location name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$location,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountlocation_add/1"
                params  = @(@($location),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountlocation_del {
        <#
            .DESCRIPTION
       Delete an automount location.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER location
       Automount location name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$location,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountlocation_del/1"
                params  = @(@($location),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountlocation_find {
        <#
            .DESCRIPTION
       Search for an automount location.
       .PARAMETER location
       Automount location name.
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("location")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$location,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($location) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $location }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountlocation_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountlocation_show {
        <#
            .DESCRIPTION
       Display an automount location.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER location
       Automount location name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$location,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountlocation_show/1"
                params  = @(@($location),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountlocation_tofiles {
        <#
            .DESCRIPTION
       Generate automount files for a specific location.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER location
       Automount location name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$location,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountlocation_tofiles/1"
                params  = @(@($location),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountmap_add {
        <#
            .DESCRIPTION
       Create a new automount map.
       .PARAMETER desc
       Description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER map
       Automount map name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$map,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountmap_add/1"
                params  = @(@($automountlocation,$map),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountmap_add_indirect {
        <#
            .DESCRIPTION
       Create a new indirect mount point.
       .PARAMETER desc
       Description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER mount
       Mount point
       .PARAMETER parentmap
       Name of parent automount map (default: auto.master).
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER map
       Automount map name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$mount,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$parentmap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$map,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($mount) { $ObjParams | Add-Member -NotePropertyName key -NotePropertyValue $mount }
       if ($parentmap) { $ObjParams | Add-Member -NotePropertyName parentmap -NotePropertyValue $parentmap }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountmap_add_indirect/1"
                params  = @(@($automountlocation,$map),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountmap_del {
        <#
            .DESCRIPTION
       Delete an automount map.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER map
       Automount map name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$map,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountmap_del/1"
                params  = @(@($automountlocation,$map),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountmap_find {
        <#
            .DESCRIPTION
       Search for an automount map.
       .PARAMETER map
       Automount map name.
       .PARAMETER desc
       Description
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("map")
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$map,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($map) { $ObjParams | Add-Member -NotePropertyName automountmapname -NotePropertyValue $map }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountmap_find/1"
                params  = @(@($automountlocation,$criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountmap_mod {
        <#
            .DESCRIPTION
       Modify an automount map.
       .PARAMETER desc
       Description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER map
       Automount map name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$map,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountmap_mod/1"
                params  = @(@($automountlocation,$map),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIautomountmap_show {
        <#
            .DESCRIPTION
       Display an automount map.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER automountlocation
       Automount location name.
       .PARAMETER map
       Automount map name.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$automountlocation,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$map,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "automountmap_show/1"
                params  = @(@($automountlocation,$map),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIbatch {
        <#
            .DESCRIPTION
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER methods
       Nested Methods to execute
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$methods,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "batch/1"
                params  = @(@($methods),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_add {
        <#
            .DESCRIPTION
       Create a new CA ACL.
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER cacat
       CA category the ACL applies to
       .PARAMETER profilecat
       Profile category the ACL applies to
       .PARAMETER usercat
       User category the ACL applies to
       .PARAMETER hostcat
       Host category the ACL applies to
       .PARAMETER servicecat
       Service category the ACL applies to
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$cacat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$profilecat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$servicecat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($cacat) { $ObjParams | Add-Member -NotePropertyName ipacacategory -NotePropertyValue $cacat }
       if ($profilecat) { $ObjParams | Add-Member -NotePropertyName ipacertprofilecategory -NotePropertyValue $profilecat }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($servicecat) { $ObjParams | Add-Member -NotePropertyName servicecategory -NotePropertyValue $servicecat }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_add_ca {
        <#
            .DESCRIPTION
       Add CAs to a CA ACL.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER cas
       Certificate Authorities to add
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cas,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($cas) { $ObjParams | Add-Member -NotePropertyName ca -NotePropertyValue $cas }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_add_ca/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_add_host {
        <#
            .DESCRIPTION
       Add target hosts and hostgroups to a CA ACL.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_add_host/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_add_profile {
        <#
            .DESCRIPTION
       Add profiles to a CA ACL.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER certprofiles
       Certificate Profiles to add
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certprofiles,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($certprofiles) { $ObjParams | Add-Member -NotePropertyName certprofile -NotePropertyValue $certprofiles }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_add_profile/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_add_service {
        <#
            .DESCRIPTION
       Add services to a CA ACL.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER services
       services to add
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($services) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_add_service/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_add_user {
        <#
            .DESCRIPTION
       Add users and groups to a CA ACL.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_add_user/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_del {
        <#
            .DESCRIPTION
       Delete a CA ACL.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_disable {
        <#
            .DESCRIPTION
       Disable a CA ACL.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_disable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_enable {
        <#
            .DESCRIPTION
       Enable a CA ACL.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_enable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_find {
        <#
            .DESCRIPTION
       Search for CA ACLs.
       .PARAMETER name
       ACL name
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER cacat
       CA category the ACL applies to
       .PARAMETER profilecat
       Profile category the ACL applies to
       .PARAMETER usercat
       User category the ACL applies to
       .PARAMETER hostcat
       Host category the ACL applies to
       .PARAMETER servicecat
       Service category the ACL applies to
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$cacat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$profilecat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$servicecat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($cacat) { $ObjParams | Add-Member -NotePropertyName ipacacategory -NotePropertyValue $cacat }
       if ($profilecat) { $ObjParams | Add-Member -NotePropertyName ipacertprofilecategory -NotePropertyValue $profilecat }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($servicecat) { $ObjParams | Add-Member -NotePropertyName servicecategory -NotePropertyValue $servicecat }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_mod {
        <#
            .DESCRIPTION
       Modify a CA ACL.
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER cacat
       CA category the ACL applies to
       .PARAMETER profilecat
       Profile category the ACL applies to
       .PARAMETER usercat
       User category the ACL applies to
       .PARAMETER hostcat
       Host category the ACL applies to
       .PARAMETER servicecat
       Service category the ACL applies to
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$cacat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$profilecat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$servicecat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($cacat) { $ObjParams | Add-Member -NotePropertyName ipacacategory -NotePropertyValue $cacat }
       if ($profilecat) { $ObjParams | Add-Member -NotePropertyName ipacertprofilecategory -NotePropertyValue $profilecat }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($servicecat) { $ObjParams | Add-Member -NotePropertyName servicecategory -NotePropertyValue $servicecat }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_remove_ca {
        <#
            .DESCRIPTION
       Remove CAs from a CA ACL.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER cas
       Certificate Authorities to remove
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cas,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($cas) { $ObjParams | Add-Member -NotePropertyName ca -NotePropertyValue $cas }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_remove_ca/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_remove_host {
        <#
            .DESCRIPTION
       Remove target hosts and hostgroups from a CA ACL.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_remove_host/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_remove_profile {
        <#
            .DESCRIPTION
       Remove profiles from a CA ACL.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER certprofiles
       Certificate Profiles to remove
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certprofiles,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($certprofiles) { $ObjParams | Add-Member -NotePropertyName certprofile -NotePropertyValue $certprofiles }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_remove_profile/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_remove_service {
        <#
            .DESCRIPTION
       Remove services from a CA ACL.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER services
       services to remove
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($services) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_remove_service/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_remove_user {
        <#
            .DESCRIPTION
       Remove users and groups from a CA ACL.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_remove_user/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcaacl_show {
        <#
            .DESCRIPTION
       Display the properties of a CA ACL.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       ACL name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "caacl_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIca_add {
        <#
            .DESCRIPTION
       Create a CA.
       .PARAMETER desc
       Description of the purpose of the CA
       .PARAMETER subject
       Subject Distinguished Name
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER chain
       Include certificate chain in output
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Name for referencing the CA
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$subject,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$chain,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($subject) { $ObjParams | Add-Member -NotePropertyName ipacasubjectdn -NotePropertyValue $subject }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($chain.IsPresent) { $ObjParams | Add-Member -NotePropertyName chain -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "ca_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIca_del {
        <#
            .DESCRIPTION
       Delete a CA.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Name for referencing the CA
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "ca_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIca_disable {
        <#
            .DESCRIPTION
       Disable a CA.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Name for referencing the CA
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "ca_disable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIca_enable {
        <#
            .DESCRIPTION
       Enable a CA.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Name for referencing the CA
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "ca_enable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIca_find {
        <#
            .DESCRIPTION
       Search for CAs.
       .PARAMETER name
       Name for referencing the CA
       .PARAMETER desc
       Description of the purpose of the CA
       .PARAMETER id
       Dogtag Authority ID
       .PARAMETER subject
       Subject Distinguished Name
       .PARAMETER issuer
       Issuer Distinguished Name
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subject,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$issuer,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($id) { $ObjParams | Add-Member -NotePropertyName ipacaid -NotePropertyValue $id }
       if ($subject) { $ObjParams | Add-Member -NotePropertyName ipacasubjectdn -NotePropertyValue $subject }
       if ($issuer) { $ObjParams | Add-Member -NotePropertyName ipacaissuerdn -NotePropertyValue $issuer }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "ca_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIca_is_enabled {
        <#
            .DESCRIPTION
       
    Checks if any of the servers has the CA service enabled.
     
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "ca_is_enabled/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIca_mod {
        <#
            .DESCRIPTION
       Modify CA configuration.
       .PARAMETER desc
       Description of the purpose of the CA
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rename
       Rename the Certificate Authority object
       .PARAMETER name
       Name for referencing the CA
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "ca_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIca_show {
        <#
            .DESCRIPTION
       Display the properties of a CA.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER chain
       Include certificate chain in output
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Name for referencing the CA
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$chain,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($chain.IsPresent) { $ObjParams | Add-Member -NotePropertyName chain -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "ca_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertmapconfig_mod {
        <#
            .DESCRIPTION
       Modify Certificate Identity Mapping configuration.
       .PARAMETER promptusername
       Prompt for the username when multiple identities are mapped to a certificate
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$promptusername,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($promptusername.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipacertmappromptusername -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certmapconfig_mod/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertmapconfig_show {
        <#
            .DESCRIPTION
       Show the current Certificate Identity Mapping configuration.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certmapconfig_show/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertmaprule_add {
        <#
            .DESCRIPTION
       Create a new Certificate Identity Mapping Rule.
       .PARAMETER desc
       Certificate Identity Mapping Rule description
       .PARAMETER maprule
       Rule used to map the certificate with a user entry
       .PARAMETER matchrule
       Rule used to check if a certificate can be used for authentication
       .PARAMETER domain
       Domain where the user entry will be searched
       .PARAMETER priority
       Priority of the rule (higher number means lower priority
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rulename
       Certificate Identity Mapping Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$maprule,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$matchrule,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$domain,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$priority,
               [parameter(Mandatory=$false)]
                    
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$rulename,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($maprule) { $ObjParams | Add-Member -NotePropertyName ipacertmapmaprule -NotePropertyValue $maprule }
       if ($matchrule) { $ObjParams | Add-Member -NotePropertyName ipacertmapmatchrule -NotePropertyValue $matchrule }
       if ($domain) { $ObjParams | Add-Member -NotePropertyName associateddomain -NotePropertyValue $domain }
       if ($priority) { $ObjParams | Add-Member -NotePropertyName ipacertmappriority -NotePropertyValue $priority }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certmaprule_add/1"
                params  = @(@($rulename),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertmaprule_del {
        <#
            .DESCRIPTION
       Delete a Certificate Identity Mapping Rule.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rulename
       Certificate Identity Mapping Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rulename,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certmaprule_del/1"
                params  = @(@($rulename),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertmaprule_disable {
        <#
            .DESCRIPTION
       Disable a Certificate Identity Mapping Rule.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rulename
       Certificate Identity Mapping Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$rulename,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certmaprule_disable/1"
                params  = @(@($rulename),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertmaprule_enable {
        <#
            .DESCRIPTION
       Enable a Certificate Identity Mapping Rule.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rulename
       Certificate Identity Mapping Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$rulename,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certmaprule_enable/1"
                params  = @(@($rulename),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertmaprule_find {
        <#
            .DESCRIPTION
       Search for Certificate Identity Mapping Rules.
       .PARAMETER rulename
       Certificate Identity Mapping Rule name
       .PARAMETER desc
       Certificate Identity Mapping Rule description
       .PARAMETER maprule
       Rule used to map the certificate with a user entry
       .PARAMETER matchrule
       Rule used to check if a certificate can be used for authentication
       .PARAMETER domain
       Domain where the user entry will be searched
       .PARAMETER priority
       Priority of the rule (higher number means lower priority
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("rulename")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rulename,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$maprule,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$matchrule,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$domain,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$priority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rulename) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $rulename }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($maprule) { $ObjParams | Add-Member -NotePropertyName ipacertmapmaprule -NotePropertyValue $maprule }
       if ($matchrule) { $ObjParams | Add-Member -NotePropertyName ipacertmapmatchrule -NotePropertyValue $matchrule }
       if ($domain) { $ObjParams | Add-Member -NotePropertyName associateddomain -NotePropertyValue $domain }
       if ($priority) { $ObjParams | Add-Member -NotePropertyName ipacertmappriority -NotePropertyValue $priority }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certmaprule_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertmaprule_mod {
        <#
            .DESCRIPTION
       Modify a Certificate Identity Mapping Rule.
       .PARAMETER desc
       Certificate Identity Mapping Rule description
       .PARAMETER maprule
       Rule used to map the certificate with a user entry
       .PARAMETER matchrule
       Rule used to check if a certificate can be used for authentication
       .PARAMETER domain
       Domain where the user entry will be searched
       .PARAMETER priority
       Priority of the rule (higher number means lower priority
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rulename
       Certificate Identity Mapping Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$maprule,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$matchrule,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$domain,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$priority,
               [parameter(Mandatory=$false)]
                    
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$rulename,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($maprule) { $ObjParams | Add-Member -NotePropertyName ipacertmapmaprule -NotePropertyValue $maprule }
       if ($matchrule) { $ObjParams | Add-Member -NotePropertyName ipacertmapmatchrule -NotePropertyValue $matchrule }
       if ($domain) { $ObjParams | Add-Member -NotePropertyName associateddomain -NotePropertyValue $domain }
       if ($priority) { $ObjParams | Add-Member -NotePropertyName ipacertmappriority -NotePropertyValue $priority }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certmaprule_mod/1"
                params  = @(@($rulename),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertmaprule_show {
        <#
            .DESCRIPTION
       Display information about a Certificate Identity Mapping Rule.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rulename
       Certificate Identity Mapping Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$rulename,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certmaprule_show/1"
                params  = @(@($rulename),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertmap_match {
        <#
            .DESCRIPTION
       
    Search for users matching the provided certificate.

    This command relies on SSSD to retrieve the list of matching users and
    may return cached data. For more information on purging SSSD cache,
    please refer to sss_cache documentation.
     
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER certificate
       Base-64 encoded user certificate
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$certificate,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certmap_match/1"
                params  = @(@($certificate),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertprofile_del {
        <#
            .DESCRIPTION
       Delete a Certificate Profile.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER id
       Profile ID for referring to this profile
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certprofile_del/1"
                params  = @(@($id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertprofile_find {
        <#
            .DESCRIPTION
       Search for Certificate Profiles.
       .PARAMETER id
       Profile ID for referring to this profile
       .PARAMETER desc
       Brief description of this profile
       .PARAMETER store
       Whether to store certs issued using this profile
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("id")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$store,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($id) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $id }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($store.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipacertprofilestoreissued -NotePropertyValue $true }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certprofile_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertprofile_import {
        <#
            .DESCRIPTION
       Import a Certificate Profile.
       .PARAMETER desc
       Brief description of this profile
       .PARAMETER store
       Whether to store certs issued using this profile
       .PARAMETER file
       Filename of a raw profile. The XML format is not supported.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER id
       Profile ID for referring to this profile
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$store,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$file,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($store.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipacertprofilestoreissued -NotePropertyValue $true }
       if ($file) { $ObjParams | Add-Member -NotePropertyName file -NotePropertyValue $file }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certprofile_import/1"
                params  = @(@($id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertprofile_mod {
        <#
            .DESCRIPTION
       Modify Certificate Profile configuration.
       .PARAMETER desc
       Brief description of this profile
       .PARAMETER store
       Whether to store certs issued using this profile
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER file
       File containing profile configuration
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER id
       Profile ID for referring to this profile
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$store,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$file,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($store.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipacertprofilestoreissued -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($file) { $ObjParams | Add-Member -NotePropertyName file -NotePropertyValue $file }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certprofile_mod/1"
                params  = @(@($id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcertprofile_show {
        <#
            .DESCRIPTION
       Display the properties of a Certificate Profile.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER out
       Write profile configuration to file
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER id
       Profile ID for referring to this profile
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$out,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($out) { $ObjParams | Add-Member -NotePropertyName out -NotePropertyValue $out }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "certprofile_show/1"
                params  = @(@($id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcert_find {
        <#
            .DESCRIPTION
       Search for existing certificates.
       .PARAMETER certificate
       Base-64 encoded certificate.
       .PARAMETER issuer
       Issuer DN
       .PARAMETER revocation_reason
       Reason for revoking the certificate (0-10). Type "ipa help cert" for revocation reason details.
       .PARAMETER ca
       Name of issuing CA
       .PARAMETER subject
       Subject
       .PARAMETER min_serial_number
       minimum serial number
       .PARAMETER max_serial_number
       maximum serial number
       .PARAMETER exactly
       match the common name exactly
       .PARAMETER validnotafter_from
       Valid not after from this date (YYYY-mm-dd)
       .PARAMETER validnotafter_to
       Valid not after to this date (YYYY-mm-dd)
       .PARAMETER validnotbefore_from
       Valid not before from this date (YYYY-mm-dd)
       .PARAMETER validnotbefore_to
       Valid not before to this date (YYYY-mm-dd)
       .PARAMETER issuedon_from
       Issued on from this date (YYYY-mm-dd)
       .PARAMETER issuedon_to
       Issued on to this date (YYYY-mm-dd)
       .PARAMETER revokedon_from
       Revoked on from this date (YYYY-mm-dd)
       .PARAMETER revokedon_to
       Revoked on to this date (YYYY-mm-dd)
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("certificate")
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       Search for certificates with these owner users.
       .PARAMETER no_users
       Search for certificates without these owner users.
       .PARAMETER hosts
       Search for certificates with these owner hosts.
       .PARAMETER no_hosts
       Search for certificates without these owner hosts.
       .PARAMETER services
       Search for certificates with these owner services.
       .PARAMETER no_services
       Search for certificates without these owner services.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$issuer,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$revocation_reason,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ca,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subject,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$min_serial_number,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$max_serial_number,
               [parameter(Mandatory=$false)]
                    
                [switch]$exactly,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$validnotafter_from,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$validnotafter_to,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$validnotbefore_from,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$validnotbefore_to,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$issuedon_from,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$issuedon_to,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$revokedon_from,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$revokedon_to,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$no_users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$no_hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$no_services,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName certificate -NotePropertyValue $certificate }
       if ($issuer) { $ObjParams | Add-Member -NotePropertyName issuer -NotePropertyValue $issuer }
       if ($revocation_reason) { $ObjParams | Add-Member -NotePropertyName revocation_reason -NotePropertyValue $revocation_reason }
       if ($ca) { $ObjParams | Add-Member -NotePropertyName cacn -NotePropertyValue $ca }
       if ($subject) { $ObjParams | Add-Member -NotePropertyName subject -NotePropertyValue $subject }
       if ($min_serial_number) { $ObjParams | Add-Member -NotePropertyName min_serial_number -NotePropertyValue $min_serial_number }
       if ($max_serial_number) { $ObjParams | Add-Member -NotePropertyName max_serial_number -NotePropertyValue $max_serial_number }
       if ($exactly.IsPresent) { $ObjParams | Add-Member -NotePropertyName exactly -NotePropertyValue $true }
       if ($validnotafter_from) { $ObjParams | Add-Member -NotePropertyName validnotafter_from -NotePropertyValue $validnotafter_from }
       if ($validnotafter_to) { $ObjParams | Add-Member -NotePropertyName validnotafter_to -NotePropertyValue $validnotafter_to }
       if ($validnotbefore_from) { $ObjParams | Add-Member -NotePropertyName validnotbefore_from -NotePropertyValue $validnotbefore_from }
       if ($validnotbefore_to) { $ObjParams | Add-Member -NotePropertyName validnotbefore_to -NotePropertyValue $validnotbefore_to }
       if ($issuedon_from) { $ObjParams | Add-Member -NotePropertyName issuedon_from -NotePropertyValue $issuedon_from }
       if ($issuedon_to) { $ObjParams | Add-Member -NotePropertyName issuedon_to -NotePropertyValue $issuedon_to }
       if ($revokedon_from) { $ObjParams | Add-Member -NotePropertyName revokedon_from -NotePropertyValue $revokedon_from }
       if ($revokedon_to) { $ObjParams | Add-Member -NotePropertyName revokedon_to -NotePropertyValue $revokedon_to }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($no_users) { $ObjParams | Add-Member -NotePropertyName no_user -NotePropertyValue $no_users }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($no_hosts) { $ObjParams | Add-Member -NotePropertyName no_host -NotePropertyValue $no_hosts }
       if ($services) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $services }
       if ($no_services) { $ObjParams | Add-Member -NotePropertyName no_service -NotePropertyValue $no_services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cert_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcert_remove_hold {
        <#
            .DESCRIPTION
       Take a revoked certificate off hold.
       .PARAMETER ca
       Name of issuing CA
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER serial_number
       Serial number in decimal or if prefixed with 0x in hexadecimal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ca,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$serial_number,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($ca) { $ObjParams | Add-Member -NotePropertyName cacn -NotePropertyValue $ca }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cert_remove_hold/1"
                params  = @(@($serial_number),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcert_request {
        <#
            .DESCRIPTION
       Submit a certificate signing request.
       .PARAMETER request_type
       <request_type>
       .PARAMETER profile_id
       Certificate Profile to use
       .PARAMETER ca
       Name of issuing CA
       .PARAMETER principal
       Principal for this certificate (e.g. HTTP/test.example.com)
       .PARAMETER add
       automatically add the principal if it doesn't exist (service principals only)
       .PARAMETER chain
       Include certificate chain in output
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER csr_file
       CSR
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$request_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$profile_id,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ca,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$principal,
               [parameter(Mandatory=$false)]
                    
                [switch]$add,
               [parameter(Mandatory=$false)]
                    
                [switch]$chain,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$csr_file,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($request_type) { $ObjParams | Add-Member -NotePropertyName request_type -NotePropertyValue $request_type }
       if ($profile_id) { $ObjParams | Add-Member -NotePropertyName profile_id -NotePropertyValue $profile_id }
       if ($ca) { $ObjParams | Add-Member -NotePropertyName cacn -NotePropertyValue $ca }
       if ($principal) { $ObjParams | Add-Member -NotePropertyName principal -NotePropertyValue $principal }
       if ($add.IsPresent) { $ObjParams | Add-Member -NotePropertyName add -NotePropertyValue $true }
       if ($chain.IsPresent) { $ObjParams | Add-Member -NotePropertyName chain -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cert_request/1"
                params  = @(@($csr_file),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcert_revoke {
        <#
            .DESCRIPTION
       Revoke a certificate.
       .PARAMETER revocation_reason
       Reason for revoking the certificate (0-10). Type "ipa help cert" for revocation reason details.
       .PARAMETER ca
       Name of issuing CA
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER serial_number
       Serial number in decimal or if prefixed with 0x in hexadecimal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$revocation_reason,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ca,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$serial_number,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($revocation_reason) { $ObjParams | Add-Member -NotePropertyName revocation_reason -NotePropertyValue $revocation_reason }
       if ($ca) { $ObjParams | Add-Member -NotePropertyName cacn -NotePropertyValue $ca }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cert_revoke/1"
                params  = @(@($serial_number),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcert_show {
        <#
            .DESCRIPTION
       Retrieve an existing certificate.
       .PARAMETER ca
       Name of issuing CA
       .PARAMETER out
       File to store the certificate in.
       .PARAMETER chain
       Include certificate chain in output
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER serial_number
       Serial number in decimal or if prefixed with 0x in hexadecimal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ca,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$out,
               [parameter(Mandatory=$false)]
                    
                [switch]$chain,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$serial_number,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($ca) { $ObjParams | Add-Member -NotePropertyName cacn -NotePropertyValue $ca }
       if ($out) { $ObjParams | Add-Member -NotePropertyName out -NotePropertyValue $out }
       if ($chain.IsPresent) { $ObjParams | Add-Member -NotePropertyName chain -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cert_show/1"
                params  = @(@($serial_number),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcert_status {
        <#
            .DESCRIPTION
       Check the status of a certificate signing request.
       .PARAMETER ca
       Name of issuing CA
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER request_id
       Request id
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ca,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$request_id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($ca) { $ObjParams | Add-Member -NotePropertyName cacn -NotePropertyValue $ca }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cert_status/1"
                params  = @(@($request_id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIclass_find {
        <#
            .DESCRIPTION
       Search for classes.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "class_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIclass_show {
        <#
            .DESCRIPTION
       Display information about a class.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER full_name
       Full name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$full_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "class_show/1"
                params  = @(@($full_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcommand_defaults {
        <#
            .DESCRIPTION
       .PARAMETER params
       <params>
       .PARAMETER kw
       <kw>
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER full_name
       Full name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$params,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$kw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$full_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($params) { $ObjParams | Add-Member -NotePropertyName params -NotePropertyValue $params }
       if ($kw) { $ObjParams | Add-Member -NotePropertyName kw -NotePropertyValue $kw }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "command_defaults/1"
                params  = @(@($full_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcommand_find {
        <#
            .DESCRIPTION
       Search for commands.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "command_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcommand_show {
        <#
            .DESCRIPTION
       Display information about a command.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER full_name
       Full name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$full_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "command_show/1"
                params  = @(@($full_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcompat_is_enabled {
        <#
            .DESCRIPTION
       Determine whether Schema Compatibility plugin is configured to serve trusted domain users and groups
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "compat_is_enabled/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIconfig_mod {
        <#
            .DESCRIPTION
       Modify configuration options.
       .PARAMETER maxusername
       Maximum username length
       .PARAMETER homedirectory
       Default location of home directories
       .PARAMETER defaultshell
       Default shell for new users
       .PARAMETER defaultgroup
       Default group for new users
       .PARAMETER emaildomain
       Default e-mail domain
       .PARAMETER searchtimelimit
       Maximum amount of time (seconds) for a search (-1 or 0 is unlimited)
       .PARAMETER searchrecordslimit
       Maximum number of records to search (-1 or 0 is unlimited)
       .PARAMETER usersearch
       A comma-separated list of fields to search in when searching for users
       .PARAMETER groupsearch
       A comma-separated list of fields to search in when searching for groups
       .PARAMETER enable_migration
       Enable migration mode
       .PARAMETER groupobjectclasses
       Default group objectclasses (comma-separated list)
       .PARAMETER userobjectclasses
       Default user objectclasses (comma-separated list)
       .PARAMETER pwdexpnotify
       Number of days's notice of impending password expiration
       .PARAMETER ipaconfigstring
       Extra hashes to generate in password plug-in
       .PARAMETER ipaselinuxusermaporder
       Order in increasing priority of SELinux users, delimited by $
       .PARAMETER ipaselinuxusermapdefault
       Default SELinux user when no match is found in SELinux map rule
       .PARAMETER pac_type
       Default types of PAC supported for services
       .PARAMETER user_auth_type
       Default types of supported user authentication
       .PARAMETER ca_renewal_master_server
       Renewal master for IPA certificate authority
       .PARAMETER domain_resolution_order
       colon-separated list of domains used for short name qualification
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$maxusername,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$homedirectory,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$defaultshell,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$defaultgroup,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$emaildomain,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$searchtimelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$searchrecordslimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$usersearch,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$groupsearch,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$enable_migration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groupobjectclasses,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$userobjectclasses,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$pwdexpnotify,
               [parameter(Mandatory=$false)]
                    [ValidateSet("AllowNThash","KDC:Disable Last Success","KDC:Disable Lockout","KDC:Disable Default Preauth for SPNs")]
                [String[]]$ipaconfigstring,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ipaselinuxusermaporder,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ipaselinuxusermapdefault,
               [parameter(Mandatory=$false)]
                    [ValidateSet("MS-PAC","PAD","nfs:NONE")]
                [String[]]$pac_type,
               [parameter(Mandatory=$false)]
                    [ValidateSet("password","radius","otp","disabled")]
                [String[]]$user_auth_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ca_renewal_master_server,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$domain_resolution_order,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($maxusername) { $ObjParams | Add-Member -NotePropertyName ipamaxusernamelength -NotePropertyValue $maxusername }
       if ($homedirectory) { $ObjParams | Add-Member -NotePropertyName ipahomesrootdir -NotePropertyValue $homedirectory }
       if ($defaultshell) { $ObjParams | Add-Member -NotePropertyName ipadefaultloginshell -NotePropertyValue $defaultshell }
       if ($defaultgroup) { $ObjParams | Add-Member -NotePropertyName ipadefaultprimarygroup -NotePropertyValue $defaultgroup }
       if ($emaildomain) { $ObjParams | Add-Member -NotePropertyName ipadefaultemaildomain -NotePropertyValue $emaildomain }
       if ($searchtimelimit) { $ObjParams | Add-Member -NotePropertyName ipasearchtimelimit -NotePropertyValue $searchtimelimit }
       if ($searchrecordslimit) { $ObjParams | Add-Member -NotePropertyName ipasearchrecordslimit -NotePropertyValue $searchrecordslimit }
       if ($usersearch) { $ObjParams | Add-Member -NotePropertyName ipausersearchfields -NotePropertyValue $usersearch }
       if ($groupsearch) { $ObjParams | Add-Member -NotePropertyName ipagroupsearchfields -NotePropertyValue $groupsearch }
       if ($enable_migration.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipamigrationenabled -NotePropertyValue $true }
       if ($groupobjectclasses) { $ObjParams | Add-Member -NotePropertyName ipagroupobjectclasses -NotePropertyValue $groupobjectclasses }
       if ($userobjectclasses) { $ObjParams | Add-Member -NotePropertyName ipauserobjectclasses -NotePropertyValue $userobjectclasses }
       if ($pwdexpnotify) { $ObjParams | Add-Member -NotePropertyName ipapwdexpadvnotify -NotePropertyValue $pwdexpnotify }
       if ($ipaconfigstring) { $ObjParams | Add-Member -NotePropertyName ipaconfigstring -NotePropertyValue $ipaconfigstring }
       if ($ipaselinuxusermaporder) { $ObjParams | Add-Member -NotePropertyName ipaselinuxusermaporder -NotePropertyValue $ipaselinuxusermaporder }
       if ($ipaselinuxusermapdefault) { $ObjParams | Add-Member -NotePropertyName ipaselinuxusermapdefault -NotePropertyValue $ipaselinuxusermapdefault }
       if ($pac_type) { $ObjParams | Add-Member -NotePropertyName ipakrbauthzdata -NotePropertyValue $pac_type }
       if ($user_auth_type) { $ObjParams | Add-Member -NotePropertyName ipauserauthtype -NotePropertyValue $user_auth_type }
       if ($ca_renewal_master_server) { $ObjParams | Add-Member -NotePropertyName ca_renewal_master_server -NotePropertyValue $ca_renewal_master_server }
       if ($domain_resolution_order) { $ObjParams | Add-Member -NotePropertyName ipadomainresolutionorder -NotePropertyValue $domain_resolution_order }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "config_mod/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIconfig_show {
        <#
            .DESCRIPTION
       Show the current configuration.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "config_show/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcosentry_add {
        <#
            .DESCRIPTION
       .PARAMETER krbpwdpolicyreference
       <krbpwdpolicyreference>
       .PARAMETER cospriority
       <cospriority>
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER cn
       <cn>
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$krbpwdpolicyreference,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$cospriority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$cn,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($krbpwdpolicyreference) { $ObjParams | Add-Member -NotePropertyName krbpwdpolicyreference -NotePropertyValue $krbpwdpolicyreference }
       if ($cospriority) { $ObjParams | Add-Member -NotePropertyName cospriority -NotePropertyValue $cospriority }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cosentry_add/1"
                params  = @(@($cn),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcosentry_del {
        <#
            .DESCRIPTION
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER cn
       <cn>
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cn,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cosentry_del/1"
                params  = @(@($cn),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcosentry_find {
        <#
            .DESCRIPTION
       .PARAMETER cn
       <cn>
       .PARAMETER krbpwdpolicyreference
       <krbpwdpolicyreference>
       .PARAMETER cospriority
       <cospriority>
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("cn")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$cn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$krbpwdpolicyreference,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$cospriority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($cn) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $cn }
       if ($krbpwdpolicyreference) { $ObjParams | Add-Member -NotePropertyName krbpwdpolicyreference -NotePropertyValue $krbpwdpolicyreference }
       if ($cospriority) { $ObjParams | Add-Member -NotePropertyName cospriority -NotePropertyValue $cospriority }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cosentry_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcosentry_mod {
        <#
            .DESCRIPTION
       .PARAMETER krbpwdpolicyreference
       <krbpwdpolicyreference>
       .PARAMETER cospriority
       <cospriority>
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER cn
       <cn>
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$krbpwdpolicyreference,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$cospriority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$cn,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($krbpwdpolicyreference) { $ObjParams | Add-Member -NotePropertyName krbpwdpolicyreference -NotePropertyValue $krbpwdpolicyreference }
       if ($cospriority) { $ObjParams | Add-Member -NotePropertyName cospriority -NotePropertyValue $cospriority }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cosentry_mod/1"
                params  = @(@($cn),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIcosentry_show {
        <#
            .DESCRIPTION
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER cn
       <cn>
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$cn,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "cosentry_show/1"
                params  = @(@($cn),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdelegation_add {
        <#
            .DESCRIPTION
       Add a new delegation.
       .PARAMETER permissions
       Permissions to grant (read, write). Default is write.
       .PARAMETER attrs
       Attributes to which the delegation applies
       .PARAMETER membergroup
       User group to apply delegation to
       .PARAMETER group
       User group ACI grants access to
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$membergroup,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($membergroup) { $ObjParams | Add-Member -NotePropertyName memberof -NotePropertyValue $membergroup }
       if ($group) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $group }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "delegation_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdelegation_del {
        <#
            .DESCRIPTION
       Delete a delegation.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "delegation_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdelegation_find {
        <#
            .DESCRIPTION
       Search for delegations.
       .PARAMETER name
       Delegation name
       .PARAMETER permissions
       Permissions to grant (read, write). Default is write.
       .PARAMETER attrs
       Attributes to which the delegation applies
       .PARAMETER membergroup
       User group to apply delegation to
       .PARAMETER group
       User group ACI grants access to
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$membergroup,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName aciname -NotePropertyValue $name }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($membergroup) { $ObjParams | Add-Member -NotePropertyName memberof -NotePropertyValue $membergroup }
       if ($group) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $group }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "delegation_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdelegation_mod {
        <#
            .DESCRIPTION
       Modify a delegation.
       .PARAMETER permissions
       Permissions to grant (read, write). Default is write.
       .PARAMETER attrs
       Attributes to which the delegation applies
       .PARAMETER membergroup
       User group to apply delegation to
       .PARAMETER group
       User group ACI grants access to
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$membergroup,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($membergroup) { $ObjParams | Add-Member -NotePropertyName memberof -NotePropertyValue $membergroup }
       if ($group) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $group }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "delegation_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdelegation_show {
        <#
            .DESCRIPTION
       Display information about a delegation.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "delegation_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsconfig_mod {
        <#
            .DESCRIPTION
       Modify global DNS configuration.
       .PARAMETER forwarder
       Global forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT"
       .PARAMETER forward_policy
       Global forwarding policy. Set to "none" to disable any configured global forwarders.
       .PARAMETER allow_sync_ptr
       Allow synchronization of forward (A, AAAA) and reverse (PTR) records
       .PARAMETER ipadnsversion
       IPA DNS version
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$forwarder,
               [parameter(Mandatory=$false)]
                    [ValidateSet("only","first","none")]
                [String]$forward_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$allow_sync_ptr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ipadnsversion,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($forwarder) { $ObjParams | Add-Member -NotePropertyName idnsforwarders -NotePropertyValue $forwarder }
       if ($forward_policy) { $ObjParams | Add-Member -NotePropertyName idnsforwardpolicy -NotePropertyValue $forward_policy }
       if ($allow_sync_ptr.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnsallowsyncptr -NotePropertyValue $true }
       if ($zone_refresh) { $ObjParams | Add-Member -NotePropertyName idnszonerefresh -NotePropertyValue $zone_refresh }
       if ($ipadnsversion) { $ObjParams | Add-Member -NotePropertyName ipadnsversion -NotePropertyValue $ipadnsversion }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsconfig_mod/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsconfig_show {
        <#
            .DESCRIPTION
       Show the current global DNS configuration.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsconfig_show/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsforwardzone_add {
        <#
            .DESCRIPTION
       Create new DNS forward zone.
       .PARAMETER name_from_ip
       IP network to create reverse zone name from
       .PARAMETER forwarder
       Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT"
       .PARAMETER forward_policy
       Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER skip_overlap_check
       Force DNS zone creation even if it will overlap with an existing zone.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name_from_ip,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$forwarder,
               [parameter(Mandatory=$false)]
                    [ValidateSet("only","first","none")]
                [String]$forward_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$skip_overlap_check,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name_from_ip) { $ObjParams | Add-Member -NotePropertyName name_from_ip -NotePropertyValue $name_from_ip }
       if ($forwarder) { $ObjParams | Add-Member -NotePropertyName idnsforwarders -NotePropertyValue $forwarder }
       if ($forward_policy) { $ObjParams | Add-Member -NotePropertyName idnsforwardpolicy -NotePropertyValue $forward_policy }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($skip_overlap_check.IsPresent) { $ObjParams | Add-Member -NotePropertyName skip_overlap_check -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsforwardzone_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsforwardzone_add_permission {
        <#
            .DESCRIPTION
       Add a permission for per-forward zone access delegation.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsforwardzone_add_permission/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsforwardzone_del {
        <#
            .DESCRIPTION
       Delete DNS forward zone.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsforwardzone_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsforwardzone_disable {
        <#
            .DESCRIPTION
       Disable DNS Forward Zone.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsforwardzone_disable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsforwardzone_enable {
        <#
            .DESCRIPTION
       Enable DNS Forward Zone.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsforwardzone_enable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsforwardzone_find {
        <#
            .DESCRIPTION
       Search for DNS forward zones.
       .PARAMETER name
       Zone name (FQDN)
       .PARAMETER name_from_ip
       IP network to create reverse zone name from
       .PARAMETER zone_active
       Is zone active?
       .PARAMETER forwarder
       Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT"
       .PARAMETER forward_policy
       Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name_from_ip,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$zone_active,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$forwarder,
               [parameter(Mandatory=$false)]
                    [ValidateSet("only","first","none")]
                [String]$forward_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName idnsname -NotePropertyValue $name }
       if ($name_from_ip) { $ObjParams | Add-Member -NotePropertyName name_from_ip -NotePropertyValue $name_from_ip }
       if ($zone_active.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnszoneactive -NotePropertyValue $true }
       if ($forwarder) { $ObjParams | Add-Member -NotePropertyName idnsforwarders -NotePropertyValue $forwarder }
       if ($forward_policy) { $ObjParams | Add-Member -NotePropertyName idnsforwardpolicy -NotePropertyValue $forward_policy }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsforwardzone_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsforwardzone_mod {
        <#
            .DESCRIPTION
       Modify DNS forward zone.
       .PARAMETER name_from_ip
       IP network to create reverse zone name from
       .PARAMETER forwarder
       Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT"
       .PARAMETER forward_policy
       Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name_from_ip,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$forwarder,
               [parameter(Mandatory=$false)]
                    [ValidateSet("only","first","none")]
                [String]$forward_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name_from_ip) { $ObjParams | Add-Member -NotePropertyName name_from_ip -NotePropertyValue $name_from_ip }
       if ($forwarder) { $ObjParams | Add-Member -NotePropertyName idnsforwarders -NotePropertyValue $forwarder }
       if ($forward_policy) { $ObjParams | Add-Member -NotePropertyName idnsforwardpolicy -NotePropertyValue $forward_policy }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsforwardzone_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsforwardzone_remove_permission {
        <#
            .DESCRIPTION
       Remove a permission for per-forward zone access delegation.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsforwardzone_remove_permission/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsforwardzone_show {
        <#
            .DESCRIPTION
       Display information about a DNS forward zone.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsforwardzone_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsrecord_add {
        <#
            .DESCRIPTION
       Add new DNS resource record.
       .PARAMETER ttl
       Time to live
       .PARAMETER class
       <dnsclass>
       .PARAMETER a_rec
       Raw A records
       .PARAMETER a_ip_address
       A IP Address
       .PARAMETER a_create_reverse
       Create reverse record for this IP Address
       .PARAMETER aaaa_rec
       Raw AAAA records
       .PARAMETER aaaa_ip_address
       AAAA IP Address
       .PARAMETER aaaa_create_reverse
       Create reverse record for this IP Address
       .PARAMETER a6_rec
       Raw A6 records
       .PARAMETER a6_data
       A6 Record data
       .PARAMETER afsdb_rec
       Raw AFSDB records
       .PARAMETER afsdb_subtype
       AFSDB Subtype
       .PARAMETER afsdb_hostname
       AFSDB Hostname
       .PARAMETER apl_rec
       Raw APL records
       .PARAMETER cert_rec
       Raw CERT records
       .PARAMETER cert_type
       CERT Certificate Type
       .PARAMETER cert_key_tag
       CERT Key Tag
       .PARAMETER cert_algorithm
       CERT Algorithm
       .PARAMETER cert_certificate_or_crl
       CERT Certificate/CRL
       .PARAMETER cname_rec
       Raw CNAME records
       .PARAMETER cname_hostname
       A hostname which this alias hostname points to
       .PARAMETER dhcid_rec
       Raw DHCID records
       .PARAMETER dlv_rec
       Raw DLV records
       .PARAMETER dlv_key_tag
       DLV Key Tag
       .PARAMETER dlv_algorithm
       DLV Algorithm
       .PARAMETER dlv_digest_type
       DLV Digest Type
       .PARAMETER dlv_digest
       DLV Digest
       .PARAMETER dname_rec
       Raw DNAME records
       .PARAMETER dname_target
       DNAME Target
       .PARAMETER ds_rec
       Raw DS records
       .PARAMETER ds_key_tag
       DS Key Tag
       .PARAMETER ds_algorithm
       DS Algorithm
       .PARAMETER ds_digest_type
       DS Digest Type
       .PARAMETER ds_digest
       DS Digest
       .PARAMETER hip_rec
       Raw HIP records
       .PARAMETER ipseckey_rec
       Raw IPSECKEY records
       .PARAMETER key_rec
       Raw KEY records
       .PARAMETER kx_rec
       Raw KX records
       .PARAMETER kx_preference
       Preference given to this exchanger. Lower values are more preferred
       .PARAMETER kx_exchanger
       A host willing to act as a key exchanger
       .PARAMETER loc_rec
       Raw LOC records
       .PARAMETER loc_lat_deg
       LOC Degrees Latitude
       .PARAMETER loc_lat_min
       LOC Minutes Latitude
       .PARAMETER loc_lat_sec
       LOC Seconds Latitude
       .PARAMETER loc_lat_dir
       LOC Direction Latitude
       .PARAMETER loc_lon_deg
       LOC Degrees Longitude
       .PARAMETER loc_lon_min
       LOC Minutes Longitude
       .PARAMETER loc_lon_sec
       LOC Seconds Longitude
       .PARAMETER loc_lon_dir
       LOC Direction Longitude
       .PARAMETER loc_altitude
       LOC Altitude
       .PARAMETER loc_size
       LOC Size
       .PARAMETER loc_h_precision
       LOC Horizontal Precision
       .PARAMETER loc_v_precision
       LOC Vertical Precision
       .PARAMETER mx_rec
       Raw MX records
       .PARAMETER mx_preference
       Preference given to this exchanger. Lower values are more preferred
       .PARAMETER mx_exchanger
       A host willing to act as a mail exchanger
       .PARAMETER naptr_rec
       Raw NAPTR records
       .PARAMETER naptr_order
       NAPTR Order
       .PARAMETER naptr_preference
       NAPTR Preference
       .PARAMETER naptr_flags
       NAPTR Flags
       .PARAMETER naptr_service
       NAPTR Service
       .PARAMETER naptr_regexp
       NAPTR Regular Expression
       .PARAMETER naptr_replacement
       NAPTR Replacement
       .PARAMETER ns_rec
       Raw NS records
       .PARAMETER ns_hostname
       NS Hostname
       .PARAMETER nsec_rec
       Raw NSEC records
       .PARAMETER ptr_rec
       Raw PTR records
       .PARAMETER ptr_hostname
       The hostname this reverse record points to
       .PARAMETER rrsig_rec
       Raw RRSIG records
       .PARAMETER rp_rec
       Raw RP records
       .PARAMETER sig_rec
       Raw SIG records
       .PARAMETER spf_rec
       Raw SPF records
       .PARAMETER srv_rec
       Raw SRV records
       .PARAMETER srv_priority
       Lower number means higher priority. Clients will attempt to contact the server with the lowest-numbered priority they can reach.
       .PARAMETER srv_weight
       Relative weight for entries with the same priority.
       .PARAMETER srv_port
       SRV Port
       .PARAMETER srv_target
       The domain name of the target host or '.' if the service is decidedly not available at this domain
       .PARAMETER sshfp_rec
       Raw SSHFP records
       .PARAMETER sshfp_algorithm
       SSHFP Algorithm
       .PARAMETER sshfp_fp_type
       SSHFP Fingerprint Type
       .PARAMETER sshfp_fingerprint
       SSHFP Fingerprint
       .PARAMETER tlsa_rec
       Raw TLSA records
       .PARAMETER tlsa_cert_usage
       TLSA Certificate Usage
       .PARAMETER tlsa_selector
       TLSA Selector
       .PARAMETER tlsa_matching_type
       TLSA Matching Type
       .PARAMETER tlsa_cert_association_data
       TLSA Certificate Association Data
       .PARAMETER txt_rec
       Raw TXT records
       .PARAMETER txt_data
       TXT Text Data
       .PARAMETER uri_rec
       Raw URI records
       .PARAMETER uri_priority
       Lower number means higher priority. Clients will attempt to contact the URI with the lowest-numbered priority they can reach.
       .PARAMETER uri_weight
       Relative weight for entries with the same priority.
       .PARAMETER uri_target
       Target Uniform Resource Identifier according to RFC 3986
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER force
       force NS record creation even if its hostname is not in DNS
       .PARAMETER structured
       Parse all raw DNS records and return them in a structured way
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER dnszone
       Zone name (FQDN)
       .PARAMETER name
       Record name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ttl,
               [parameter(Mandatory=$false)]
                    [ValidateSet("IN","CS","CH","HS")]
                [String]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$a_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$a_ip_address,
               [parameter(Mandatory=$false)]
                    
                [switch]$a_create_reverse,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$aaaa_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$aaaa_ip_address,
               [parameter(Mandatory=$false)]
                    
                [switch]$aaaa_create_reverse,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$a6_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$a6_data,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$afsdb_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$afsdb_subtype,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$afsdb_hostname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$apl_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cert_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$cert_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$cert_key_tag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$cert_algorithm,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$cert_certificate_or_crl,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cname_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$cname_hostname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dhcid_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dlv_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$dlv_key_tag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$dlv_algorithm,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$dlv_digest_type,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[0-9a-fA-F]+$")]
                [String]$dlv_digest,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dname_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$dname_target,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ds_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ds_key_tag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ds_algorithm,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ds_digest_type,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[0-9a-fA-F]+$")]
                [String]$ds_digest,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hip_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ipseckey_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$key_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$kx_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$kx_preference,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$kx_exchanger,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$loc_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$loc_lat_deg,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$loc_lat_min,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_lat_sec,
               [parameter(Mandatory=$false)]
                    [ValidateSet("N","S")]
                [String]$loc_lat_dir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$loc_lon_deg,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$loc_lon_min,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_lon_sec,
               [parameter(Mandatory=$false)]
                    [ValidateSet("E","W")]
                [String]$loc_lon_dir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_altitude,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_size,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_h_precision,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_v_precision,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$mx_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$mx_preference,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$mx_exchanger,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$naptr_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$naptr_order,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$naptr_preference,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$naptr_flags,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$naptr_service,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$naptr_regexp,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$naptr_replacement,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ns_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ns_hostname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$nsec_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ptr_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ptr_hostname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rrsig_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rp_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sig_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$spf_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$srv_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$srv_priority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$srv_weight,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$srv_port,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$srv_target,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshfp_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sshfp_algorithm,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sshfp_fp_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$sshfp_fingerprint,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$tlsa_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$tlsa_cert_usage,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$tlsa_selector,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$tlsa_matching_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$tlsa_cert_association_data,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$txt_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$txt_data,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$uri_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uri_priority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uri_weight,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$uri_target,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$force,
               [parameter(Mandatory=$false)]
                    
                [switch]$structured,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$dnszone,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($ttl) { $ObjParams | Add-Member -NotePropertyName dnsttl -NotePropertyValue $ttl }
       if ($class) { $ObjParams | Add-Member -NotePropertyName dnsclass -NotePropertyValue $class }
       if ($a_rec) { $ObjParams | Add-Member -NotePropertyName arecord -NotePropertyValue $a_rec }
       if ($a_ip_address) { $ObjParams | Add-Member -NotePropertyName a_part_ip_address -NotePropertyValue $a_ip_address }
       if ($a_create_reverse.IsPresent) { $ObjParams | Add-Member -NotePropertyName a_extra_create_reverse -NotePropertyValue $true }
       if ($aaaa_rec) { $ObjParams | Add-Member -NotePropertyName aaaarecord -NotePropertyValue $aaaa_rec }
       if ($aaaa_ip_address) { $ObjParams | Add-Member -NotePropertyName aaaa_part_ip_address -NotePropertyValue $aaaa_ip_address }
       if ($aaaa_create_reverse.IsPresent) { $ObjParams | Add-Member -NotePropertyName aaaa_extra_create_reverse -NotePropertyValue $true }
       if ($a6_rec) { $ObjParams | Add-Member -NotePropertyName a6record -NotePropertyValue $a6_rec }
       if ($a6_data) { $ObjParams | Add-Member -NotePropertyName a6_part_data -NotePropertyValue $a6_data }
       if ($afsdb_rec) { $ObjParams | Add-Member -NotePropertyName afsdbrecord -NotePropertyValue $afsdb_rec }
       if ($afsdb_subtype) { $ObjParams | Add-Member -NotePropertyName afsdb_part_subtype -NotePropertyValue $afsdb_subtype }
       if ($afsdb_hostname) { $ObjParams | Add-Member -NotePropertyName afsdb_part_hostname -NotePropertyValue $afsdb_hostname }
       if ($apl_rec) { $ObjParams | Add-Member -NotePropertyName aplrecord -NotePropertyValue $apl_rec }
       if ($cert_rec) { $ObjParams | Add-Member -NotePropertyName certrecord -NotePropertyValue $cert_rec }
       if ($cert_type) { $ObjParams | Add-Member -NotePropertyName cert_part_type -NotePropertyValue $cert_type }
       if ($cert_key_tag) { $ObjParams | Add-Member -NotePropertyName cert_part_key_tag -NotePropertyValue $cert_key_tag }
       if ($cert_algorithm) { $ObjParams | Add-Member -NotePropertyName cert_part_algorithm -NotePropertyValue $cert_algorithm }
       if ($cert_certificate_or_crl) { $ObjParams | Add-Member -NotePropertyName cert_part_certificate_or_crl -NotePropertyValue $cert_certificate_or_crl }
       if ($cname_rec) { $ObjParams | Add-Member -NotePropertyName cnamerecord -NotePropertyValue $cname_rec }
       if ($cname_hostname) { $ObjParams | Add-Member -NotePropertyName cname_part_hostname -NotePropertyValue $cname_hostname }
       if ($dhcid_rec) { $ObjParams | Add-Member -NotePropertyName dhcidrecord -NotePropertyValue $dhcid_rec }
       if ($dlv_rec) { $ObjParams | Add-Member -NotePropertyName dlvrecord -NotePropertyValue $dlv_rec }
       if ($dlv_key_tag) { $ObjParams | Add-Member -NotePropertyName dlv_part_key_tag -NotePropertyValue $dlv_key_tag }
       if ($dlv_algorithm) { $ObjParams | Add-Member -NotePropertyName dlv_part_algorithm -NotePropertyValue $dlv_algorithm }
       if ($dlv_digest_type) { $ObjParams | Add-Member -NotePropertyName dlv_part_digest_type -NotePropertyValue $dlv_digest_type }
       if ($dlv_digest) { $ObjParams | Add-Member -NotePropertyName dlv_part_digest -NotePropertyValue $dlv_digest }
       if ($dname_rec) { $ObjParams | Add-Member -NotePropertyName dnamerecord -NotePropertyValue $dname_rec }
       if ($dname_target) { $ObjParams | Add-Member -NotePropertyName dname_part_target -NotePropertyValue $dname_target }
       if ($ds_rec) { $ObjParams | Add-Member -NotePropertyName dsrecord -NotePropertyValue $ds_rec }
       if ($ds_key_tag) { $ObjParams | Add-Member -NotePropertyName ds_part_key_tag -NotePropertyValue $ds_key_tag }
       if ($ds_algorithm) { $ObjParams | Add-Member -NotePropertyName ds_part_algorithm -NotePropertyValue $ds_algorithm }
       if ($ds_digest_type) { $ObjParams | Add-Member -NotePropertyName ds_part_digest_type -NotePropertyValue $ds_digest_type }
       if ($ds_digest) { $ObjParams | Add-Member -NotePropertyName ds_part_digest -NotePropertyValue $ds_digest }
       if ($hip_rec) { $ObjParams | Add-Member -NotePropertyName hiprecord -NotePropertyValue $hip_rec }
       if ($ipseckey_rec) { $ObjParams | Add-Member -NotePropertyName ipseckeyrecord -NotePropertyValue $ipseckey_rec }
       if ($key_rec) { $ObjParams | Add-Member -NotePropertyName keyrecord -NotePropertyValue $key_rec }
       if ($kx_rec) { $ObjParams | Add-Member -NotePropertyName kxrecord -NotePropertyValue $kx_rec }
       if ($kx_preference) { $ObjParams | Add-Member -NotePropertyName kx_part_preference -NotePropertyValue $kx_preference }
       if ($kx_exchanger) { $ObjParams | Add-Member -NotePropertyName kx_part_exchanger -NotePropertyValue $kx_exchanger }
       if ($loc_rec) { $ObjParams | Add-Member -NotePropertyName locrecord -NotePropertyValue $loc_rec }
       if ($loc_lat_deg) { $ObjParams | Add-Member -NotePropertyName loc_part_lat_deg -NotePropertyValue $loc_lat_deg }
       if ($loc_lat_min) { $ObjParams | Add-Member -NotePropertyName loc_part_lat_min -NotePropertyValue $loc_lat_min }
       if ($loc_lat_sec) { $ObjParams | Add-Member -NotePropertyName loc_part_lat_sec -NotePropertyValue $loc_lat_sec }
       if ($loc_lat_dir) { $ObjParams | Add-Member -NotePropertyName loc_part_lat_dir -NotePropertyValue $loc_lat_dir }
       if ($loc_lon_deg) { $ObjParams | Add-Member -NotePropertyName loc_part_lon_deg -NotePropertyValue $loc_lon_deg }
       if ($loc_lon_min) { $ObjParams | Add-Member -NotePropertyName loc_part_lon_min -NotePropertyValue $loc_lon_min }
       if ($loc_lon_sec) { $ObjParams | Add-Member -NotePropertyName loc_part_lon_sec -NotePropertyValue $loc_lon_sec }
       if ($loc_lon_dir) { $ObjParams | Add-Member -NotePropertyName loc_part_lon_dir -NotePropertyValue $loc_lon_dir }
       if ($loc_altitude) { $ObjParams | Add-Member -NotePropertyName loc_part_altitude -NotePropertyValue $loc_altitude }
       if ($loc_size) { $ObjParams | Add-Member -NotePropertyName loc_part_size -NotePropertyValue $loc_size }
       if ($loc_h_precision) { $ObjParams | Add-Member -NotePropertyName loc_part_h_precision -NotePropertyValue $loc_h_precision }
       if ($loc_v_precision) { $ObjParams | Add-Member -NotePropertyName loc_part_v_precision -NotePropertyValue $loc_v_precision }
       if ($mx_rec) { $ObjParams | Add-Member -NotePropertyName mxrecord -NotePropertyValue $mx_rec }
       if ($mx_preference) { $ObjParams | Add-Member -NotePropertyName mx_part_preference -NotePropertyValue $mx_preference }
       if ($mx_exchanger) { $ObjParams | Add-Member -NotePropertyName mx_part_exchanger -NotePropertyValue $mx_exchanger }
       if ($naptr_rec) { $ObjParams | Add-Member -NotePropertyName naptrrecord -NotePropertyValue $naptr_rec }
       if ($naptr_order) { $ObjParams | Add-Member -NotePropertyName naptr_part_order -NotePropertyValue $naptr_order }
       if ($naptr_preference) { $ObjParams | Add-Member -NotePropertyName naptr_part_preference -NotePropertyValue $naptr_preference }
       if ($naptr_flags) { $ObjParams | Add-Member -NotePropertyName naptr_part_flags -NotePropertyValue $naptr_flags }
       if ($naptr_service) { $ObjParams | Add-Member -NotePropertyName naptr_part_service -NotePropertyValue $naptr_service }
       if ($naptr_regexp) { $ObjParams | Add-Member -NotePropertyName naptr_part_regexp -NotePropertyValue $naptr_regexp }
       if ($naptr_replacement) { $ObjParams | Add-Member -NotePropertyName naptr_part_replacement -NotePropertyValue $naptr_replacement }
       if ($ns_rec) { $ObjParams | Add-Member -NotePropertyName nsrecord -NotePropertyValue $ns_rec }
       if ($ns_hostname) { $ObjParams | Add-Member -NotePropertyName ns_part_hostname -NotePropertyValue $ns_hostname }
       if ($nsec_rec) { $ObjParams | Add-Member -NotePropertyName nsecrecord -NotePropertyValue $nsec_rec }
       if ($ptr_rec) { $ObjParams | Add-Member -NotePropertyName ptrrecord -NotePropertyValue $ptr_rec }
       if ($ptr_hostname) { $ObjParams | Add-Member -NotePropertyName ptr_part_hostname -NotePropertyValue $ptr_hostname }
       if ($rrsig_rec) { $ObjParams | Add-Member -NotePropertyName rrsigrecord -NotePropertyValue $rrsig_rec }
       if ($rp_rec) { $ObjParams | Add-Member -NotePropertyName rprecord -NotePropertyValue $rp_rec }
       if ($sig_rec) { $ObjParams | Add-Member -NotePropertyName sigrecord -NotePropertyValue $sig_rec }
       if ($spf_rec) { $ObjParams | Add-Member -NotePropertyName spfrecord -NotePropertyValue $spf_rec }
       if ($srv_rec) { $ObjParams | Add-Member -NotePropertyName srvrecord -NotePropertyValue $srv_rec }
       if ($srv_priority) { $ObjParams | Add-Member -NotePropertyName srv_part_priority -NotePropertyValue $srv_priority }
       if ($srv_weight) { $ObjParams | Add-Member -NotePropertyName srv_part_weight -NotePropertyValue $srv_weight }
       if ($srv_port) { $ObjParams | Add-Member -NotePropertyName srv_part_port -NotePropertyValue $srv_port }
       if ($srv_target) { $ObjParams | Add-Member -NotePropertyName srv_part_target -NotePropertyValue $srv_target }
       if ($sshfp_rec) { $ObjParams | Add-Member -NotePropertyName sshfprecord -NotePropertyValue $sshfp_rec }
       if ($sshfp_algorithm) { $ObjParams | Add-Member -NotePropertyName sshfp_part_algorithm -NotePropertyValue $sshfp_algorithm }
       if ($sshfp_fp_type) { $ObjParams | Add-Member -NotePropertyName sshfp_part_fp_type -NotePropertyValue $sshfp_fp_type }
       if ($sshfp_fingerprint) { $ObjParams | Add-Member -NotePropertyName sshfp_part_fingerprint -NotePropertyValue $sshfp_fingerprint }
       if ($tlsa_rec) { $ObjParams | Add-Member -NotePropertyName tlsarecord -NotePropertyValue $tlsa_rec }
       if ($tlsa_cert_usage) { $ObjParams | Add-Member -NotePropertyName tlsa_part_cert_usage -NotePropertyValue $tlsa_cert_usage }
       if ($tlsa_selector) { $ObjParams | Add-Member -NotePropertyName tlsa_part_selector -NotePropertyValue $tlsa_selector }
       if ($tlsa_matching_type) { $ObjParams | Add-Member -NotePropertyName tlsa_part_matching_type -NotePropertyValue $tlsa_matching_type }
       if ($tlsa_cert_association_data) { $ObjParams | Add-Member -NotePropertyName tlsa_part_cert_association_data -NotePropertyValue $tlsa_cert_association_data }
       if ($txt_rec) { $ObjParams | Add-Member -NotePropertyName txtrecord -NotePropertyValue $txt_rec }
       if ($txt_data) { $ObjParams | Add-Member -NotePropertyName txt_part_data -NotePropertyValue $txt_data }
       if ($uri_rec) { $ObjParams | Add-Member -NotePropertyName urirecord -NotePropertyValue $uri_rec }
       if ($uri_priority) { $ObjParams | Add-Member -NotePropertyName uri_part_priority -NotePropertyValue $uri_priority }
       if ($uri_weight) { $ObjParams | Add-Member -NotePropertyName uri_part_weight -NotePropertyValue $uri_weight }
       if ($uri_target) { $ObjParams | Add-Member -NotePropertyName uri_part_target -NotePropertyValue $uri_target }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($force.IsPresent) { $ObjParams | Add-Member -NotePropertyName force -NotePropertyValue $true }
       if ($structured.IsPresent) { $ObjParams | Add-Member -NotePropertyName structured -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsrecord_add/1"
                params  = @(@($dnszone,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsrecord_del {
        <#
            .DESCRIPTION
       Delete DNS resource record.
       .PARAMETER ttl
       Time to live
       .PARAMETER class
       <dnsclass>
       .PARAMETER a_rec
       Raw A records
       .PARAMETER aaaa_rec
       Raw AAAA records
       .PARAMETER a6_rec
       Raw A6 records
       .PARAMETER afsdb_rec
       Raw AFSDB records
       .PARAMETER apl_rec
       Raw APL records
       .PARAMETER cert_rec
       Raw CERT records
       .PARAMETER cname_rec
       Raw CNAME records
       .PARAMETER dhcid_rec
       Raw DHCID records
       .PARAMETER dlv_rec
       Raw DLV records
       .PARAMETER dname_rec
       Raw DNAME records
       .PARAMETER ds_rec
       Raw DS records
       .PARAMETER hip_rec
       Raw HIP records
       .PARAMETER ipseckey_rec
       Raw IPSECKEY records
       .PARAMETER key_rec
       Raw KEY records
       .PARAMETER kx_rec
       Raw KX records
       .PARAMETER loc_rec
       Raw LOC records
       .PARAMETER mx_rec
       Raw MX records
       .PARAMETER naptr_rec
       Raw NAPTR records
       .PARAMETER ns_rec
       Raw NS records
       .PARAMETER nsec_rec
       Raw NSEC records
       .PARAMETER ptr_rec
       Raw PTR records
       .PARAMETER rrsig_rec
       Raw RRSIG records
       .PARAMETER rp_rec
       Raw RP records
       .PARAMETER sig_rec
       Raw SIG records
       .PARAMETER spf_rec
       Raw SPF records
       .PARAMETER srv_rec
       Raw SRV records
       .PARAMETER sshfp_rec
       Raw SSHFP records
       .PARAMETER tlsa_rec
       Raw TLSA records
       .PARAMETER txt_rec
       Raw TXT records
       .PARAMETER uri_rec
       Raw URI records
       .PARAMETER del_all
       Delete all associated records
       .PARAMETER structured
       Parse all raw DNS records and return them in a structured way
       .PARAMETER raw
       <raw>
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER dnszone
       Zone name (FQDN)
       .PARAMETER name
       Record name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ttl,
               [parameter(Mandatory=$false)]
                    [ValidateSet("IN","CS","CH","HS")]
                [String]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$a_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$aaaa_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$a6_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$afsdb_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$apl_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cert_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cname_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dhcid_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dlv_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dname_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ds_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hip_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ipseckey_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$key_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$kx_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$loc_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$mx_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$naptr_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ns_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$nsec_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ptr_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rrsig_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rp_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sig_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$spf_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$srv_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshfp_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$tlsa_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$txt_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$uri_rec,
               [parameter(Mandatory=$false)]
                    
                [switch]$del_all,
               [parameter(Mandatory=$false)]
                    
                [switch]$structured,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$dnszone,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($ttl) { $ObjParams | Add-Member -NotePropertyName dnsttl -NotePropertyValue $ttl }
       if ($class) { $ObjParams | Add-Member -NotePropertyName dnsclass -NotePropertyValue $class }
       if ($a_rec) { $ObjParams | Add-Member -NotePropertyName arecord -NotePropertyValue $a_rec }
       if ($aaaa_rec) { $ObjParams | Add-Member -NotePropertyName aaaarecord -NotePropertyValue $aaaa_rec }
       if ($a6_rec) { $ObjParams | Add-Member -NotePropertyName a6record -NotePropertyValue $a6_rec }
       if ($afsdb_rec) { $ObjParams | Add-Member -NotePropertyName afsdbrecord -NotePropertyValue $afsdb_rec }
       if ($apl_rec) { $ObjParams | Add-Member -NotePropertyName aplrecord -NotePropertyValue $apl_rec }
       if ($cert_rec) { $ObjParams | Add-Member -NotePropertyName certrecord -NotePropertyValue $cert_rec }
       if ($cname_rec) { $ObjParams | Add-Member -NotePropertyName cnamerecord -NotePropertyValue $cname_rec }
       if ($dhcid_rec) { $ObjParams | Add-Member -NotePropertyName dhcidrecord -NotePropertyValue $dhcid_rec }
       if ($dlv_rec) { $ObjParams | Add-Member -NotePropertyName dlvrecord -NotePropertyValue $dlv_rec }
       if ($dname_rec) { $ObjParams | Add-Member -NotePropertyName dnamerecord -NotePropertyValue $dname_rec }
       if ($ds_rec) { $ObjParams | Add-Member -NotePropertyName dsrecord -NotePropertyValue $ds_rec }
       if ($hip_rec) { $ObjParams | Add-Member -NotePropertyName hiprecord -NotePropertyValue $hip_rec }
       if ($ipseckey_rec) { $ObjParams | Add-Member -NotePropertyName ipseckeyrecord -NotePropertyValue $ipseckey_rec }
       if ($key_rec) { $ObjParams | Add-Member -NotePropertyName keyrecord -NotePropertyValue $key_rec }
       if ($kx_rec) { $ObjParams | Add-Member -NotePropertyName kxrecord -NotePropertyValue $kx_rec }
       if ($loc_rec) { $ObjParams | Add-Member -NotePropertyName locrecord -NotePropertyValue $loc_rec }
       if ($mx_rec) { $ObjParams | Add-Member -NotePropertyName mxrecord -NotePropertyValue $mx_rec }
       if ($naptr_rec) { $ObjParams | Add-Member -NotePropertyName naptrrecord -NotePropertyValue $naptr_rec }
       if ($ns_rec) { $ObjParams | Add-Member -NotePropertyName nsrecord -NotePropertyValue $ns_rec }
       if ($nsec_rec) { $ObjParams | Add-Member -NotePropertyName nsecrecord -NotePropertyValue $nsec_rec }
       if ($ptr_rec) { $ObjParams | Add-Member -NotePropertyName ptrrecord -NotePropertyValue $ptr_rec }
       if ($rrsig_rec) { $ObjParams | Add-Member -NotePropertyName rrsigrecord -NotePropertyValue $rrsig_rec }
       if ($rp_rec) { $ObjParams | Add-Member -NotePropertyName rprecord -NotePropertyValue $rp_rec }
       if ($sig_rec) { $ObjParams | Add-Member -NotePropertyName sigrecord -NotePropertyValue $sig_rec }
       if ($spf_rec) { $ObjParams | Add-Member -NotePropertyName spfrecord -NotePropertyValue $spf_rec }
       if ($srv_rec) { $ObjParams | Add-Member -NotePropertyName srvrecord -NotePropertyValue $srv_rec }
       if ($sshfp_rec) { $ObjParams | Add-Member -NotePropertyName sshfprecord -NotePropertyValue $sshfp_rec }
       if ($tlsa_rec) { $ObjParams | Add-Member -NotePropertyName tlsarecord -NotePropertyValue $tlsa_rec }
       if ($txt_rec) { $ObjParams | Add-Member -NotePropertyName txtrecord -NotePropertyValue $txt_rec }
       if ($uri_rec) { $ObjParams | Add-Member -NotePropertyName urirecord -NotePropertyValue $uri_rec }
       if ($del_all.IsPresent) { $ObjParams | Add-Member -NotePropertyName del_all -NotePropertyValue $true }
       if ($structured.IsPresent) { $ObjParams | Add-Member -NotePropertyName structured -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsrecord_del/1"
                params  = @(@($dnszone,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsrecord_delentry {
        <#
            .DESCRIPTION
       
    Delete DNS record entry.
     
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER dnszone
       Zone name (FQDN)
       .PARAMETER name
       Record name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$dnszone,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsrecord_delentry/1"
                params  = @(@($dnszone,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsrecord_find {
        <#
            .DESCRIPTION
       Search for DNS resources.
       .PARAMETER name
       Record name
       .PARAMETER ttl
       Time to live
       .PARAMETER class
       <dnsclass>
       .PARAMETER a_rec
       Raw A records
       .PARAMETER aaaa_rec
       Raw AAAA records
       .PARAMETER a6_rec
       Raw A6 records
       .PARAMETER afsdb_rec
       Raw AFSDB records
       .PARAMETER apl_rec
       Raw APL records
       .PARAMETER cert_rec
       Raw CERT records
       .PARAMETER cname_rec
       Raw CNAME records
       .PARAMETER dhcid_rec
       Raw DHCID records
       .PARAMETER dlv_rec
       Raw DLV records
       .PARAMETER dname_rec
       Raw DNAME records
       .PARAMETER ds_rec
       Raw DS records
       .PARAMETER hip_rec
       Raw HIP records
       .PARAMETER ipseckey_rec
       Raw IPSECKEY records
       .PARAMETER key_rec
       Raw KEY records
       .PARAMETER kx_rec
       Raw KX records
       .PARAMETER loc_rec
       Raw LOC records
       .PARAMETER mx_rec
       Raw MX records
       .PARAMETER naptr_rec
       Raw NAPTR records
       .PARAMETER ns_rec
       Raw NS records
       .PARAMETER nsec_rec
       Raw NSEC records
       .PARAMETER ptr_rec
       Raw PTR records
       .PARAMETER rrsig_rec
       Raw RRSIG records
       .PARAMETER rp_rec
       Raw RP records
       .PARAMETER sig_rec
       Raw SIG records
       .PARAMETER spf_rec
       Raw SPF records
       .PARAMETER srv_rec
       Raw SRV records
       .PARAMETER sshfp_rec
       Raw SSHFP records
       .PARAMETER tlsa_rec
       Raw TLSA records
       .PARAMETER txt_rec
       Raw TXT records
       .PARAMETER uri_rec
       Raw URI records
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER structured
       Parse all raw DNS records and return them in a structured way
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER dnszone
       Zone name (FQDN)
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ttl,
               [parameter(Mandatory=$false)]
                    [ValidateSet("IN","CS","CH","HS")]
                [String]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$a_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$aaaa_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$a6_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$afsdb_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$apl_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cert_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cname_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dhcid_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dlv_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dname_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ds_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hip_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ipseckey_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$key_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$kx_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$loc_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$mx_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$naptr_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ns_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$nsec_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ptr_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rrsig_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rp_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sig_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$spf_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$srv_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshfp_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$tlsa_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$txt_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$uri_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$structured,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$dnszone,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName idnsname -NotePropertyValue $name }
       if ($ttl) { $ObjParams | Add-Member -NotePropertyName dnsttl -NotePropertyValue $ttl }
       if ($class) { $ObjParams | Add-Member -NotePropertyName dnsclass -NotePropertyValue $class }
       if ($a_rec) { $ObjParams | Add-Member -NotePropertyName arecord -NotePropertyValue $a_rec }
       if ($aaaa_rec) { $ObjParams | Add-Member -NotePropertyName aaaarecord -NotePropertyValue $aaaa_rec }
       if ($a6_rec) { $ObjParams | Add-Member -NotePropertyName a6record -NotePropertyValue $a6_rec }
       if ($afsdb_rec) { $ObjParams | Add-Member -NotePropertyName afsdbrecord -NotePropertyValue $afsdb_rec }
       if ($apl_rec) { $ObjParams | Add-Member -NotePropertyName aplrecord -NotePropertyValue $apl_rec }
       if ($cert_rec) { $ObjParams | Add-Member -NotePropertyName certrecord -NotePropertyValue $cert_rec }
       if ($cname_rec) { $ObjParams | Add-Member -NotePropertyName cnamerecord -NotePropertyValue $cname_rec }
       if ($dhcid_rec) { $ObjParams | Add-Member -NotePropertyName dhcidrecord -NotePropertyValue $dhcid_rec }
       if ($dlv_rec) { $ObjParams | Add-Member -NotePropertyName dlvrecord -NotePropertyValue $dlv_rec }
       if ($dname_rec) { $ObjParams | Add-Member -NotePropertyName dnamerecord -NotePropertyValue $dname_rec }
       if ($ds_rec) { $ObjParams | Add-Member -NotePropertyName dsrecord -NotePropertyValue $ds_rec }
       if ($hip_rec) { $ObjParams | Add-Member -NotePropertyName hiprecord -NotePropertyValue $hip_rec }
       if ($ipseckey_rec) { $ObjParams | Add-Member -NotePropertyName ipseckeyrecord -NotePropertyValue $ipseckey_rec }
       if ($key_rec) { $ObjParams | Add-Member -NotePropertyName keyrecord -NotePropertyValue $key_rec }
       if ($kx_rec) { $ObjParams | Add-Member -NotePropertyName kxrecord -NotePropertyValue $kx_rec }
       if ($loc_rec) { $ObjParams | Add-Member -NotePropertyName locrecord -NotePropertyValue $loc_rec }
       if ($mx_rec) { $ObjParams | Add-Member -NotePropertyName mxrecord -NotePropertyValue $mx_rec }
       if ($naptr_rec) { $ObjParams | Add-Member -NotePropertyName naptrrecord -NotePropertyValue $naptr_rec }
       if ($ns_rec) { $ObjParams | Add-Member -NotePropertyName nsrecord -NotePropertyValue $ns_rec }
       if ($nsec_rec) { $ObjParams | Add-Member -NotePropertyName nsecrecord -NotePropertyValue $nsec_rec }
       if ($ptr_rec) { $ObjParams | Add-Member -NotePropertyName ptrrecord -NotePropertyValue $ptr_rec }
       if ($rrsig_rec) { $ObjParams | Add-Member -NotePropertyName rrsigrecord -NotePropertyValue $rrsig_rec }
       if ($rp_rec) { $ObjParams | Add-Member -NotePropertyName rprecord -NotePropertyValue $rp_rec }
       if ($sig_rec) { $ObjParams | Add-Member -NotePropertyName sigrecord -NotePropertyValue $sig_rec }
       if ($spf_rec) { $ObjParams | Add-Member -NotePropertyName spfrecord -NotePropertyValue $spf_rec }
       if ($srv_rec) { $ObjParams | Add-Member -NotePropertyName srvrecord -NotePropertyValue $srv_rec }
       if ($sshfp_rec) { $ObjParams | Add-Member -NotePropertyName sshfprecord -NotePropertyValue $sshfp_rec }
       if ($tlsa_rec) { $ObjParams | Add-Member -NotePropertyName tlsarecord -NotePropertyValue $tlsa_rec }
       if ($txt_rec) { $ObjParams | Add-Member -NotePropertyName txtrecord -NotePropertyValue $txt_rec }
       if ($uri_rec) { $ObjParams | Add-Member -NotePropertyName urirecord -NotePropertyValue $uri_rec }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($structured.IsPresent) { $ObjParams | Add-Member -NotePropertyName structured -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsrecord_find/1"
                params  = @(@($dnszone,$criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsrecord_mod {
        <#
            .DESCRIPTION
       Modify a DNS resource record.
       .PARAMETER ttl
       Time to live
       .PARAMETER class
       <dnsclass>
       .PARAMETER a_rec
       Raw A records
       .PARAMETER a_ip_address
       A IP Address
       .PARAMETER aaaa_rec
       Raw AAAA records
       .PARAMETER aaaa_ip_address
       AAAA IP Address
       .PARAMETER a6_rec
       Raw A6 records
       .PARAMETER a6_data
       A6 Record data
       .PARAMETER afsdb_rec
       Raw AFSDB records
       .PARAMETER afsdb_subtype
       AFSDB Subtype
       .PARAMETER afsdb_hostname
       AFSDB Hostname
       .PARAMETER apl_rec
       Raw APL records
       .PARAMETER cert_rec
       Raw CERT records
       .PARAMETER cert_type
       CERT Certificate Type
       .PARAMETER cert_key_tag
       CERT Key Tag
       .PARAMETER cert_algorithm
       CERT Algorithm
       .PARAMETER cert_certificate_or_crl
       CERT Certificate/CRL
       .PARAMETER cname_rec
       Raw CNAME records
       .PARAMETER cname_hostname
       A hostname which this alias hostname points to
       .PARAMETER dhcid_rec
       Raw DHCID records
       .PARAMETER dlv_rec
       Raw DLV records
       .PARAMETER dlv_key_tag
       DLV Key Tag
       .PARAMETER dlv_algorithm
       DLV Algorithm
       .PARAMETER dlv_digest_type
       DLV Digest Type
       .PARAMETER dlv_digest
       DLV Digest
       .PARAMETER dname_rec
       Raw DNAME records
       .PARAMETER dname_target
       DNAME Target
       .PARAMETER ds_rec
       Raw DS records
       .PARAMETER ds_key_tag
       DS Key Tag
       .PARAMETER ds_algorithm
       DS Algorithm
       .PARAMETER ds_digest_type
       DS Digest Type
       .PARAMETER ds_digest
       DS Digest
       .PARAMETER hip_rec
       Raw HIP records
       .PARAMETER ipseckey_rec
       Raw IPSECKEY records
       .PARAMETER key_rec
       Raw KEY records
       .PARAMETER kx_rec
       Raw KX records
       .PARAMETER kx_preference
       Preference given to this exchanger. Lower values are more preferred
       .PARAMETER kx_exchanger
       A host willing to act as a key exchanger
       .PARAMETER loc_rec
       Raw LOC records
       .PARAMETER loc_lat_deg
       LOC Degrees Latitude
       .PARAMETER loc_lat_min
       LOC Minutes Latitude
       .PARAMETER loc_lat_sec
       LOC Seconds Latitude
       .PARAMETER loc_lat_dir
       LOC Direction Latitude
       .PARAMETER loc_lon_deg
       LOC Degrees Longitude
       .PARAMETER loc_lon_min
       LOC Minutes Longitude
       .PARAMETER loc_lon_sec
       LOC Seconds Longitude
       .PARAMETER loc_lon_dir
       LOC Direction Longitude
       .PARAMETER loc_altitude
       LOC Altitude
       .PARAMETER loc_size
       LOC Size
       .PARAMETER loc_h_precision
       LOC Horizontal Precision
       .PARAMETER loc_v_precision
       LOC Vertical Precision
       .PARAMETER mx_rec
       Raw MX records
       .PARAMETER mx_preference
       Preference given to this exchanger. Lower values are more preferred
       .PARAMETER mx_exchanger
       A host willing to act as a mail exchanger
       .PARAMETER naptr_rec
       Raw NAPTR records
       .PARAMETER naptr_order
       NAPTR Order
       .PARAMETER naptr_preference
       NAPTR Preference
       .PARAMETER naptr_flags
       NAPTR Flags
       .PARAMETER naptr_service
       NAPTR Service
       .PARAMETER naptr_regexp
       NAPTR Regular Expression
       .PARAMETER naptr_replacement
       NAPTR Replacement
       .PARAMETER ns_rec
       Raw NS records
       .PARAMETER ns_hostname
       NS Hostname
       .PARAMETER nsec_rec
       Raw NSEC records
       .PARAMETER ptr_rec
       Raw PTR records
       .PARAMETER ptr_hostname
       The hostname this reverse record points to
       .PARAMETER rrsig_rec
       Raw RRSIG records
       .PARAMETER rp_rec
       Raw RP records
       .PARAMETER sig_rec
       Raw SIG records
       .PARAMETER spf_rec
       Raw SPF records
       .PARAMETER srv_rec
       Raw SRV records
       .PARAMETER srv_priority
       Lower number means higher priority. Clients will attempt to contact the server with the lowest-numbered priority they can reach.
       .PARAMETER srv_weight
       Relative weight for entries with the same priority.
       .PARAMETER srv_port
       SRV Port
       .PARAMETER srv_target
       The domain name of the target host or '.' if the service is decidedly not available at this domain
       .PARAMETER sshfp_rec
       Raw SSHFP records
       .PARAMETER sshfp_algorithm
       SSHFP Algorithm
       .PARAMETER sshfp_fp_type
       SSHFP Fingerprint Type
       .PARAMETER sshfp_fingerprint
       SSHFP Fingerprint
       .PARAMETER tlsa_rec
       Raw TLSA records
       .PARAMETER tlsa_cert_usage
       TLSA Certificate Usage
       .PARAMETER tlsa_selector
       TLSA Selector
       .PARAMETER tlsa_matching_type
       TLSA Matching Type
       .PARAMETER tlsa_cert_association_data
       TLSA Certificate Association Data
       .PARAMETER txt_rec
       Raw TXT records
       .PARAMETER txt_data
       TXT Text Data
       .PARAMETER uri_rec
       Raw URI records
       .PARAMETER uri_priority
       Lower number means higher priority. Clients will attempt to contact the URI with the lowest-numbered priority they can reach.
       .PARAMETER uri_weight
       Relative weight for entries with the same priority.
       .PARAMETER uri_target
       Target Uniform Resource Identifier according to RFC 3986
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER structured
       Parse all raw DNS records and return them in a structured way
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rename
       Rename the DNS resource record object
       .PARAMETER dnszone
       Zone name (FQDN)
       .PARAMETER name
       Record name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ttl,
               [parameter(Mandatory=$false)]
                    [ValidateSet("IN","CS","CH","HS")]
                [String]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$a_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$a_ip_address,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$aaaa_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$aaaa_ip_address,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$a6_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$a6_data,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$afsdb_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$afsdb_subtype,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$afsdb_hostname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$apl_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cert_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$cert_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$cert_key_tag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$cert_algorithm,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$cert_certificate_or_crl,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$cname_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$cname_hostname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dhcid_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dlv_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$dlv_key_tag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$dlv_algorithm,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$dlv_digest_type,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[0-9a-fA-F]+$")]
                [String]$dlv_digest,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$dname_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$dname_target,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ds_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ds_key_tag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ds_algorithm,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ds_digest_type,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[0-9a-fA-F]+$")]
                [String]$ds_digest,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hip_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ipseckey_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$key_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$kx_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$kx_preference,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$kx_exchanger,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$loc_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$loc_lat_deg,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$loc_lat_min,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_lat_sec,
               [parameter(Mandatory=$false)]
                    [ValidateSet("N","S")]
                [String]$loc_lat_dir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$loc_lon_deg,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$loc_lon_min,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_lon_sec,
               [parameter(Mandatory=$false)]
                    [ValidateSet("E","W")]
                [String]$loc_lon_dir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_altitude,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_size,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_h_precision,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$loc_v_precision,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$mx_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$mx_preference,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$mx_exchanger,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$naptr_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$naptr_order,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$naptr_preference,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$naptr_flags,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$naptr_service,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$naptr_regexp,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$naptr_replacement,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ns_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ns_hostname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$nsec_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ptr_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ptr_hostname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rrsig_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rp_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sig_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$spf_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$srv_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$srv_priority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$srv_weight,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$srv_port,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$srv_target,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshfp_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sshfp_algorithm,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sshfp_fp_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$sshfp_fingerprint,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$tlsa_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$tlsa_cert_usage,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$tlsa_selector,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$tlsa_matching_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$tlsa_cert_association_data,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$txt_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$txt_data,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$uri_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uri_priority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uri_weight,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$uri_target,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$structured,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$dnszone,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($ttl) { $ObjParams | Add-Member -NotePropertyName dnsttl -NotePropertyValue $ttl }
       if ($class) { $ObjParams | Add-Member -NotePropertyName dnsclass -NotePropertyValue $class }
       if ($a_rec) { $ObjParams | Add-Member -NotePropertyName arecord -NotePropertyValue $a_rec }
       if ($a_ip_address) { $ObjParams | Add-Member -NotePropertyName a_part_ip_address -NotePropertyValue $a_ip_address }
       if ($aaaa_rec) { $ObjParams | Add-Member -NotePropertyName aaaarecord -NotePropertyValue $aaaa_rec }
       if ($aaaa_ip_address) { $ObjParams | Add-Member -NotePropertyName aaaa_part_ip_address -NotePropertyValue $aaaa_ip_address }
       if ($a6_rec) { $ObjParams | Add-Member -NotePropertyName a6record -NotePropertyValue $a6_rec }
       if ($a6_data) { $ObjParams | Add-Member -NotePropertyName a6_part_data -NotePropertyValue $a6_data }
       if ($afsdb_rec) { $ObjParams | Add-Member -NotePropertyName afsdbrecord -NotePropertyValue $afsdb_rec }
       if ($afsdb_subtype) { $ObjParams | Add-Member -NotePropertyName afsdb_part_subtype -NotePropertyValue $afsdb_subtype }
       if ($afsdb_hostname) { $ObjParams | Add-Member -NotePropertyName afsdb_part_hostname -NotePropertyValue $afsdb_hostname }
       if ($apl_rec) { $ObjParams | Add-Member -NotePropertyName aplrecord -NotePropertyValue $apl_rec }
       if ($cert_rec) { $ObjParams | Add-Member -NotePropertyName certrecord -NotePropertyValue $cert_rec }
       if ($cert_type) { $ObjParams | Add-Member -NotePropertyName cert_part_type -NotePropertyValue $cert_type }
       if ($cert_key_tag) { $ObjParams | Add-Member -NotePropertyName cert_part_key_tag -NotePropertyValue $cert_key_tag }
       if ($cert_algorithm) { $ObjParams | Add-Member -NotePropertyName cert_part_algorithm -NotePropertyValue $cert_algorithm }
       if ($cert_certificate_or_crl) { $ObjParams | Add-Member -NotePropertyName cert_part_certificate_or_crl -NotePropertyValue $cert_certificate_or_crl }
       if ($cname_rec) { $ObjParams | Add-Member -NotePropertyName cnamerecord -NotePropertyValue $cname_rec }
       if ($cname_hostname) { $ObjParams | Add-Member -NotePropertyName cname_part_hostname -NotePropertyValue $cname_hostname }
       if ($dhcid_rec) { $ObjParams | Add-Member -NotePropertyName dhcidrecord -NotePropertyValue $dhcid_rec }
       if ($dlv_rec) { $ObjParams | Add-Member -NotePropertyName dlvrecord -NotePropertyValue $dlv_rec }
       if ($dlv_key_tag) { $ObjParams | Add-Member -NotePropertyName dlv_part_key_tag -NotePropertyValue $dlv_key_tag }
       if ($dlv_algorithm) { $ObjParams | Add-Member -NotePropertyName dlv_part_algorithm -NotePropertyValue $dlv_algorithm }
       if ($dlv_digest_type) { $ObjParams | Add-Member -NotePropertyName dlv_part_digest_type -NotePropertyValue $dlv_digest_type }
       if ($dlv_digest) { $ObjParams | Add-Member -NotePropertyName dlv_part_digest -NotePropertyValue $dlv_digest }
       if ($dname_rec) { $ObjParams | Add-Member -NotePropertyName dnamerecord -NotePropertyValue $dname_rec }
       if ($dname_target) { $ObjParams | Add-Member -NotePropertyName dname_part_target -NotePropertyValue $dname_target }
       if ($ds_rec) { $ObjParams | Add-Member -NotePropertyName dsrecord -NotePropertyValue $ds_rec }
       if ($ds_key_tag) { $ObjParams | Add-Member -NotePropertyName ds_part_key_tag -NotePropertyValue $ds_key_tag }
       if ($ds_algorithm) { $ObjParams | Add-Member -NotePropertyName ds_part_algorithm -NotePropertyValue $ds_algorithm }
       if ($ds_digest_type) { $ObjParams | Add-Member -NotePropertyName ds_part_digest_type -NotePropertyValue $ds_digest_type }
       if ($ds_digest) { $ObjParams | Add-Member -NotePropertyName ds_part_digest -NotePropertyValue $ds_digest }
       if ($hip_rec) { $ObjParams | Add-Member -NotePropertyName hiprecord -NotePropertyValue $hip_rec }
       if ($ipseckey_rec) { $ObjParams | Add-Member -NotePropertyName ipseckeyrecord -NotePropertyValue $ipseckey_rec }
       if ($key_rec) { $ObjParams | Add-Member -NotePropertyName keyrecord -NotePropertyValue $key_rec }
       if ($kx_rec) { $ObjParams | Add-Member -NotePropertyName kxrecord -NotePropertyValue $kx_rec }
       if ($kx_preference) { $ObjParams | Add-Member -NotePropertyName kx_part_preference -NotePropertyValue $kx_preference }
       if ($kx_exchanger) { $ObjParams | Add-Member -NotePropertyName kx_part_exchanger -NotePropertyValue $kx_exchanger }
       if ($loc_rec) { $ObjParams | Add-Member -NotePropertyName locrecord -NotePropertyValue $loc_rec }
       if ($loc_lat_deg) { $ObjParams | Add-Member -NotePropertyName loc_part_lat_deg -NotePropertyValue $loc_lat_deg }
       if ($loc_lat_min) { $ObjParams | Add-Member -NotePropertyName loc_part_lat_min -NotePropertyValue $loc_lat_min }
       if ($loc_lat_sec) { $ObjParams | Add-Member -NotePropertyName loc_part_lat_sec -NotePropertyValue $loc_lat_sec }
       if ($loc_lat_dir) { $ObjParams | Add-Member -NotePropertyName loc_part_lat_dir -NotePropertyValue $loc_lat_dir }
       if ($loc_lon_deg) { $ObjParams | Add-Member -NotePropertyName loc_part_lon_deg -NotePropertyValue $loc_lon_deg }
       if ($loc_lon_min) { $ObjParams | Add-Member -NotePropertyName loc_part_lon_min -NotePropertyValue $loc_lon_min }
       if ($loc_lon_sec) { $ObjParams | Add-Member -NotePropertyName loc_part_lon_sec -NotePropertyValue $loc_lon_sec }
       if ($loc_lon_dir) { $ObjParams | Add-Member -NotePropertyName loc_part_lon_dir -NotePropertyValue $loc_lon_dir }
       if ($loc_altitude) { $ObjParams | Add-Member -NotePropertyName loc_part_altitude -NotePropertyValue $loc_altitude }
       if ($loc_size) { $ObjParams | Add-Member -NotePropertyName loc_part_size -NotePropertyValue $loc_size }
       if ($loc_h_precision) { $ObjParams | Add-Member -NotePropertyName loc_part_h_precision -NotePropertyValue $loc_h_precision }
       if ($loc_v_precision) { $ObjParams | Add-Member -NotePropertyName loc_part_v_precision -NotePropertyValue $loc_v_precision }
       if ($mx_rec) { $ObjParams | Add-Member -NotePropertyName mxrecord -NotePropertyValue $mx_rec }
       if ($mx_preference) { $ObjParams | Add-Member -NotePropertyName mx_part_preference -NotePropertyValue $mx_preference }
       if ($mx_exchanger) { $ObjParams | Add-Member -NotePropertyName mx_part_exchanger -NotePropertyValue $mx_exchanger }
       if ($naptr_rec) { $ObjParams | Add-Member -NotePropertyName naptrrecord -NotePropertyValue $naptr_rec }
       if ($naptr_order) { $ObjParams | Add-Member -NotePropertyName naptr_part_order -NotePropertyValue $naptr_order }
       if ($naptr_preference) { $ObjParams | Add-Member -NotePropertyName naptr_part_preference -NotePropertyValue $naptr_preference }
       if ($naptr_flags) { $ObjParams | Add-Member -NotePropertyName naptr_part_flags -NotePropertyValue $naptr_flags }
       if ($naptr_service) { $ObjParams | Add-Member -NotePropertyName naptr_part_service -NotePropertyValue $naptr_service }
       if ($naptr_regexp) { $ObjParams | Add-Member -NotePropertyName naptr_part_regexp -NotePropertyValue $naptr_regexp }
       if ($naptr_replacement) { $ObjParams | Add-Member -NotePropertyName naptr_part_replacement -NotePropertyValue $naptr_replacement }
       if ($ns_rec) { $ObjParams | Add-Member -NotePropertyName nsrecord -NotePropertyValue $ns_rec }
       if ($ns_hostname) { $ObjParams | Add-Member -NotePropertyName ns_part_hostname -NotePropertyValue $ns_hostname }
       if ($nsec_rec) { $ObjParams | Add-Member -NotePropertyName nsecrecord -NotePropertyValue $nsec_rec }
       if ($ptr_rec) { $ObjParams | Add-Member -NotePropertyName ptrrecord -NotePropertyValue $ptr_rec }
       if ($ptr_hostname) { $ObjParams | Add-Member -NotePropertyName ptr_part_hostname -NotePropertyValue $ptr_hostname }
       if ($rrsig_rec) { $ObjParams | Add-Member -NotePropertyName rrsigrecord -NotePropertyValue $rrsig_rec }
       if ($rp_rec) { $ObjParams | Add-Member -NotePropertyName rprecord -NotePropertyValue $rp_rec }
       if ($sig_rec) { $ObjParams | Add-Member -NotePropertyName sigrecord -NotePropertyValue $sig_rec }
       if ($spf_rec) { $ObjParams | Add-Member -NotePropertyName spfrecord -NotePropertyValue $spf_rec }
       if ($srv_rec) { $ObjParams | Add-Member -NotePropertyName srvrecord -NotePropertyValue $srv_rec }
       if ($srv_priority) { $ObjParams | Add-Member -NotePropertyName srv_part_priority -NotePropertyValue $srv_priority }
       if ($srv_weight) { $ObjParams | Add-Member -NotePropertyName srv_part_weight -NotePropertyValue $srv_weight }
       if ($srv_port) { $ObjParams | Add-Member -NotePropertyName srv_part_port -NotePropertyValue $srv_port }
       if ($srv_target) { $ObjParams | Add-Member -NotePropertyName srv_part_target -NotePropertyValue $srv_target }
       if ($sshfp_rec) { $ObjParams | Add-Member -NotePropertyName sshfprecord -NotePropertyValue $sshfp_rec }
       if ($sshfp_algorithm) { $ObjParams | Add-Member -NotePropertyName sshfp_part_algorithm -NotePropertyValue $sshfp_algorithm }
       if ($sshfp_fp_type) { $ObjParams | Add-Member -NotePropertyName sshfp_part_fp_type -NotePropertyValue $sshfp_fp_type }
       if ($sshfp_fingerprint) { $ObjParams | Add-Member -NotePropertyName sshfp_part_fingerprint -NotePropertyValue $sshfp_fingerprint }
       if ($tlsa_rec) { $ObjParams | Add-Member -NotePropertyName tlsarecord -NotePropertyValue $tlsa_rec }
       if ($tlsa_cert_usage) { $ObjParams | Add-Member -NotePropertyName tlsa_part_cert_usage -NotePropertyValue $tlsa_cert_usage }
       if ($tlsa_selector) { $ObjParams | Add-Member -NotePropertyName tlsa_part_selector -NotePropertyValue $tlsa_selector }
       if ($tlsa_matching_type) { $ObjParams | Add-Member -NotePropertyName tlsa_part_matching_type -NotePropertyValue $tlsa_matching_type }
       if ($tlsa_cert_association_data) { $ObjParams | Add-Member -NotePropertyName tlsa_part_cert_association_data -NotePropertyValue $tlsa_cert_association_data }
       if ($txt_rec) { $ObjParams | Add-Member -NotePropertyName txtrecord -NotePropertyValue $txt_rec }
       if ($txt_data) { $ObjParams | Add-Member -NotePropertyName txt_part_data -NotePropertyValue $txt_data }
       if ($uri_rec) { $ObjParams | Add-Member -NotePropertyName urirecord -NotePropertyValue $uri_rec }
       if ($uri_priority) { $ObjParams | Add-Member -NotePropertyName uri_part_priority -NotePropertyValue $uri_priority }
       if ($uri_weight) { $ObjParams | Add-Member -NotePropertyName uri_part_weight -NotePropertyValue $uri_weight }
       if ($uri_target) { $ObjParams | Add-Member -NotePropertyName uri_part_target -NotePropertyValue $uri_target }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($structured.IsPresent) { $ObjParams | Add-Member -NotePropertyName structured -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsrecord_mod/1"
                params  = @(@($dnszone,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsrecord_show {
        <#
            .DESCRIPTION
       Display DNS resource.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER structured
       Parse all raw DNS records and return them in a structured way
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER dnszone
       Zone name (FQDN)
       .PARAMETER name
       Record name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$structured,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$dnszone,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($structured.IsPresent) { $ObjParams | Add-Member -NotePropertyName structured -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsrecord_show/1"
                params  = @(@($dnszone,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsrecord_split_parts {
        <#
            .DESCRIPTION
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       <name>
       .PARAMETER value
       <value>
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$value,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsrecord_split_parts/1"
                params  = @(@($name,$value),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsserver_find {
        <#
            .DESCRIPTION
       Search for DNS servers.
       .PARAMETER hostname
       DNS Server name
       .PARAMETER soa_mname_override
       SOA mname (authoritative server) override
       .PARAMETER forwarder
       Per-server forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT"
       .PARAMETER forward_policy
       Per-server conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("hostname")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$soa_mname_override,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$forwarder,
               [parameter(Mandatory=$false)]
                    [ValidateSet("only","first","none")]
                [String]$forward_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($hostname) { $ObjParams | Add-Member -NotePropertyName idnsserverid -NotePropertyValue $hostname }
       if ($soa_mname_override) { $ObjParams | Add-Member -NotePropertyName idnssoamname -NotePropertyValue $soa_mname_override }
       if ($forwarder) { $ObjParams | Add-Member -NotePropertyName idnsforwarders -NotePropertyValue $forwarder }
       if ($forward_policy) { $ObjParams | Add-Member -NotePropertyName idnsforwardpolicy -NotePropertyValue $forward_policy }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsserver_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsserver_mod {
        <#
            .DESCRIPTION
       Modify DNS server configuration
       .PARAMETER soa_mname_override
       SOA mname (authoritative server) override
       .PARAMETER forwarder
       Per-server forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT"
       .PARAMETER forward_policy
       Per-server conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER hostname
       DNS Server name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$soa_mname_override,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$forwarder,
               [parameter(Mandatory=$false)]
                    [ValidateSet("only","first","none")]
                [String]$forward_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($soa_mname_override) { $ObjParams | Add-Member -NotePropertyName idnssoamname -NotePropertyValue $soa_mname_override }
       if ($forwarder) { $ObjParams | Add-Member -NotePropertyName idnsforwarders -NotePropertyValue $forwarder }
       if ($forward_policy) { $ObjParams | Add-Member -NotePropertyName idnsforwardpolicy -NotePropertyValue $forward_policy }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsserver_mod/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnsserver_show {
        <#
            .DESCRIPTION
       Display configuration of a DNS server.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER hostname
       DNS Server name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnsserver_show/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnszone_add {
        <#
            .DESCRIPTION
       Create new DNS zone (SOA record).
       .PARAMETER name_from_ip
       IP network to create reverse zone name from
       .PARAMETER forwarder
       Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT"
       .PARAMETER forward_policy
       Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.
       .PARAMETER name_server
       Authoritative nameserver domain name
       .PARAMETER admin_email
       Administrator e-mail address
       .PARAMETER serial
       SOA record serial number
       .PARAMETER refresh
       SOA record refresh time
       .PARAMETER retry
       SOA record retry time
       .PARAMETER expire
       SOA record expire time
       .PARAMETER minimum
       How long should negative responses be cached
       .PARAMETER ttl
       Time to live for records at zone apex
       .PARAMETER default_ttl
       Time to live for records without explicit TTL definition
       .PARAMETER class
       <dnsclass>
       .PARAMETER update_policy
       BIND update policy
       .PARAMETER dynamic_update
       Allow dynamic updates.
       .PARAMETER allow_query
       Semicolon separated list of IP addresses or networks which are allowed to issue queries
       .PARAMETER allow_transfer
       Semicolon separated list of IP addresses or networks which are allowed to transfer the zone
       .PARAMETER allow_sync_ptr
       Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone
       .PARAMETER dnssec
       Allow inline DNSSEC signing of records in the zone
       .PARAMETER nsec3param_rec
       NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER skip_overlap_check
       Force DNS zone creation even if it will overlap with an existing zone.
       .PARAMETER force
       Force DNS zone creation even if nameserver is not resolvable. (Deprecated)
       .PARAMETER skip_nameserver_check
       Force DNS zone creation even if nameserver is not resolvable.
       .PARAMETER ip_address
       <ip_address>
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name_from_ip,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$forwarder,
               [parameter(Mandatory=$false)]
                    [ValidateSet("only","first","none")]
                [String]$forward_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name_server,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$admin_email,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$serial,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$refresh,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$retry,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$expire,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minimum,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ttl,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$default_ttl,
               [parameter(Mandatory=$false)]
                    [ValidateSet("IN","CS","CH","HS")]
                [String]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$update_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$dynamic_update,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$allow_query,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$allow_transfer,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$allow_sync_ptr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$dnssec,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^\d+ \d+ \d+ (([0-9a-fA-F]{2})+|-)$")]
                [String]$nsec3param_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$skip_overlap_check,
               [parameter(Mandatory=$false)]
                    
                [switch]$force,
               [parameter(Mandatory=$false)]
                    
                [switch]$skip_nameserver_check,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ip_address,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name_from_ip) { $ObjParams | Add-Member -NotePropertyName name_from_ip -NotePropertyValue $name_from_ip }
       if ($forwarder) { $ObjParams | Add-Member -NotePropertyName idnsforwarders -NotePropertyValue $forwarder }
       if ($forward_policy) { $ObjParams | Add-Member -NotePropertyName idnsforwardpolicy -NotePropertyValue $forward_policy }
       if ($name_server) { $ObjParams | Add-Member -NotePropertyName idnssoamname -NotePropertyValue $name_server }
       if ($admin_email) { $ObjParams | Add-Member -NotePropertyName idnssoarname -NotePropertyValue $admin_email }
       if ($serial) { $ObjParams | Add-Member -NotePropertyName idnssoaserial -NotePropertyValue $serial }
       if ($refresh) { $ObjParams | Add-Member -NotePropertyName idnssoarefresh -NotePropertyValue $refresh }
       if ($retry) { $ObjParams | Add-Member -NotePropertyName idnssoaretry -NotePropertyValue $retry }
       if ($expire) { $ObjParams | Add-Member -NotePropertyName idnssoaexpire -NotePropertyValue $expire }
       if ($minimum) { $ObjParams | Add-Member -NotePropertyName idnssoaminimum -NotePropertyValue $minimum }
       if ($ttl) { $ObjParams | Add-Member -NotePropertyName dnsttl -NotePropertyValue $ttl }
       if ($default_ttl) { $ObjParams | Add-Member -NotePropertyName dnsdefaultttl -NotePropertyValue $default_ttl }
       if ($class) { $ObjParams | Add-Member -NotePropertyName dnsclass -NotePropertyValue $class }
       if ($update_policy) { $ObjParams | Add-Member -NotePropertyName idnsupdatepolicy -NotePropertyValue $update_policy }
       if ($dynamic_update.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnsallowdynupdate -NotePropertyValue $true }
       if ($allow_query) { $ObjParams | Add-Member -NotePropertyName idnsallowquery -NotePropertyValue $allow_query }
       if ($allow_transfer) { $ObjParams | Add-Member -NotePropertyName idnsallowtransfer -NotePropertyValue $allow_transfer }
       if ($allow_sync_ptr.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnsallowsyncptr -NotePropertyValue $true }
       if ($dnssec.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnssecinlinesigning -NotePropertyValue $true }
       if ($nsec3param_rec) { $ObjParams | Add-Member -NotePropertyName nsec3paramrecord -NotePropertyValue $nsec3param_rec }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($skip_overlap_check.IsPresent) { $ObjParams | Add-Member -NotePropertyName skip_overlap_check -NotePropertyValue $true }
       if ($force.IsPresent) { $ObjParams | Add-Member -NotePropertyName force -NotePropertyValue $true }
       if ($skip_nameserver_check.IsPresent) { $ObjParams | Add-Member -NotePropertyName skip_nameserver_check -NotePropertyValue $true }
       if ($ip_address) { $ObjParams | Add-Member -NotePropertyName ip_address -NotePropertyValue $ip_address }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnszone_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnszone_add_permission {
        <#
            .DESCRIPTION
       Add a permission for per-zone access delegation.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnszone_add_permission/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnszone_del {
        <#
            .DESCRIPTION
       Delete DNS zone (SOA record).
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnszone_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnszone_disable {
        <#
            .DESCRIPTION
       Disable DNS Zone.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnszone_disable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnszone_enable {
        <#
            .DESCRIPTION
       Enable DNS Zone.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnszone_enable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnszone_find {
        <#
            .DESCRIPTION
       Search for DNS zones (SOA records).
       .PARAMETER name
       Zone name (FQDN)
       .PARAMETER name_from_ip
       IP network to create reverse zone name from
       .PARAMETER zone_active
       Is zone active?
       .PARAMETER forwarder
       Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT"
       .PARAMETER forward_policy
       Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.
       .PARAMETER name_server
       Authoritative nameserver domain name
       .PARAMETER admin_email
       Administrator e-mail address
       .PARAMETER serial
       SOA record serial number
       .PARAMETER refresh
       SOA record refresh time
       .PARAMETER retry
       SOA record retry time
       .PARAMETER expire
       SOA record expire time
       .PARAMETER minimum
       How long should negative responses be cached
       .PARAMETER ttl
       Time to live for records at zone apex
       .PARAMETER default_ttl
       Time to live for records without explicit TTL definition
       .PARAMETER class
       <dnsclass>
       .PARAMETER update_policy
       BIND update policy
       .PARAMETER dynamic_update
       Allow dynamic updates.
       .PARAMETER allow_query
       Semicolon separated list of IP addresses or networks which are allowed to issue queries
       .PARAMETER allow_transfer
       Semicolon separated list of IP addresses or networks which are allowed to transfer the zone
       .PARAMETER allow_sync_ptr
       Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone
       .PARAMETER dnssec
       Allow inline DNSSEC signing of records in the zone
       .PARAMETER nsec3param_rec
       NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER forward_only
       Search for forward zones only
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name_from_ip,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$zone_active,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$forwarder,
               [parameter(Mandatory=$false)]
                    [ValidateSet("only","first","none")]
                [String]$forward_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name_server,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$admin_email,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$serial,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$refresh,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$retry,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$expire,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minimum,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ttl,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$default_ttl,
               [parameter(Mandatory=$false)]
                    [ValidateSet("IN","CS","CH","HS")]
                [String]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$update_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$dynamic_update,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$allow_query,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$allow_transfer,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$allow_sync_ptr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$dnssec,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^\d+ \d+ \d+ (([0-9a-fA-F]{2})+|-)$")]
                [String]$nsec3param_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$forward_only,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName idnsname -NotePropertyValue $name }
       if ($name_from_ip) { $ObjParams | Add-Member -NotePropertyName name_from_ip -NotePropertyValue $name_from_ip }
       if ($zone_active.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnszoneactive -NotePropertyValue $true }
       if ($forwarder) { $ObjParams | Add-Member -NotePropertyName idnsforwarders -NotePropertyValue $forwarder }
       if ($forward_policy) { $ObjParams | Add-Member -NotePropertyName idnsforwardpolicy -NotePropertyValue $forward_policy }
       if ($name_server) { $ObjParams | Add-Member -NotePropertyName idnssoamname -NotePropertyValue $name_server }
       if ($admin_email) { $ObjParams | Add-Member -NotePropertyName idnssoarname -NotePropertyValue $admin_email }
       if ($serial) { $ObjParams | Add-Member -NotePropertyName idnssoaserial -NotePropertyValue $serial }
       if ($refresh) { $ObjParams | Add-Member -NotePropertyName idnssoarefresh -NotePropertyValue $refresh }
       if ($retry) { $ObjParams | Add-Member -NotePropertyName idnssoaretry -NotePropertyValue $retry }
       if ($expire) { $ObjParams | Add-Member -NotePropertyName idnssoaexpire -NotePropertyValue $expire }
       if ($minimum) { $ObjParams | Add-Member -NotePropertyName idnssoaminimum -NotePropertyValue $minimum }
       if ($ttl) { $ObjParams | Add-Member -NotePropertyName dnsttl -NotePropertyValue $ttl }
       if ($default_ttl) { $ObjParams | Add-Member -NotePropertyName dnsdefaultttl -NotePropertyValue $default_ttl }
       if ($class) { $ObjParams | Add-Member -NotePropertyName dnsclass -NotePropertyValue $class }
       if ($update_policy) { $ObjParams | Add-Member -NotePropertyName idnsupdatepolicy -NotePropertyValue $update_policy }
       if ($dynamic_update.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnsallowdynupdate -NotePropertyValue $true }
       if ($allow_query) { $ObjParams | Add-Member -NotePropertyName idnsallowquery -NotePropertyValue $allow_query }
       if ($allow_transfer) { $ObjParams | Add-Member -NotePropertyName idnsallowtransfer -NotePropertyValue $allow_transfer }
       if ($allow_sync_ptr.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnsallowsyncptr -NotePropertyValue $true }
       if ($dnssec.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnssecinlinesigning -NotePropertyValue $true }
       if ($nsec3param_rec) { $ObjParams | Add-Member -NotePropertyName nsec3paramrecord -NotePropertyValue $nsec3param_rec }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($forward_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName forward_only -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnszone_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnszone_mod {
        <#
            .DESCRIPTION
       Modify DNS zone (SOA record).
       .PARAMETER name_from_ip
       IP network to create reverse zone name from
       .PARAMETER forwarder
       Per-zone forwarders. A custom port can be specified for each forwarder using a standard format "IP_ADDRESS port PORT"
       .PARAMETER forward_policy
       Per-zone conditional forwarding policy. Set to "none" to disable forwarding to global forwarder for this zone. In that case, conditional zone forwarders are disregarded.
       .PARAMETER name_server
       Authoritative nameserver domain name
       .PARAMETER admin_email
       Administrator e-mail address
       .PARAMETER serial
       SOA record serial number
       .PARAMETER refresh
       SOA record refresh time
       .PARAMETER retry
       SOA record retry time
       .PARAMETER expire
       SOA record expire time
       .PARAMETER minimum
       How long should negative responses be cached
       .PARAMETER ttl
       Time to live for records at zone apex
       .PARAMETER default_ttl
       Time to live for records without explicit TTL definition
       .PARAMETER class
       <dnsclass>
       .PARAMETER update_policy
       BIND update policy
       .PARAMETER dynamic_update
       Allow dynamic updates.
       .PARAMETER allow_query
       Semicolon separated list of IP addresses or networks which are allowed to issue queries
       .PARAMETER allow_transfer
       Semicolon separated list of IP addresses or networks which are allowed to transfer the zone
       .PARAMETER allow_sync_ptr
       Allow synchronization of forward (A, AAAA) and reverse (PTR) records in the zone
       .PARAMETER dnssec
       Allow inline DNSSEC signing of records in the zone
       .PARAMETER nsec3param_rec
       NSEC3PARAM record for zone in format: hash_algorithm flags iterations salt
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER force
       Force nameserver change even if nameserver not in DNS
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name_from_ip,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$forwarder,
               [parameter(Mandatory=$false)]
                    [ValidateSet("only","first","none")]
                [String]$forward_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name_server,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$admin_email,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$serial,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$refresh,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$retry,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$expire,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minimum,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$ttl,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$default_ttl,
               [parameter(Mandatory=$false)]
                    [ValidateSet("IN","CS","CH","HS")]
                [String]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$update_policy,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$dynamic_update,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$allow_query,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$allow_transfer,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$allow_sync_ptr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$dnssec,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^\d+ \d+ \d+ (([0-9a-fA-F]{2})+|-)$")]
                [String]$nsec3param_rec,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$force,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name_from_ip) { $ObjParams | Add-Member -NotePropertyName name_from_ip -NotePropertyValue $name_from_ip }
       if ($forwarder) { $ObjParams | Add-Member -NotePropertyName idnsforwarders -NotePropertyValue $forwarder }
       if ($forward_policy) { $ObjParams | Add-Member -NotePropertyName idnsforwardpolicy -NotePropertyValue $forward_policy }
       if ($name_server) { $ObjParams | Add-Member -NotePropertyName idnssoamname -NotePropertyValue $name_server }
       if ($admin_email) { $ObjParams | Add-Member -NotePropertyName idnssoarname -NotePropertyValue $admin_email }
       if ($serial) { $ObjParams | Add-Member -NotePropertyName idnssoaserial -NotePropertyValue $serial }
       if ($refresh) { $ObjParams | Add-Member -NotePropertyName idnssoarefresh -NotePropertyValue $refresh }
       if ($retry) { $ObjParams | Add-Member -NotePropertyName idnssoaretry -NotePropertyValue $retry }
       if ($expire) { $ObjParams | Add-Member -NotePropertyName idnssoaexpire -NotePropertyValue $expire }
       if ($minimum) { $ObjParams | Add-Member -NotePropertyName idnssoaminimum -NotePropertyValue $minimum }
       if ($ttl) { $ObjParams | Add-Member -NotePropertyName dnsttl -NotePropertyValue $ttl }
       if ($default_ttl) { $ObjParams | Add-Member -NotePropertyName dnsdefaultttl -NotePropertyValue $default_ttl }
       if ($class) { $ObjParams | Add-Member -NotePropertyName dnsclass -NotePropertyValue $class }
       if ($update_policy) { $ObjParams | Add-Member -NotePropertyName idnsupdatepolicy -NotePropertyValue $update_policy }
       if ($dynamic_update.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnsallowdynupdate -NotePropertyValue $true }
       if ($allow_query) { $ObjParams | Add-Member -NotePropertyName idnsallowquery -NotePropertyValue $allow_query }
       if ($allow_transfer) { $ObjParams | Add-Member -NotePropertyName idnsallowtransfer -NotePropertyValue $allow_transfer }
       if ($allow_sync_ptr.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnsallowsyncptr -NotePropertyValue $true }
       if ($dnssec.IsPresent) { $ObjParams | Add-Member -NotePropertyName idnssecinlinesigning -NotePropertyValue $true }
       if ($nsec3param_rec) { $ObjParams | Add-Member -NotePropertyName nsec3paramrecord -NotePropertyValue $nsec3param_rec }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($force.IsPresent) { $ObjParams | Add-Member -NotePropertyName force -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnszone_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnszone_remove_permission {
        <#
            .DESCRIPTION
       Remove a permission for per-zone access delegation.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnszone_remove_permission/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdnszone_show {
        <#
            .DESCRIPTION
       Display information about a DNS zone (SOA record).
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Zone name (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dnszone_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdns_is_enabled {
        <#
            .DESCRIPTION
       
    Checks if any of the servers has the DNS service enabled.
     
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dns_is_enabled/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdns_resolve {
        <#
            .DESCRIPTION
       Resolve a host name in DNS. (Deprecated)
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER hostname
       Hostname (FQDN)
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dns_resolve/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdns_update_system_records {
        <#
            .DESCRIPTION
       Update location and IPA server DNS records
       .PARAMETER dry_run
       Do not update records only return expected records
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$dry_run,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($dry_run.IsPresent) { $ObjParams | Add-Member -NotePropertyName dry_run -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "dns_update_system_records/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdomainlevel_get {
        <#
            .DESCRIPTION
       Query current Domain Level.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "domainlevel_get/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIdomainlevel_set {
        <#
            .DESCRIPTION
       Change current Domain Level.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER level
       Domain Level
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$level,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "domainlevel_set/1"
                params  = @(@($level),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIenv {
        <#
            .DESCRIPTION
       Show environment variables.
       .PARAMETER server
       Forward to server instead of running locally
       .PARAMETER all
       retrieve and print all attributes from the server. Affects command output.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$server,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($server.IsPresent) { $ObjParams | Add-Member -NotePropertyName server -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "env/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIgroup_add {
        <#
            .DESCRIPTION
       Create a new group.
       .PARAMETER desc
       Group description
       .PARAMETER gid
       GID (use this option to set it manually)
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER nonposix
       Create as a non-POSIX group
       .PARAMETER external
       Allow adding external non-IPA members from trusted domains
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER group_name
       Group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$nonposix,
               [parameter(Mandatory=$false)]
                    
                [switch]$external,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$group_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($gid) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gid }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($nonposix.IsPresent) { $ObjParams | Add-Member -NotePropertyName nonposix -NotePropertyValue $true }
       if ($external.IsPresent) { $ObjParams | Add-Member -NotePropertyName external -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "group_add/1"
                params  = @(@($group_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIgroup_add_member {
        <#
            .DESCRIPTION
       Add members to a group.
       .PARAMETER external
       Members of a trusted domain in DOM\name or name@domain form
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER group_name
       Group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$external,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$group_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($external) { $ObjParams | Add-Member -NotePropertyName ipaexternalmember -NotePropertyValue $external }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "group_add_member/1"
                params  = @(@($group_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIgroup_del {
        <#
            .DESCRIPTION
       Delete group.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER group_name
       Group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$group_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "group_del/1"
                params  = @(@($group_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIgroup_detach {
        <#
            .DESCRIPTION
       Detach a managed group from a user.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER group_name
       Group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$group_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "group_detach/1"
                params  = @(@($group_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIgroup_find {
        <#
            .DESCRIPTION
       Search for groups.
       .PARAMETER group_name
       Group name
       .PARAMETER desc
       Group description
       .PARAMETER gid
       GID (use this option to set it manually)
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER private
       search for private groups
       .PARAMETER posix
       search for POSIX groups
       .PARAMETER external
       search for groups with support of external non-IPA members from trusted domains
       .PARAMETER nonposix
       search for non-POSIX groups
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("group-name")
       .PARAMETER users
       Search for groups with these member users.
       .PARAMETER no_users
       Search for groups without these member users.
       .PARAMETER groups
       Search for groups with these member groups.
       .PARAMETER no_groups
       Search for groups without these member groups.
       .PARAMETER in_groups
       Search for groups with these member of groups.
       .PARAMETER not_in_groups
       Search for groups without these member of groups.
       .PARAMETER in_netgroups
       Search for groups with these member of netgroups.
       .PARAMETER not_in_netgroups
       Search for groups without these member of netgroups.
       .PARAMETER in_roles
       Search for groups with these member of roles.
       .PARAMETER not_in_roles
       Search for groups without these member of roles.
       .PARAMETER in_hbacrules
       Search for groups with these member of HBAC rules.
       .PARAMETER not_in_hbacrules
       Search for groups without these member of HBAC rules.
       .PARAMETER in_sudorules
       Search for groups with these member of sudo rules.
       .PARAMETER not_in_sudorules
       Search for groups without these member of sudo rules.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$group_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$private,
               [parameter(Mandatory=$false)]
                    
                [switch]$posix,
               [parameter(Mandatory=$false)]
                    
                [switch]$external,
               [parameter(Mandatory=$false)]
                    
                [switch]$nonposix,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$no_users,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$no_groups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$in_groups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$not_in_groups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$not_in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_roles,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_roles,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_hbacrules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_hbacrules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_sudorules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_sudorules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($group_name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $group_name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($gid) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gid }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($private.IsPresent) { $ObjParams | Add-Member -NotePropertyName private -NotePropertyValue $true }
       if ($posix.IsPresent) { $ObjParams | Add-Member -NotePropertyName posix -NotePropertyValue $true }
       if ($external.IsPresent) { $ObjParams | Add-Member -NotePropertyName external -NotePropertyValue $true }
       if ($nonposix.IsPresent) { $ObjParams | Add-Member -NotePropertyName nonposix -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($no_users) { $ObjParams | Add-Member -NotePropertyName no_user -NotePropertyValue $no_users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($no_groups) { $ObjParams | Add-Member -NotePropertyName no_group -NotePropertyValue $no_groups }
       if ($in_groups) { $ObjParams | Add-Member -NotePropertyName in_group -NotePropertyValue $in_groups }
       if ($not_in_groups) { $ObjParams | Add-Member -NotePropertyName not_in_group -NotePropertyValue $not_in_groups }
       if ($in_netgroups) { $ObjParams | Add-Member -NotePropertyName in_netgroup -NotePropertyValue $in_netgroups }
       if ($not_in_netgroups) { $ObjParams | Add-Member -NotePropertyName not_in_netgroup -NotePropertyValue $not_in_netgroups }
       if ($in_roles) { $ObjParams | Add-Member -NotePropertyName in_role -NotePropertyValue $in_roles }
       if ($not_in_roles) { $ObjParams | Add-Member -NotePropertyName not_in_role -NotePropertyValue $not_in_roles }
       if ($in_hbacrules) { $ObjParams | Add-Member -NotePropertyName in_hbacrule -NotePropertyValue $in_hbacrules }
       if ($not_in_hbacrules) { $ObjParams | Add-Member -NotePropertyName not_in_hbacrule -NotePropertyValue $not_in_hbacrules }
       if ($in_sudorules) { $ObjParams | Add-Member -NotePropertyName in_sudorule -NotePropertyValue $in_sudorules }
       if ($not_in_sudorules) { $ObjParams | Add-Member -NotePropertyName not_in_sudorule -NotePropertyValue $not_in_sudorules }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "group_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIgroup_mod {
        <#
            .DESCRIPTION
       Modify a group.
       .PARAMETER desc
       Group description
       .PARAMETER gid
       GID (use this option to set it manually)
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER posix
       change to a POSIX group
       .PARAMETER external
       change to support external non-IPA members from trusted domains
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER rename
       Rename the group object
       .PARAMETER group_name
       Group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$posix,
               [parameter(Mandatory=$false)]
                    
                [switch]$external,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$group_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($gid) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gid }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($posix.IsPresent) { $ObjParams | Add-Member -NotePropertyName posix -NotePropertyValue $true }
       if ($external.IsPresent) { $ObjParams | Add-Member -NotePropertyName external -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "group_mod/1"
                params  = @(@($group_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIgroup_remove_member {
        <#
            .DESCRIPTION
       Remove members from a group.
       .PARAMETER external
       Members of a trusted domain in DOM\name or name@domain form
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER group_name
       Group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$external,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$group_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($external) { $ObjParams | Add-Member -NotePropertyName ipaexternalmember -NotePropertyValue $external }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "group_remove_member/1"
                params  = @(@($group_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIgroup_show {
        <#
            .DESCRIPTION
       Display information about a named group.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER group_name
       Group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$group_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "group_show/1"
                params  = @(@($group_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_add {
        <#
            .DESCRIPTION
       Create a new HBAC rule.
       .PARAMETER type
       Rule type (allow)
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER servicecat
       Service category the rule applies to
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER externalhost
       External host
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateSet("allow","deny")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$servicecat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$externalhost,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($type) { $ObjParams | Add-Member -NotePropertyName accessruletype -NotePropertyValue $type }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($srchostcat) { $ObjParams | Add-Member -NotePropertyName sourcehostcategory -NotePropertyValue $srchostcat }
       if ($servicecat) { $ObjParams | Add-Member -NotePropertyName servicecategory -NotePropertyValue $servicecat }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($externalhost) { $ObjParams | Add-Member -NotePropertyName externalhost -NotePropertyValue $externalhost }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_add_host {
        <#
            .DESCRIPTION
       Add target hosts and hostgroups to an HBAC rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_add_host/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_add_service {
        <#
            .DESCRIPTION
       Add services to an HBAC rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hbacsvcs
       HBAC services to add
       .PARAMETER hbacsvcgroups
       HBAC service groups to add
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hbacsvcs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hbacsvcgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hbacsvcs) { $ObjParams | Add-Member -NotePropertyName hbacsvc -NotePropertyValue $hbacsvcs }
       if ($hbacsvcgroups) { $ObjParams | Add-Member -NotePropertyName hbacsvcgroup -NotePropertyValue $hbacsvcgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_add_service/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_add_sourcehost {
        <#
            .DESCRIPTION
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_add_sourcehost/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_add_user {
        <#
            .DESCRIPTION
       Add users and groups to an HBAC rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_add_user/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_del {
        <#
            .DESCRIPTION
       Delete an HBAC rule.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_disable {
        <#
            .DESCRIPTION
       Disable an HBAC rule.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_disable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_enable {
        <#
            .DESCRIPTION
       Enable an HBAC rule.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_enable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_find {
        <#
            .DESCRIPTION
       Search for HBAC rules.
       .PARAMETER name
       Rule name
       .PARAMETER type
       Rule type (allow)
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER servicecat
       Service category the rule applies to
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER externalhost
       External host
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateSet("allow","deny")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$servicecat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$externalhost,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($type) { $ObjParams | Add-Member -NotePropertyName accessruletype -NotePropertyValue $type }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($srchostcat) { $ObjParams | Add-Member -NotePropertyName sourcehostcategory -NotePropertyValue $srchostcat }
       if ($servicecat) { $ObjParams | Add-Member -NotePropertyName servicecategory -NotePropertyValue $servicecat }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($externalhost) { $ObjParams | Add-Member -NotePropertyName externalhost -NotePropertyValue $externalhost }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_mod {
        <#
            .DESCRIPTION
       Modify an HBAC rule.
       .PARAMETER type
       Rule type (allow)
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER servicecat
       Service category the rule applies to
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER externalhost
       External host
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER rename
       Rename the HBAC rule object
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateSet("allow","deny")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$servicecat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$externalhost,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($type) { $ObjParams | Add-Member -NotePropertyName accessruletype -NotePropertyValue $type }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($srchostcat) { $ObjParams | Add-Member -NotePropertyName sourcehostcategory -NotePropertyValue $srchostcat }
       if ($servicecat) { $ObjParams | Add-Member -NotePropertyName servicecategory -NotePropertyValue $servicecat }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($externalhost) { $ObjParams | Add-Member -NotePropertyName externalhost -NotePropertyValue $externalhost }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_remove_host {
        <#
            .DESCRIPTION
       Remove target hosts and hostgroups from an HBAC rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_remove_host/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_remove_service {
        <#
            .DESCRIPTION
       Remove service and service groups from an HBAC rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hbacsvcs
       HBAC services to remove
       .PARAMETER hbacsvcgroups
       HBAC service groups to remove
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hbacsvcs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hbacsvcgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hbacsvcs) { $ObjParams | Add-Member -NotePropertyName hbacsvc -NotePropertyValue $hbacsvcs }
       if ($hbacsvcgroups) { $ObjParams | Add-Member -NotePropertyName hbacsvcgroup -NotePropertyValue $hbacsvcgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_remove_service/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_remove_sourcehost {
        <#
            .DESCRIPTION
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_remove_sourcehost/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_remove_user {
        <#
            .DESCRIPTION
       Remove users and groups from an HBAC rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_remove_user/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacrule_show {
        <#
            .DESCRIPTION
       Display the properties of an HBAC rule.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacrule_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvcgroup_add {
        <#
            .DESCRIPTION
       Add a new HBAC service group.
       .PARAMETER desc
       HBAC service group description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Service group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvcgroup_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvcgroup_add_member {
        <#
            .DESCRIPTION
       Add members to an HBAC service group.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hbacsvcs
       HBAC services to add
       .PARAMETER name
       Service group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hbacsvcs,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hbacsvcs) { $ObjParams | Add-Member -NotePropertyName hbacsvc -NotePropertyValue $hbacsvcs }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvcgroup_add_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvcgroup_del {
        <#
            .DESCRIPTION
       Delete an HBAC service group.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Service group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvcgroup_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvcgroup_find {
        <#
            .DESCRIPTION
       Search for an HBAC service group.
       .PARAMETER name
       Service group name
       .PARAMETER desc
       HBAC service group description
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvcgroup_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvcgroup_mod {
        <#
            .DESCRIPTION
       Modify an HBAC service group.
       .PARAMETER desc
       HBAC service group description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Service group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvcgroup_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvcgroup_remove_member {
        <#
            .DESCRIPTION
       Remove members from an HBAC service group.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hbacsvcs
       HBAC services to remove
       .PARAMETER name
       Service group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hbacsvcs,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hbacsvcs) { $ObjParams | Add-Member -NotePropertyName hbacsvc -NotePropertyValue $hbacsvcs }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvcgroup_remove_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvcgroup_show {
        <#
            .DESCRIPTION
       Display information about an HBAC service group.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Service group name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvcgroup_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvc_add {
        <#
            .DESCRIPTION
       Add a new HBAC service.
       .PARAMETER desc
       HBAC service description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER service
       HBAC service
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvc_add/1"
                params  = @(@($service),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvc_del {
        <#
            .DESCRIPTION
       Delete an existing HBAC service.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER service
       HBAC service
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$service,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvc_del/1"
                params  = @(@($service),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvc_find {
        <#
            .DESCRIPTION
       Search for HBAC services.
       .PARAMETER service
       HBAC service
       .PARAMETER desc
       HBAC service description
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("service")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($service) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $service }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvc_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvc_mod {
        <#
            .DESCRIPTION
       Modify an HBAC service.
       .PARAMETER desc
       HBAC service description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER service
       HBAC service
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvc_mod/1"
                params  = @(@($service),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbacsvc_show {
        <#
            .DESCRIPTION
       Display information about an HBAC service.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER service
       HBAC service
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbacsvc_show/1"
                params  = @(@($service),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhbactest {
        <#
            .DESCRIPTION
       Simulate use of Host-based access controls
       .PARAMETER user
       User name
       .PARAMETER host
       Target host
       .PARAMETER service
       Service
       .PARAMETER rules
       Rules to test. If not specified, -enabled is assumed
       .PARAMETER nodetail
       Hide details which rules are matched, not matched, or invalid
       .PARAMETER enabled
       Include all enabled IPA rules into test [default]
       .PARAMETER disabled
       Include all disabled IPA rules into test
       .PARAMETER sizelimit
       Maximum number of rules to process when no -rules is specified
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$host,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rules,
               [parameter(Mandatory=$false)]
                    
                [switch]$nodetail,
               [parameter(Mandatory=$false)]
                    
                [switch]$enabled,
               [parameter(Mandatory=$false)]
                    
                [switch]$disabled,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($user) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $user }
       if ($srchost) { $ObjParams | Add-Member -NotePropertyName sourcehost -NotePropertyValue $srchost }
       if ($host) { $ObjParams | Add-Member -NotePropertyName targethost -NotePropertyValue $host }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($rules) { $ObjParams | Add-Member -NotePropertyName rules -NotePropertyValue $rules }
       if ($nodetail.IsPresent) { $ObjParams | Add-Member -NotePropertyName nodetail -NotePropertyValue $true }
       if ($enabled.IsPresent) { $ObjParams | Add-Member -NotePropertyName enabled -NotePropertyValue $true }
       if ($disabled.IsPresent) { $ObjParams | Add-Member -NotePropertyName disabled -NotePropertyValue $true }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hbactest/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhostgroup_add {
        <#
            .DESCRIPTION
       Add a new hostgroup.
       .PARAMETER desc
       A description of this host-group
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hostgroup_name
       Name of host-group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$hostgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hostgroup_add/1"
                params  = @(@($hostgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhostgroup_add_member {
        <#
            .DESCRIPTION
       Add members to a hostgroup.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER hostgroup_name
       Name of host-group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$hostgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hostgroup_add_member/1"
                params  = @(@($hostgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhostgroup_del {
        <#
            .DESCRIPTION
       Delete a hostgroup.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER hostgroup_name
       Name of host-group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$hostgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hostgroup_del/1"
                params  = @(@($hostgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhostgroup_find {
        <#
            .DESCRIPTION
       Search for hostgroups.
       .PARAMETER hostgroup_name
       Name of host-group
       .PARAMETER desc
       A description of this host-group
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("hostgroup-name")
       .PARAMETER hosts
       Search for host groups with these member hosts.
       .PARAMETER no_hosts
       Search for host groups without these member hosts.
       .PARAMETER hostgroups
       Search for host groups with these member host groups.
       .PARAMETER no_hostgroups
       Search for host groups without these member host groups.
       .PARAMETER in_hostgroups
       Search for host groups with these member of host groups.
       .PARAMETER not_in_hostgroups
       Search for host groups without these member of host groups.
       .PARAMETER in_netgroups
       Search for host groups with these member of netgroups.
       .PARAMETER not_in_netgroups
       Search for host groups without these member of netgroups.
       .PARAMETER in_hbacrules
       Search for host groups with these member of HBAC rules.
       .PARAMETER not_in_hbacrules
       Search for host groups without these member of HBAC rules.
       .PARAMETER in_sudorules
       Search for host groups with these member of sudo rules.
       .PARAMETER not_in_sudorules
       Search for host groups without these member of sudo rules.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$hostgroup_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$no_hosts,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$no_hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$in_hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$not_in_hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$not_in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_hbacrules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_hbacrules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_sudorules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_sudorules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($hostgroup_name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $hostgroup_name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($no_hosts) { $ObjParams | Add-Member -NotePropertyName no_host -NotePropertyValue $no_hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
       if ($no_hostgroups) { $ObjParams | Add-Member -NotePropertyName no_hostgroup -NotePropertyValue $no_hostgroups }
       if ($in_hostgroups) { $ObjParams | Add-Member -NotePropertyName in_hostgroup -NotePropertyValue $in_hostgroups }
       if ($not_in_hostgroups) { $ObjParams | Add-Member -NotePropertyName not_in_hostgroup -NotePropertyValue $not_in_hostgroups }
       if ($in_netgroups) { $ObjParams | Add-Member -NotePropertyName in_netgroup -NotePropertyValue $in_netgroups }
       if ($not_in_netgroups) { $ObjParams | Add-Member -NotePropertyName not_in_netgroup -NotePropertyValue $not_in_netgroups }
       if ($in_hbacrules) { $ObjParams | Add-Member -NotePropertyName in_hbacrule -NotePropertyValue $in_hbacrules }
       if ($not_in_hbacrules) { $ObjParams | Add-Member -NotePropertyName not_in_hbacrule -NotePropertyValue $not_in_hbacrules }
       if ($in_sudorules) { $ObjParams | Add-Member -NotePropertyName in_sudorule -NotePropertyValue $in_sudorules }
       if ($not_in_sudorules) { $ObjParams | Add-Member -NotePropertyName not_in_sudorule -NotePropertyValue $not_in_sudorules }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hostgroup_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhostgroup_mod {
        <#
            .DESCRIPTION
       Modify a hostgroup.
       .PARAMETER desc
       A description of this host-group
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hostgroup_name
       Name of host-group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$hostgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hostgroup_mod/1"
                params  = @(@($hostgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhostgroup_remove_member {
        <#
            .DESCRIPTION
       Remove members from a hostgroup.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER hostgroup_name
       Name of host-group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$hostgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hostgroup_remove_member/1"
                params  = @(@($hostgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhostgroup_show {
        <#
            .DESCRIPTION
       Display information about a hostgroup.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hostgroup_name
       Name of host-group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$hostgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "hostgroup_show/1"
                params  = @(@($hostgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_add {
        <#
            .DESCRIPTION
       Add a new host.
       .PARAMETER desc
       A description of this host
       .PARAMETER locality
       Host locality (e.g. "Baltimore, MD")
       .PARAMETER location
       Host location (e.g. "Lab 2")
       .PARAMETER platform
       Host hardware platform (e.g. "Lenovo T61")
       .PARAMETER os
       Host operating system and version (e.g. "Fedora 9")
       .PARAMETER password
       Password used in bulk enrollment
       .PARAMETER random
       Generate a random password to be used in bulk enrollment
       .PARAMETER certificate
       Base-64 encoded host certificate
       .PARAMETER macaddress
       Hardware MAC address(es) on this host
       .PARAMETER sshpubkey
       SSH public key
       .PARAMETER class
       Host category (semantics placed on this attribute are for local interpretation)
       .PARAMETER ipaassignedidview
       Assigned ID View
       .PARAMETER auth_ind
       Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.
       .PARAMETER requires_pre_auth
       Pre-authentication is required for the service
       .PARAMETER ok_as_delegate
       Client credentials may be delegated to the service
       .PARAMETER ok_to_auth_as_delegate
       The service is allowed to authenticate on behalf of a client
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER force
       force host name even if not in DNS
       .PARAMETER no_reverse
       skip reverse DNS detection
       .PARAMETER ip_address
       Add the host to DNS with this IP address
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$locality,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$location,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$platform,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$os,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    
                [switch]$random,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^([a-fA-F0-9]{2}[:|\-]?){5}[a-fA-F0-9]{2}$")]
                [String[]]$macaddress,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshpubkey,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ipaassignedidview,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$auth_ind,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$requires_pre_auth,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ok_as_delegate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ok_to_auth_as_delegate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$force,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_reverse,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ip_address,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($locality) { $ObjParams | Add-Member -NotePropertyName l -NotePropertyValue $locality }
       if ($location) { $ObjParams | Add-Member -NotePropertyName nshostlocation -NotePropertyValue $location }
       if ($platform) { $ObjParams | Add-Member -NotePropertyName nshardwareplatform -NotePropertyValue $platform }
       if ($os) { $ObjParams | Add-Member -NotePropertyName nsosversion -NotePropertyValue $os }
       if ($password) { $ObjParams | Add-Member -NotePropertyName userpassword -NotePropertyValue $password }
       if ($random.IsPresent) { $ObjParams | Add-Member -NotePropertyName random -NotePropertyValue $true }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($macaddress) { $ObjParams | Add-Member -NotePropertyName macaddress -NotePropertyValue $macaddress }
       if ($sshpubkey) { $ObjParams | Add-Member -NotePropertyName ipasshpubkey -NotePropertyValue $sshpubkey }
       if ($class) { $ObjParams | Add-Member -NotePropertyName userclass -NotePropertyValue $class }
       if ($ipaassignedidview) { $ObjParams | Add-Member -NotePropertyName ipaassignedidview -NotePropertyValue $ipaassignedidview }
       if ($auth_ind) { $ObjParams | Add-Member -NotePropertyName krbprincipalauthind -NotePropertyValue $auth_ind }
       if ($requires_pre_auth.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrbrequirespreauth -NotePropertyValue $true }
       if ($ok_as_delegate.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrbokasdelegate -NotePropertyValue $true }
       if ($ok_to_auth_as_delegate.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrboktoauthasdelegate -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($force.IsPresent) { $ObjParams | Add-Member -NotePropertyName force -NotePropertyValue $true }
       if ($no_reverse.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_reverse -NotePropertyValue $true }
       if ($ip_address) { $ObjParams | Add-Member -NotePropertyName ip_address -NotePropertyValue $ip_address }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_add/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_add_cert {
        <#
            .DESCRIPTION
       Add certificates to host entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER certificate
       Base-64 encoded host certificate
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_add_cert/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_add_managedby {
        <#
            .DESCRIPTION
       Add hosts that can manage this host.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_add_managedby/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_add_principal {
        <#
            .DESCRIPTION
       Add new principal alias to host entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hostname
       Host name
       .PARAMETER krbprincipalname
       Principal alias
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$krbprincipalname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_add_principal/1"
                params  = @(@($hostname,$krbprincipalname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_allow_create_keytab {
        <#
            .DESCRIPTION
       Allow users, groups, hosts or host groups to create a keytab of this host.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_allow_create_keytab/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_allow_retrieve_keytab {
        <#
            .DESCRIPTION
       Allow users, groups, hosts or host groups to retrieve a keytab of this host.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_allow_retrieve_keytab/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_del {
        <#
            .DESCRIPTION
       Delete a host.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER updatedns
       Remove A, AAAA, SSHFP and PTR records of the host(s) managed by IPA DNS
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    
                [switch]$updatedns,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }
       if ($updatedns.IsPresent) { $ObjParams | Add-Member -NotePropertyName updatedns -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_del/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_disable {
        <#
            .DESCRIPTION
       Disable the Kerberos key, SSL certificate and all services of a host.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_disable/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_disallow_create_keytab {
        <#
            .DESCRIPTION
       Disallow users, groups, hosts or host groups to create a keytab of this host.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_disallow_create_keytab/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_disallow_retrieve_keytab {
        <#
            .DESCRIPTION
       Disallow users, groups, hosts or host groups to retrieve a keytab of this host.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_disallow_retrieve_keytab/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_find {
        <#
            .DESCRIPTION
       Search for hosts.
       .PARAMETER hostname
       Host name
       .PARAMETER desc
       A description of this host
       .PARAMETER locality
       Host locality (e.g. "Baltimore, MD")
       .PARAMETER location
       Host location (e.g. "Lab 2")
       .PARAMETER platform
       Host hardware platform (e.g. "Lenovo T61")
       .PARAMETER os
       Host operating system and version (e.g. "Fedora 9")
       .PARAMETER password
       Password used in bulk enrollment
       .PARAMETER certificate
       Base-64 encoded host certificate
       .PARAMETER macaddress
       Hardware MAC address(es) on this host
       .PARAMETER class
       Host category (semantics placed on this attribute are for local interpretation)
       .PARAMETER ipaassignedidview
       Assigned ID View
       .PARAMETER auth_ind
       Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("hostname")
       .PARAMETER in_hostgroups
       Search for hosts with these member of host groups.
       .PARAMETER not_in_hostgroups
       Search for hosts without these member of host groups.
       .PARAMETER in_netgroups
       Search for hosts with these member of netgroups.
       .PARAMETER not_in_netgroups
       Search for hosts without these member of netgroups.
       .PARAMETER in_roles
       Search for hosts with these member of roles.
       .PARAMETER not_in_roles
       Search for hosts without these member of roles.
       .PARAMETER in_hbacrules
       Search for hosts with these member of HBAC rules.
       .PARAMETER not_in_hbacrules
       Search for hosts without these member of HBAC rules.
       .PARAMETER in_sudorules
       Search for hosts with these member of sudo rules.
       .PARAMETER not_in_sudorules
       Search for hosts without these member of sudo rules.
       .PARAMETER enroll_by_users
       Search for hosts with these enrolled by users.
       .PARAMETER not_enroll_by_users
       Search for hosts without these enrolled by users.
       .PARAMETER man_by_hosts
       Search for hosts with these managed by hosts.
       .PARAMETER not_man_by_hosts
       Search for hosts without these managed by hosts.
       .PARAMETER man_hosts
       Search for hosts with these managing hosts.
       .PARAMETER not_man_hosts
       Search for hosts without these managing hosts.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$locality,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$location,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$platform,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$os,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^([a-fA-F0-9]{2}[:|\-]?){5}[a-fA-F0-9]{2}$")]
                [String[]]$macaddress,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ipaassignedidview,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$auth_ind,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$in_hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$not_in_hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$not_in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_roles,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_roles,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_hbacrules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_hbacrules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_sudorules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_sudorules,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$enroll_by_users,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$not_enroll_by_users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$man_by_hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_man_by_hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$man_hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_man_hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($hostname) { $ObjParams | Add-Member -NotePropertyName fqdn -NotePropertyValue $hostname }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($locality) { $ObjParams | Add-Member -NotePropertyName l -NotePropertyValue $locality }
       if ($location) { $ObjParams | Add-Member -NotePropertyName nshostlocation -NotePropertyValue $location }
       if ($platform) { $ObjParams | Add-Member -NotePropertyName nshardwareplatform -NotePropertyValue $platform }
       if ($os) { $ObjParams | Add-Member -NotePropertyName nsosversion -NotePropertyValue $os }
       if ($password) { $ObjParams | Add-Member -NotePropertyName userpassword -NotePropertyValue $password }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($macaddress) { $ObjParams | Add-Member -NotePropertyName macaddress -NotePropertyValue $macaddress }
       if ($class) { $ObjParams | Add-Member -NotePropertyName userclass -NotePropertyValue $class }
       if ($ipaassignedidview) { $ObjParams | Add-Member -NotePropertyName ipaassignedidview -NotePropertyValue $ipaassignedidview }
       if ($auth_ind) { $ObjParams | Add-Member -NotePropertyName krbprincipalauthind -NotePropertyValue $auth_ind }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($in_hostgroups) { $ObjParams | Add-Member -NotePropertyName in_hostgroup -NotePropertyValue $in_hostgroups }
       if ($not_in_hostgroups) { $ObjParams | Add-Member -NotePropertyName not_in_hostgroup -NotePropertyValue $not_in_hostgroups }
       if ($in_netgroups) { $ObjParams | Add-Member -NotePropertyName in_netgroup -NotePropertyValue $in_netgroups }
       if ($not_in_netgroups) { $ObjParams | Add-Member -NotePropertyName not_in_netgroup -NotePropertyValue $not_in_netgroups }
       if ($in_roles) { $ObjParams | Add-Member -NotePropertyName in_role -NotePropertyValue $in_roles }
       if ($not_in_roles) { $ObjParams | Add-Member -NotePropertyName not_in_role -NotePropertyValue $not_in_roles }
       if ($in_hbacrules) { $ObjParams | Add-Member -NotePropertyName in_hbacrule -NotePropertyValue $in_hbacrules }
       if ($not_in_hbacrules) { $ObjParams | Add-Member -NotePropertyName not_in_hbacrule -NotePropertyValue $not_in_hbacrules }
       if ($in_sudorules) { $ObjParams | Add-Member -NotePropertyName in_sudorule -NotePropertyValue $in_sudorules }
       if ($not_in_sudorules) { $ObjParams | Add-Member -NotePropertyName not_in_sudorule -NotePropertyValue $not_in_sudorules }
       if ($enroll_by_users) { $ObjParams | Add-Member -NotePropertyName enroll_by_user -NotePropertyValue $enroll_by_users }
       if ($not_enroll_by_users) { $ObjParams | Add-Member -NotePropertyName not_enroll_by_user -NotePropertyValue $not_enroll_by_users }
       if ($man_by_hosts) { $ObjParams | Add-Member -NotePropertyName man_by_host -NotePropertyValue $man_by_hosts }
       if ($not_man_by_hosts) { $ObjParams | Add-Member -NotePropertyName not_man_by_host -NotePropertyValue $not_man_by_hosts }
       if ($man_hosts) { $ObjParams | Add-Member -NotePropertyName man_host -NotePropertyValue $man_hosts }
       if ($not_man_hosts) { $ObjParams | Add-Member -NotePropertyName not_man_host -NotePropertyValue $not_man_hosts }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_mod {
        <#
            .DESCRIPTION
       Modify information about a host.
       .PARAMETER desc
       A description of this host
       .PARAMETER locality
       Host locality (e.g. "Baltimore, MD")
       .PARAMETER location
       Host location (e.g. "Lab 2")
       .PARAMETER platform
       Host hardware platform (e.g. "Lenovo T61")
       .PARAMETER os
       Host operating system and version (e.g. "Fedora 9")
       .PARAMETER password
       Password used in bulk enrollment
       .PARAMETER random
       Generate a random password to be used in bulk enrollment
       .PARAMETER certificate
       Base-64 encoded host certificate
       .PARAMETER krbprincipalname
       Principal alias
       .PARAMETER macaddress
       Hardware MAC address(es) on this host
       .PARAMETER sshpubkey
       SSH public key
       .PARAMETER class
       Host category (semantics placed on this attribute are for local interpretation)
       .PARAMETER ipaassignedidview
       Assigned ID View
       .PARAMETER auth_ind
       Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.
       .PARAMETER requires_pre_auth
       Pre-authentication is required for the service
       .PARAMETER ok_as_delegate
       Client credentials may be delegated to the service
       .PARAMETER ok_to_auth_as_delegate
       The service is allowed to authenticate on behalf of a client
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER updatedns
       Update DNS entries
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$locality,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$location,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$platform,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$os,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    
                [switch]$random,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$krbprincipalname,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^([a-fA-F0-9]{2}[:|\-]?){5}[a-fA-F0-9]{2}$")]
                [String[]]$macaddress,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshpubkey,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ipaassignedidview,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$auth_ind,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$requires_pre_auth,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ok_as_delegate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ok_to_auth_as_delegate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$updatedns,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($locality) { $ObjParams | Add-Member -NotePropertyName l -NotePropertyValue $locality }
       if ($location) { $ObjParams | Add-Member -NotePropertyName nshostlocation -NotePropertyValue $location }
       if ($platform) { $ObjParams | Add-Member -NotePropertyName nshardwareplatform -NotePropertyValue $platform }
       if ($os) { $ObjParams | Add-Member -NotePropertyName nsosversion -NotePropertyValue $os }
       if ($password) { $ObjParams | Add-Member -NotePropertyName userpassword -NotePropertyValue $password }
       if ($random.IsPresent) { $ObjParams | Add-Member -NotePropertyName random -NotePropertyValue $true }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($krbprincipalname) { $ObjParams | Add-Member -NotePropertyName krbprincipalname -NotePropertyValue $krbprincipalname }
       if ($macaddress) { $ObjParams | Add-Member -NotePropertyName macaddress -NotePropertyValue $macaddress }
       if ($sshpubkey) { $ObjParams | Add-Member -NotePropertyName ipasshpubkey -NotePropertyValue $sshpubkey }
       if ($class) { $ObjParams | Add-Member -NotePropertyName userclass -NotePropertyValue $class }
       if ($ipaassignedidview) { $ObjParams | Add-Member -NotePropertyName ipaassignedidview -NotePropertyValue $ipaassignedidview }
       if ($auth_ind) { $ObjParams | Add-Member -NotePropertyName krbprincipalauthind -NotePropertyValue $auth_ind }
       if ($requires_pre_auth.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrbrequirespreauth -NotePropertyValue $true }
       if ($ok_as_delegate.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrbokasdelegate -NotePropertyValue $true }
       if ($ok_to_auth_as_delegate.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrboktoauthasdelegate -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($updatedns.IsPresent) { $ObjParams | Add-Member -NotePropertyName updatedns -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_mod/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_remove_cert {
        <#
            .DESCRIPTION
       Remove certificates from host entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER certificate
       Base-64 encoded host certificate
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_remove_cert/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_remove_managedby {
        <#
            .DESCRIPTION
       Remove hosts that can manage this host.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_remove_managedby/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_remove_principal {
        <#
            .DESCRIPTION
       Remove principal alias from a host entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hostname
       Host name
       .PARAMETER krbprincipalname
       Principal alias
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$krbprincipalname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_remove_principal/1"
                params  = @(@($hostname,$krbprincipalname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIhost_show {
        <#
            .DESCRIPTION
       Display information about a host.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER out
       file to store certificate in
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hostname
       Host name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$out,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($out) { $ObjParams | Add-Member -NotePropertyName out -NotePropertyValue $out }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "host_show/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIi18n_messages {
        <#
            .DESCRIPTION
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "i18n_messages/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverridegroup_add {
        <#
            .DESCRIPTION
       Add a new Group ID override.
       .PARAMETER desc
       Description
       .PARAMETER group_name
       Group name
       .PARAMETER gid
       Group ID Number
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER idview
       ID View Name
       .PARAMETER anchor
       Anchor to override
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$group_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$anchor,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($group_name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $group_name }
       if ($gid) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gid }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverridegroup_add/1"
                params  = @(@($idview,$anchor),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverridegroup_del {
        <#
            .DESCRIPTION
       Delete an Group ID override.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER idview
       ID View Name
       .PARAMETER anchor
       Anchor to override
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$anchor,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverridegroup_del/1"
                params  = @(@($idview,$anchor),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverridegroup_find {
        <#
            .DESCRIPTION
       Search for an Group ID override.
       .PARAMETER anchor
       Anchor to override
       .PARAMETER desc
       Description
       .PARAMETER group_name
       Group name
       .PARAMETER gid
       Group ID Number
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("anchor")
       .PARAMETER idview
       ID View Name
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$anchor,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$group_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($anchor) { $ObjParams | Add-Member -NotePropertyName ipaanchoruuid -NotePropertyValue $anchor }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($group_name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $group_name }
       if ($gid) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gid }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverridegroup_find/1"
                params  = @(@($idview,$criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverridegroup_mod {
        <#
            .DESCRIPTION
       Modify an Group ID override.
       .PARAMETER desc
       Description
       .PARAMETER group_name
       Group name
       .PARAMETER gid
       Group ID Number
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rename
       Rename the Group ID override object
       .PARAMETER idview
       ID View Name
       .PARAMETER anchor
       Anchor to override
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$group_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$anchor,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($group_name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $group_name }
       if ($gid) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gid }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverridegroup_mod/1"
                params  = @(@($idview,$anchor),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverridegroup_show {
        <#
            .DESCRIPTION
       Display information about an Group ID override.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER idview
       ID View Name
       .PARAMETER anchor
       Anchor to override
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$anchor,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverridegroup_show/1"
                params  = @(@($idview,$anchor),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverrideuser_add {
        <#
            .DESCRIPTION
       Add a new User ID override.
       .PARAMETER desc
       Description
       .PARAMETER login
       User login
       .PARAMETER uid
       User ID Number
       .PARAMETER gecos
       GECOS
       .PARAMETER gidnumber
       Group ID Number
       .PARAMETER homedir
       Home directory
       .PARAMETER shell
       Login shell
       .PARAMETER ipaoriginaluid
       <ipaoriginaluid>
       .PARAMETER sshpubkey
       SSH public key
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER idview
       ID View Name
       .PARAMETER anchor
       Anchor to override
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$gecos,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gidnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$homedir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$shell,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ipaoriginaluid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshpubkey,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$anchor,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($login) { $ObjParams | Add-Member -NotePropertyName uid -NotePropertyValue $login }
       if ($uid) { $ObjParams | Add-Member -NotePropertyName uidnumber -NotePropertyValue $uid }
       if ($gecos) { $ObjParams | Add-Member -NotePropertyName gecos -NotePropertyValue $gecos }
       if ($gidnumber) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gidnumber }
       if ($homedir) { $ObjParams | Add-Member -NotePropertyName homedirectory -NotePropertyValue $homedir }
       if ($shell) { $ObjParams | Add-Member -NotePropertyName loginshell -NotePropertyValue $shell }
       if ($ipaoriginaluid) { $ObjParams | Add-Member -NotePropertyName ipaoriginaluid -NotePropertyValue $ipaoriginaluid }
       if ($sshpubkey) { $ObjParams | Add-Member -NotePropertyName ipasshpubkey -NotePropertyValue $sshpubkey }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverrideuser_add/1"
                params  = @(@($idview,$anchor),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverrideuser_add_cert {
        <#
            .DESCRIPTION
       Add one or more certificates to the idoverrideuser entry
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER idview
       ID View Name
       .PARAMETER anchor
       Anchor to override
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$anchor,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverrideuser_add_cert/1"
                params  = @(@($idview,$anchor),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverrideuser_del {
        <#
            .DESCRIPTION
       Delete an User ID override.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER idview
       ID View Name
       .PARAMETER anchor
       Anchor to override
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$anchor,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverrideuser_del/1"
                params  = @(@($idview,$anchor),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverrideuser_find {
        <#
            .DESCRIPTION
       Search for an User ID override.
       .PARAMETER anchor
       Anchor to override
       .PARAMETER desc
       Description
       .PARAMETER login
       User login
       .PARAMETER uid
       User ID Number
       .PARAMETER gecos
       GECOS
       .PARAMETER gidnumber
       Group ID Number
       .PARAMETER homedir
       Home directory
       .PARAMETER shell
       Login shell
       .PARAMETER ipaoriginaluid
       <ipaoriginaluid>
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("anchor")
       .PARAMETER idview
       ID View Name
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$anchor,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$gecos,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gidnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$homedir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$shell,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ipaoriginaluid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($anchor) { $ObjParams | Add-Member -NotePropertyName ipaanchoruuid -NotePropertyValue $anchor }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($login) { $ObjParams | Add-Member -NotePropertyName uid -NotePropertyValue $login }
       if ($uid) { $ObjParams | Add-Member -NotePropertyName uidnumber -NotePropertyValue $uid }
       if ($gecos) { $ObjParams | Add-Member -NotePropertyName gecos -NotePropertyValue $gecos }
       if ($gidnumber) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gidnumber }
       if ($homedir) { $ObjParams | Add-Member -NotePropertyName homedirectory -NotePropertyValue $homedir }
       if ($shell) { $ObjParams | Add-Member -NotePropertyName loginshell -NotePropertyValue $shell }
       if ($ipaoriginaluid) { $ObjParams | Add-Member -NotePropertyName ipaoriginaluid -NotePropertyValue $ipaoriginaluid }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverrideuser_find/1"
                params  = @(@($idview,$criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverrideuser_mod {
        <#
            .DESCRIPTION
       Modify an User ID override.
       .PARAMETER desc
       Description
       .PARAMETER login
       User login
       .PARAMETER uid
       User ID Number
       .PARAMETER gecos
       GECOS
       .PARAMETER gidnumber
       Group ID Number
       .PARAMETER homedir
       Home directory
       .PARAMETER shell
       Login shell
       .PARAMETER ipaoriginaluid
       <ipaoriginaluid>
       .PARAMETER sshpubkey
       SSH public key
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rename
       Rename the User ID override object
       .PARAMETER idview
       ID View Name
       .PARAMETER anchor
       Anchor to override
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$gecos,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gidnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$homedir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$shell,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ipaoriginaluid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshpubkey,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$anchor,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($login) { $ObjParams | Add-Member -NotePropertyName uid -NotePropertyValue $login }
       if ($uid) { $ObjParams | Add-Member -NotePropertyName uidnumber -NotePropertyValue $uid }
       if ($gecos) { $ObjParams | Add-Member -NotePropertyName gecos -NotePropertyValue $gecos }
       if ($gidnumber) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gidnumber }
       if ($homedir) { $ObjParams | Add-Member -NotePropertyName homedirectory -NotePropertyValue $homedir }
       if ($shell) { $ObjParams | Add-Member -NotePropertyName loginshell -NotePropertyValue $shell }
       if ($ipaoriginaluid) { $ObjParams | Add-Member -NotePropertyName ipaoriginaluid -NotePropertyValue $ipaoriginaluid }
       if ($sshpubkey) { $ObjParams | Add-Member -NotePropertyName ipasshpubkey -NotePropertyValue $sshpubkey }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverrideuser_mod/1"
                params  = @(@($idview,$anchor),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverrideuser_remove_cert {
        <#
            .DESCRIPTION
       Remove one or more certificates to the idoverrideuser entry
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER idview
       ID View Name
       .PARAMETER anchor
       Anchor to override
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$anchor,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverrideuser_remove_cert/1"
                params  = @(@($idview,$anchor),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidoverrideuser_show {
        <#
            .DESCRIPTION
       Display information about an User ID override.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER fallback_to_ldap
       Allow falling back to AD DC LDAP when resolving AD trusted objects. For two-way trusts only.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER idview
       ID View Name
       .PARAMETER anchor
       Anchor to override
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$fallback_to_ldap,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$idview,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$anchor,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($fallback_to_ldap.IsPresent) { $ObjParams | Add-Member -NotePropertyName fallback_to_ldap -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idoverrideuser_show/1"
                params  = @(@($idview,$anchor),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidrange_add {
        <#
            .DESCRIPTION
       
    Add new ID range.

    To add a new ID range you always have to specify

        -base-id
        -range-size

    Additionally

        -rid-base
        -secondary-rid-base

    may be given for a new ID range for the local domain while

        -rid-base
        -dom-sid

    must be given to add a new range for a trusted AD domain.

=======
WARNING:

DNA plugin in 389-ds will allocate IDs based on the ranges configured for the
local domain. Currently the DNA plugin *cannot* be reconfigured itself based
on the local ranges set via this family of commands.

Manual configuration change has to be done in the DNA plugin configuration for
the new local range. Specifically, The dnaNextRange attribute of 'cn=Posix
IDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config' has to be
modified to match the new range.
=======

 
       .PARAMETER base_id
       First Posix ID of the range
       .PARAMETER range_size
       Number of IDs in the range
       .PARAMETER rid_base
       First RID of the corresponding RID range
       .PARAMETER secondary_rid_base
       First RID of the secondary RID range
       .PARAMETER dom_sid
       Domain SID of the trusted domain
       .PARAMETER dom_name
       Name of the trusted domain
       .PARAMETER type
       ID range type, one of ipa-ad-trust, ipa-ad-trust-posix, ipa-local
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Range name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$base_id,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$range_size,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$rid_base,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$secondary_rid_base,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$dom_sid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$dom_name,
               [parameter(Mandatory=$false)]
                    [ValidateSet("ipa-ad-trust","ipa-ad-trust-posix","ipa-local")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($base_id) { $ObjParams | Add-Member -NotePropertyName ipabaseid -NotePropertyValue $base_id }
       if ($range_size) { $ObjParams | Add-Member -NotePropertyName ipaidrangesize -NotePropertyValue $range_size }
       if ($rid_base) { $ObjParams | Add-Member -NotePropertyName ipabaserid -NotePropertyValue $rid_base }
       if ($secondary_rid_base) { $ObjParams | Add-Member -NotePropertyName ipasecondarybaserid -NotePropertyValue $secondary_rid_base }
       if ($dom_sid) { $ObjParams | Add-Member -NotePropertyName ipanttrusteddomainsid -NotePropertyValue $dom_sid }
       if ($dom_name) { $ObjParams | Add-Member -NotePropertyName ipanttrusteddomainname -NotePropertyValue $dom_name }
       if ($type) { $ObjParams | Add-Member -NotePropertyName iparangetype -NotePropertyValue $type }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idrange_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidrange_del {
        <#
            .DESCRIPTION
       Delete an ID range.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Range name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idrange_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidrange_find {
        <#
            .DESCRIPTION
       Search for ranges.
       .PARAMETER name
       Range name
       .PARAMETER base_id
       First Posix ID of the range
       .PARAMETER range_size
       Number of IDs in the range
       .PARAMETER rid_base
       First RID of the corresponding RID range
       .PARAMETER secondary_rid_base
       First RID of the secondary RID range
       .PARAMETER dom_sid
       Domain SID of the trusted domain
       .PARAMETER type
       ID range type, one of ipa-ad-trust, ipa-ad-trust-posix, ipa-local
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$base_id,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$range_size,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$rid_base,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$secondary_rid_base,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$dom_sid,
               [parameter(Mandatory=$false)]
                    [ValidateSet("ipa-ad-trust","ipa-ad-trust-posix","ipa-local")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($base_id) { $ObjParams | Add-Member -NotePropertyName ipabaseid -NotePropertyValue $base_id }
       if ($range_size) { $ObjParams | Add-Member -NotePropertyName ipaidrangesize -NotePropertyValue $range_size }
       if ($rid_base) { $ObjParams | Add-Member -NotePropertyName ipabaserid -NotePropertyValue $rid_base }
       if ($secondary_rid_base) { $ObjParams | Add-Member -NotePropertyName ipasecondarybaserid -NotePropertyValue $secondary_rid_base }
       if ($dom_sid) { $ObjParams | Add-Member -NotePropertyName ipanttrusteddomainsid -NotePropertyValue $dom_sid }
       if ($type) { $ObjParams | Add-Member -NotePropertyName iparangetype -NotePropertyValue $type }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idrange_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidrange_mod {
        <#
            .DESCRIPTION
       Modify ID range.

=======
WARNING:

DNA plugin in 389-ds will allocate IDs based on the ranges configured for the
local domain. Currently the DNA plugin *cannot* be reconfigured itself based
on the local ranges set via this family of commands.

Manual configuration change has to be done in the DNA plugin configuration for
the new local range. Specifically, The dnaNextRange attribute of 'cn=Posix
IDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config' has to be
modified to match the new range.
=======

 
       .PARAMETER base_id
       First Posix ID of the range
       .PARAMETER range_size
       Number of IDs in the range
       .PARAMETER rid_base
       First RID of the corresponding RID range
       .PARAMETER secondary_rid_base
       First RID of the secondary RID range
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Range name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$base_id,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$range_size,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$rid_base,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$secondary_rid_base,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($base_id) { $ObjParams | Add-Member -NotePropertyName ipabaseid -NotePropertyValue $base_id }
       if ($range_size) { $ObjParams | Add-Member -NotePropertyName ipaidrangesize -NotePropertyValue $range_size }
       if ($rid_base) { $ObjParams | Add-Member -NotePropertyName ipabaserid -NotePropertyValue $rid_base }
       if ($secondary_rid_base) { $ObjParams | Add-Member -NotePropertyName ipasecondarybaserid -NotePropertyValue $secondary_rid_base }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($dom_sid) { $ObjParams | Add-Member -NotePropertyName ipanttrusteddomainsid -NotePropertyValue $dom_sid }
       if ($dom_name) { $ObjParams | Add-Member -NotePropertyName ipanttrusteddomainname -NotePropertyValue $dom_name }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idrange_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidrange_show {
        <#
            .DESCRIPTION
       Display information about a range.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Range name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idrange_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidview_add {
        <#
            .DESCRIPTION
       Add a new ID View.
       .PARAMETER desc
       Description
       .PARAMETER domain_resolution_order
       colon-separated list of domains used for short name qualification
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ID View Name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$domain_resolution_order,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($domain_resolution_order) { $ObjParams | Add-Member -NotePropertyName ipadomainresolutionorder -NotePropertyValue $domain_resolution_order }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idview_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidview_apply {
        <#
            .DESCRIPTION
       Applies ID View to specified hosts or current members of specified hostgroups. If any other ID View is applied to the host, it is overridden.
       .PARAMETER hosts
       Hosts to apply the ID View to
       .PARAMETER hostgroups
       Hostgroups to whose hosts apply the ID View to. Please note that view is not applied automatically to any hosts added to the hostgroup after running the idview-apply command.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ID View Name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idview_apply/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidview_del {
        <#
            .DESCRIPTION
       Delete an ID View.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ID View Name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idview_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidview_find {
        <#
            .DESCRIPTION
       Search for an ID View.
       .PARAMETER name
       ID View Name
       .PARAMETER desc
       Description
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idview_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidview_mod {
        <#
            .DESCRIPTION
       Modify an ID View.
       .PARAMETER desc
       Description
       .PARAMETER domain_resolution_order
       colon-separated list of domains used for short name qualification
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rename
       Rename the ID View object
       .PARAMETER name
       ID View Name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$domain_resolution_order,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($domain_resolution_order) { $ObjParams | Add-Member -NotePropertyName ipadomainresolutionorder -NotePropertyValue $domain_resolution_order }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idview_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidview_show {
        <#
            .DESCRIPTION
       Display information about an ID View.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER show_hosts
       Enumerate all the hosts the view applies to.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       ID View Name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$show_hosts,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($show_hosts.IsPresent) { $ObjParams | Add-Member -NotePropertyName show_hosts -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idview_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIidview_unapply {
        <#
            .DESCRIPTION
       Clears ID View from specified hosts or current members of specified hostgroups.
       .PARAMETER hosts
       Hosts to clear (any) ID View from.
       .PARAMETER hostgroups
       Hostgroups whose hosts should have ID Views cleared. Note that view is not cleared automatically from any host added to the hostgroup after running idview-unapply command.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "idview_unapply/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIjoin {
        <#
            .DESCRIPTION
       Join an IPA domain
       .PARAMETER realm
       The IPA realm
       .PARAMETER platform
       Hardware platform of the host (e.g. Lenovo T61)
       .PARAMETER os
       Operating System and version of the host (e.g. Fedora 9)
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER hostname
       The hostname to register as
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$realm,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$platform,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$os,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$hostname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($realm) { $ObjParams | Add-Member -NotePropertyName realm -NotePropertyValue $realm }
       if ($platform) { $ObjParams | Add-Member -NotePropertyName nshardwareplatform -NotePropertyValue $platform }
       if ($os) { $ObjParams | Add-Member -NotePropertyName nsosversion -NotePropertyValue $os }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "join/1"
                params  = @(@($hostname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIjson_metadata {
        <#
            .DESCRIPTION
       
    Export plugin meta-data for the webUI.
     
       .PARAMETER object
       Name of object to export
       .PARAMETER method
       Name of method to export
       .PARAMETER command
       Name of command to export
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER objname
       Name of object to export
       .PARAMETER methodname
       Name of method to export
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$object,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$method,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$command,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$objname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$methodname,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($object) { $ObjParams | Add-Member -NotePropertyName object -NotePropertyValue $object }
       if ($method) { $ObjParams | Add-Member -NotePropertyName method -NotePropertyValue $method }
       if ($command) { $ObjParams | Add-Member -NotePropertyName command -NotePropertyValue $command }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "json_metadata/1"
                params  = @(@($objname,$methodname),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIkra_is_enabled {
        <#
            .DESCRIPTION
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "kra_is_enabled/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIkrbtpolicy_mod {
        <#
            .DESCRIPTION
       Modify Kerberos ticket policy.
       .PARAMETER maxlife
       Maximum ticket life (seconds)
       .PARAMETER maxrenew
       Maximum renewable age (seconds)
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER user
       Manage ticket policy for specific user
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$maxlife,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$maxrenew,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($maxlife) { $ObjParams | Add-Member -NotePropertyName krbmaxticketlife -NotePropertyValue $maxlife }
       if ($maxrenew) { $ObjParams | Add-Member -NotePropertyName krbmaxrenewableage -NotePropertyValue $maxrenew }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "krbtpolicy_mod/1"
                params  = @(@($user),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIkrbtpolicy_reset {
        <#
            .DESCRIPTION
       Reset Kerberos ticket policy to the default values.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER user
       Manage ticket policy for specific user
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "krbtpolicy_reset/1"
                params  = @(@($user),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIkrbtpolicy_show {
        <#
            .DESCRIPTION
       Display the current Kerberos ticket policy.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER user
       Manage ticket policy for specific user
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "krbtpolicy_show/1"
                params  = @(@($user),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIlocation_add {
        <#
            .DESCRIPTION
       Add a new IPA location.
       .PARAMETER description
       IPA Location description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       IPA location name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$description,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($description) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $description }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "location_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIlocation_del {
        <#
            .DESCRIPTION
       Delete an IPA location.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       IPA location name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "location_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIlocation_find {
        <#
            .DESCRIPTION
       Search for IPA locations.
       .PARAMETER name
       IPA location name
       .PARAMETER description
       IPA Location description
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$description,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName idnsname -NotePropertyValue $name }
       if ($description) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $description }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "location_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIlocation_mod {
        <#
            .DESCRIPTION
       Modify information about an IPA location.
       .PARAMETER description
       IPA Location description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       IPA location name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$description,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($description) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $description }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "location_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIlocation_show {
        <#
            .DESCRIPTION
       Display information about an IPA location.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       IPA location name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "location_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPImigrate_ds {
        <#
            .DESCRIPTION
       Migrate users and groups from DS to IPA.
       .PARAMETER bind_dn
       Bind DN
       .PARAMETER user_container
       DN of container for users in DS relative to base DN
       .PARAMETER group_container
       DN of container for groups in DS relative to base DN
       .PARAMETER user_objectclass
       Objectclasses used to search for user entries in DS
       .PARAMETER group_objectclass
       Objectclasses used to search for group entries in DS
       .PARAMETER user_ignore_objectclass
       Objectclasses to be ignored for user entries in DS
       .PARAMETER user_ignore_attribute
       Attributes to be ignored for user entries in DS
       .PARAMETER group_ignore_objectclass
       Objectclasses to be ignored for group entries in DS
       .PARAMETER group_ignore_attribute
       Attributes to be ignored for group entries in DS
       .PARAMETER group_overwrite_gid
       When migrating a group already existing in IPA domain overwrite the group GID and report as success
       .PARAMETER schema
       The schema used on the LDAP server. Supported values are RFC2307 and RFC2307bis. The default is RFC2307bis
       .PARAMETER continue
       Continuous operation mode. Errors are reported but the process continues
       .PARAMETER base_dn
       Base DN on remote LDAP server
       .PARAMETER with_compat
       Allows migration despite the usage of compat plugin
       .PARAMETER ca_cert_file
       Load CA certificate of LDAP server from FILE
       .PARAMETER use_default_group
       Add migrated users without a group to a default group (default: true)
       .PARAMETER scope
       LDAP search scope for users and groups: base, onelevel, or subtree. Defaults to onelevel
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER exclude_groups
       groups to exclude from migration
       .PARAMETER exclude_users
       users to exclude from migration
       .PARAMETER ldap_uri
       LDAP URI of DS server to migrate from
       .PARAMETER password
       bind password
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$bind_dn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user_container,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$group_container,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$user_objectclass,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$group_objectclass,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$user_ignore_objectclass,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$user_ignore_attribute,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$group_ignore_objectclass,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$group_ignore_attribute,
               [parameter(Mandatory=$false)]
                    
                [switch]$group_overwrite_gid,
               [parameter(Mandatory=$false)]
                    [ValidateSet("RFC2307bis","RFC2307")]
                [String]$schema,
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$base_dn,
               [parameter(Mandatory=$false)]
                    
                [switch]$with_compat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$ca_cert_file,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$use_default_group,
               [parameter(Mandatory=$false)]
                    [ValidateSet("base","onelevel","subtree")]
                [String]$scope,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$exclude_groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$exclude_users,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$ldap_uri,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($bind_dn) { $ObjParams | Add-Member -NotePropertyName binddn -NotePropertyValue $bind_dn }
       if ($user_container) { $ObjParams | Add-Member -NotePropertyName usercontainer -NotePropertyValue $user_container }
       if ($group_container) { $ObjParams | Add-Member -NotePropertyName groupcontainer -NotePropertyValue $group_container }
       if ($user_objectclass) { $ObjParams | Add-Member -NotePropertyName userobjectclass -NotePropertyValue $user_objectclass }
       if ($group_objectclass) { $ObjParams | Add-Member -NotePropertyName groupobjectclass -NotePropertyValue $group_objectclass }
       if ($user_ignore_objectclass) { $ObjParams | Add-Member -NotePropertyName userignoreobjectclass -NotePropertyValue $user_ignore_objectclass }
       if ($user_ignore_attribute) { $ObjParams | Add-Member -NotePropertyName userignoreattribute -NotePropertyValue $user_ignore_attribute }
       if ($group_ignore_objectclass) { $ObjParams | Add-Member -NotePropertyName groupignoreobjectclass -NotePropertyValue $group_ignore_objectclass }
       if ($group_ignore_attribute) { $ObjParams | Add-Member -NotePropertyName groupignoreattribute -NotePropertyValue $group_ignore_attribute }
       if ($group_overwrite_gid.IsPresent) { $ObjParams | Add-Member -NotePropertyName groupoverwritegid -NotePropertyValue $true }
       if ($schema) { $ObjParams | Add-Member -NotePropertyName schema -NotePropertyValue $schema }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }
       if ($base_dn) { $ObjParams | Add-Member -NotePropertyName basedn -NotePropertyValue $base_dn }
       if ($with_compat.IsPresent) { $ObjParams | Add-Member -NotePropertyName compat -NotePropertyValue $true }
       if ($ca_cert_file) { $ObjParams | Add-Member -NotePropertyName cacertfile -NotePropertyValue $ca_cert_file }
       if ($use_default_group.IsPresent) { $ObjParams | Add-Member -NotePropertyName use_def_group -NotePropertyValue $true }
       if ($scope) { $ObjParams | Add-Member -NotePropertyName scope -NotePropertyValue $scope }

       if ($exclude_groups) { $ObjParams | Add-Member -NotePropertyName exclude_groups -NotePropertyValue $exclude_groups }
       if ($exclude_users) { $ObjParams | Add-Member -NotePropertyName exclude_users -NotePropertyValue $exclude_users }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "migrate_ds/1"
                params  = @(@($ldap_uri,$password),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPInetgroup_add {
        <#
            .DESCRIPTION
       Add a new netgroup.
       .PARAMETER desc
       Netgroup description
       .PARAMETER nisdomain
       NIS domain name
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER externalhost
       External host
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Netgroup name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$nisdomain,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$externalhost,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($nisdomain) { $ObjParams | Add-Member -NotePropertyName nisdomainname -NotePropertyValue $nisdomain }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($externalhost) { $ObjParams | Add-Member -NotePropertyName externalhost -NotePropertyValue $externalhost }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "netgroup_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPInetgroup_add_member {
        <#
            .DESCRIPTION
       Add members to a netgroup.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER netgroups
       netgroups to add
       .PARAMETER name
       Netgroup name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$netgroups,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
       if ($netgroups) { $ObjParams | Add-Member -NotePropertyName netgroup -NotePropertyValue $netgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "netgroup_add_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPInetgroup_del {
        <#
            .DESCRIPTION
       Delete a netgroup.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Netgroup name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "netgroup_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPInetgroup_find {
        <#
            .DESCRIPTION
       Search for a netgroup.
       .PARAMETER name
       Netgroup name
       .PARAMETER desc
       Netgroup description
       .PARAMETER nisdomain
       NIS domain name
       .PARAMETER uuid
       IPA unique ID
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER externalhost
       External host
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER private
       <private>
       .PARAMETER managed
       search for managed groups
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER netgroups
       Search for netgroups with these member netgroups.
       .PARAMETER no_netgroups
       Search for netgroups without these member netgroups.
       .PARAMETER users
       Search for netgroups with these member users.
       .PARAMETER no_users
       Search for netgroups without these member users.
       .PARAMETER groups
       Search for netgroups with these member groups.
       .PARAMETER no_groups
       Search for netgroups without these member groups.
       .PARAMETER hosts
       Search for netgroups with these member hosts.
       .PARAMETER no_hosts
       Search for netgroups without these member hosts.
       .PARAMETER hostgroups
       Search for netgroups with these member host groups.
       .PARAMETER no_hostgroups
       Search for netgroups without these member host groups.
       .PARAMETER in_netgroups
       Search for netgroups with these member of netgroups.
       .PARAMETER not_in_netgroups
       Search for netgroups without these member of netgroups.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$nisdomain,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$uuid,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$externalhost,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$private,
               [parameter(Mandatory=$false)]
                    
                [switch]$managed,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$netgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$no_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$no_users,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$no_groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$no_hosts,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$no_hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$not_in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($nisdomain) { $ObjParams | Add-Member -NotePropertyName nisdomainname -NotePropertyValue $nisdomain }
       if ($uuid) { $ObjParams | Add-Member -NotePropertyName ipauniqueid -NotePropertyValue $uuid }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($externalhost) { $ObjParams | Add-Member -NotePropertyName externalhost -NotePropertyValue $externalhost }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($private.IsPresent) { $ObjParams | Add-Member -NotePropertyName private -NotePropertyValue $true }
       if ($managed.IsPresent) { $ObjParams | Add-Member -NotePropertyName managed -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($netgroups) { $ObjParams | Add-Member -NotePropertyName netgroup -NotePropertyValue $netgroups }
       if ($no_netgroups) { $ObjParams | Add-Member -NotePropertyName no_netgroup -NotePropertyValue $no_netgroups }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($no_users) { $ObjParams | Add-Member -NotePropertyName no_user -NotePropertyValue $no_users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($no_groups) { $ObjParams | Add-Member -NotePropertyName no_group -NotePropertyValue $no_groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($no_hosts) { $ObjParams | Add-Member -NotePropertyName no_host -NotePropertyValue $no_hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
       if ($no_hostgroups) { $ObjParams | Add-Member -NotePropertyName no_hostgroup -NotePropertyValue $no_hostgroups }
       if ($in_netgroups) { $ObjParams | Add-Member -NotePropertyName in_netgroup -NotePropertyValue $in_netgroups }
       if ($not_in_netgroups) { $ObjParams | Add-Member -NotePropertyName not_in_netgroup -NotePropertyValue $not_in_netgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "netgroup_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPInetgroup_mod {
        <#
            .DESCRIPTION
       Modify a netgroup.
       .PARAMETER desc
       Netgroup description
       .PARAMETER nisdomain
       NIS domain name
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER externalhost
       External host
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Netgroup name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$nisdomain,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$externalhost,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($nisdomain) { $ObjParams | Add-Member -NotePropertyName nisdomainname -NotePropertyValue $nisdomain }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($externalhost) { $ObjParams | Add-Member -NotePropertyName externalhost -NotePropertyValue $externalhost }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "netgroup_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPInetgroup_remove_member {
        <#
            .DESCRIPTION
       Remove members from a netgroup.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER netgroups
       netgroups to remove
       .PARAMETER name
       Netgroup name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$netgroups,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
       if ($netgroups) { $ObjParams | Add-Member -NotePropertyName netgroup -NotePropertyValue $netgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "netgroup_remove_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPInetgroup_show {
        <#
            .DESCRIPTION
       Display information about a netgroup.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Netgroup name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "netgroup_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIotpconfig_mod {
        <#
            .DESCRIPTION
       Modify OTP configuration options.
       .PARAMETER totp_auth_window
       TOTP authentication time variance (seconds)
       .PARAMETER totp_sync_window
       TOTP synchronization time variance (seconds)
       .PARAMETER hotp_auth_window
       HOTP authentication skip-ahead
       .PARAMETER hotp_sync_window
       HOTP synchronization skip-ahead
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$totp_auth_window,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$totp_sync_window,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$hotp_auth_window,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$hotp_sync_window,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($totp_auth_window) { $ObjParams | Add-Member -NotePropertyName ipatokentotpauthwindow -NotePropertyValue $totp_auth_window }
       if ($totp_sync_window) { $ObjParams | Add-Member -NotePropertyName ipatokentotpsyncwindow -NotePropertyValue $totp_sync_window }
       if ($hotp_auth_window) { $ObjParams | Add-Member -NotePropertyName ipatokenhotpauthwindow -NotePropertyValue $hotp_auth_window }
       if ($hotp_sync_window) { $ObjParams | Add-Member -NotePropertyName ipatokenhotpsyncwindow -NotePropertyValue $hotp_sync_window }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "otpconfig_mod/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIotpconfig_show {
        <#
            .DESCRIPTION
       Show the current OTP configuration.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "otpconfig_show/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIotptoken_add {
        <#
            .DESCRIPTION
       Add a new OTP token.
       .PARAMETER type
       Type of the token
       .PARAMETER desc
       Token description (informational only)
       .PARAMETER owner
       Assigned user of the token (default: self)
       .PARAMETER disabled
       Mark the token as disabled (default: false)
       .PARAMETER not_before
       First date/time the token can be used
       .PARAMETER not_after
       Last date/time the token can be used
       .PARAMETER vendor
       Token vendor name (informational only)
       .PARAMETER model
       Token model (informational only)
       .PARAMETER serial
       Token serial (informational only)
       .PARAMETER key
       Token secret (Base32; default: random)
       .PARAMETER algo
       Token hash algorithm
       .PARAMETER digits
       Number of digits each token code will have
       .PARAMETER offset
       TOTP token / FreeIPA server time difference
       .PARAMETER interval
       Length of TOTP token code validity
       .PARAMETER counter
       Initial counter for the HOTP token
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER qrcode
       (deprecated)
       .PARAMETER no_qrcode
       Do not display QR code
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER id
       Unique ID
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateSet("totp","hotp","TOTP","HOTP")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$owner,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$disabled,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$not_before,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$not_after,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$vendor,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$model,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$serial,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$key,
               [parameter(Mandatory=$false)]
                    [ValidateSet("sha1","sha256","sha384","sha512")]
                [String]$algo,
               [parameter(Mandatory=$false)]
                    [ValidateSet("6","8")]
                [String]$digits,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$offset,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$interval,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$counter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$qrcode,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_qrcode,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($owner) { $ObjParams | Add-Member -NotePropertyName ipatokenowner -NotePropertyValue $owner }
       if ($disabled.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipatokendisabled -NotePropertyValue $true }
       if ($not_before) { $ObjParams | Add-Member -NotePropertyName ipatokennotbefore -NotePropertyValue $not_before }
       if ($not_after) { $ObjParams | Add-Member -NotePropertyName ipatokennotafter -NotePropertyValue $not_after }
       if ($vendor) { $ObjParams | Add-Member -NotePropertyName ipatokenvendor -NotePropertyValue $vendor }
       if ($model) { $ObjParams | Add-Member -NotePropertyName ipatokenmodel -NotePropertyValue $model }
       if ($serial) { $ObjParams | Add-Member -NotePropertyName ipatokenserial -NotePropertyValue $serial }
       if ($key) { $ObjParams | Add-Member -NotePropertyName ipatokenotpkey -NotePropertyValue $key }
       if ($algo) { $ObjParams | Add-Member -NotePropertyName ipatokenotpalgorithm -NotePropertyValue $algo }
       if ($digits) { $ObjParams | Add-Member -NotePropertyName ipatokenotpdigits -NotePropertyValue $digits }
       if ($offset) { $ObjParams | Add-Member -NotePropertyName ipatokentotpclockoffset -NotePropertyValue $offset }
       if ($interval) { $ObjParams | Add-Member -NotePropertyName ipatokentotptimestep -NotePropertyValue $interval }
       if ($counter) { $ObjParams | Add-Member -NotePropertyName ipatokenhotpcounter -NotePropertyValue $counter }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($qrcode.IsPresent) { $ObjParams | Add-Member -NotePropertyName qrcode -NotePropertyValue $true }
       if ($no_qrcode.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_qrcode -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "otptoken_add/1"
                params  = @(@($id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIotptoken_add_managedby {
        <#
            .DESCRIPTION
       Add users that can manage this token.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER id
       Unique ID
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "otptoken_add_managedby/1"
                params  = @(@($id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIotptoken_del {
        <#
            .DESCRIPTION
       Delete an OTP token.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER id
       Unique ID
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "otptoken_del/1"
                params  = @(@($id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIotptoken_find {
        <#
            .DESCRIPTION
       Search for OTP token.
       .PARAMETER id
       Unique ID
       .PARAMETER type
       Type of the token
       .PARAMETER desc
       Token description (informational only)
       .PARAMETER owner
       Assigned user of the token (default: self)
       .PARAMETER disabled
       Mark the token as disabled (default: false)
       .PARAMETER not_before
       First date/time the token can be used
       .PARAMETER not_after
       Last date/time the token can be used
       .PARAMETER vendor
       Token vendor name (informational only)
       .PARAMETER model
       Token model (informational only)
       .PARAMETER serial
       Token serial (informational only)
       .PARAMETER algo
       Token hash algorithm
       .PARAMETER digits
       Number of digits each token code will have
       .PARAMETER offset
       TOTP token / FreeIPA server time difference
       .PARAMETER interval
       Length of TOTP token code validity
       .PARAMETER counter
       Initial counter for the HOTP token
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("id")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [ValidateSet("totp","hotp","TOTP","HOTP")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$owner,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$disabled,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$not_before,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$not_after,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$vendor,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$model,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$serial,
               [parameter(Mandatory=$false)]
                    [ValidateSet("sha1","sha256","sha384","sha512")]
                [String]$algo,
               [parameter(Mandatory=$false)]
                    [ValidateSet("6","8")]
                [String]$digits,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$offset,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$interval,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$counter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($id) { $ObjParams | Add-Member -NotePropertyName ipatokenuniqueid -NotePropertyValue $id }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($owner) { $ObjParams | Add-Member -NotePropertyName ipatokenowner -NotePropertyValue $owner }
       if ($disabled.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipatokendisabled -NotePropertyValue $true }
       if ($not_before) { $ObjParams | Add-Member -NotePropertyName ipatokennotbefore -NotePropertyValue $not_before }
       if ($not_after) { $ObjParams | Add-Member -NotePropertyName ipatokennotafter -NotePropertyValue $not_after }
       if ($vendor) { $ObjParams | Add-Member -NotePropertyName ipatokenvendor -NotePropertyValue $vendor }
       if ($model) { $ObjParams | Add-Member -NotePropertyName ipatokenmodel -NotePropertyValue $model }
       if ($serial) { $ObjParams | Add-Member -NotePropertyName ipatokenserial -NotePropertyValue $serial }
       if ($algo) { $ObjParams | Add-Member -NotePropertyName ipatokenotpalgorithm -NotePropertyValue $algo }
       if ($digits) { $ObjParams | Add-Member -NotePropertyName ipatokenotpdigits -NotePropertyValue $digits }
       if ($offset) { $ObjParams | Add-Member -NotePropertyName ipatokentotpclockoffset -NotePropertyValue $offset }
       if ($interval) { $ObjParams | Add-Member -NotePropertyName ipatokentotptimestep -NotePropertyValue $interval }
       if ($counter) { $ObjParams | Add-Member -NotePropertyName ipatokenhotpcounter -NotePropertyValue $counter }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "otptoken_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIotptoken_mod {
        <#
            .DESCRIPTION
       Modify a OTP token.
       .PARAMETER desc
       Token description (informational only)
       .PARAMETER owner
       Assigned user of the token (default: self)
       .PARAMETER disabled
       Mark the token as disabled (default: false)
       .PARAMETER not_before
       First date/time the token can be used
       .PARAMETER not_after
       Last date/time the token can be used
       .PARAMETER vendor
       Token vendor name (informational only)
       .PARAMETER model
       Token model (informational only)
       .PARAMETER serial
       Token serial (informational only)
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER rename
       Rename the OTP token object
       .PARAMETER id
       Unique ID
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$owner,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$disabled,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$not_before,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$not_after,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$vendor,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$model,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$serial,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($owner) { $ObjParams | Add-Member -NotePropertyName ipatokenowner -NotePropertyValue $owner }
       if ($disabled.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipatokendisabled -NotePropertyValue $true }
       if ($not_before) { $ObjParams | Add-Member -NotePropertyName ipatokennotbefore -NotePropertyValue $not_before }
       if ($not_after) { $ObjParams | Add-Member -NotePropertyName ipatokennotafter -NotePropertyValue $not_after }
       if ($vendor) { $ObjParams | Add-Member -NotePropertyName ipatokenvendor -NotePropertyValue $vendor }
       if ($model) { $ObjParams | Add-Member -NotePropertyName ipatokenmodel -NotePropertyValue $model }
       if ($serial) { $ObjParams | Add-Member -NotePropertyName ipatokenserial -NotePropertyValue $serial }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "otptoken_mod/1"
                params  = @(@($id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIotptoken_remove_managedby {
        <#
            .DESCRIPTION
       Remove users that can manage this token.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER id
       Unique ID
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "otptoken_remove_managedby/1"
                params  = @(@($id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIotptoken_show {
        <#
            .DESCRIPTION
       Display information about an OTP token.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER id
       Unique ID
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$id,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "otptoken_show/1"
                params  = @(@($id),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIoutput_find {
        <#
            .DESCRIPTION
       Search for command outputs.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER command
       Full name
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$command,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "output_find/1"
                params  = @(@($command,$criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIoutput_show {
        <#
            .DESCRIPTION
       Display information about a command output.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER command
       Full name
       .PARAMETER name
       Name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$command,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "output_show/1"
                params  = @(@($command,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIparam_find {
        <#
            .DESCRIPTION
       Search command parameters.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER metaobject
       Full name
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$metaobject,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "param_find/1"
                params  = @(@($metaobject,$criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIparam_show {
        <#
            .DESCRIPTION
       Display information about a command parameter.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER metaobject
       Full name
       .PARAMETER name
       Name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$metaobject,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "param_show/1"
                params  = @(@($metaobject,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpasswd {
        <#
            .DESCRIPTION
       Set a user's password.
       .PARAMETER otp
       One Time Password
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER user
       User name
       .PARAMETER password
       New Password
       .PARAMETER current_password
       Current Password
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$otp,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$current_password,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($otp) { $otp = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($otp)) }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($current_password) { $current_password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($current_password)) }
       if ($otp) { $ObjParams | Add-Member -NotePropertyName otp -NotePropertyValue $otp }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "passwd/1"
                params  = @(@($user,$password,$current_password),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpermission_add {
        <#
            .DESCRIPTION
       Add a new permission.
       .PARAMETER right
       Rights to grant (read, search, compare, write, add, delete, all)
       .PARAMETER attrs
       All attributes to which the permission applies
       .PARAMETER bindtype
       Bind rule type
       .PARAMETER subtree
       Subtree to apply permissions to
       .PARAMETER filter
       Extra target filter
       .PARAMETER rawfilter
       All target filters, including those implied by type and memberof
       .PARAMETER target
       Optional DN to apply the permission to (must be in the subtree, but may not yet exist)
       .PARAMETER targetto
       Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)
       .PARAMETER targetfrom
       Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)
       .PARAMETER memberof
       Target members of a group (sets memberOf targetfilter)
       .PARAMETER targetgroup
       User group to apply permissions to (sets target)
       .PARAMETER type
       Type of IPA object (sets subtree and objectClass targetfilter)
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Permission name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateSet("read","search","compare","write","add","delete","all")]
                [String[]]$right,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    [ValidateSet("permission","all","anonymous")]
                [String]$bindtype,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subtree,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$filter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rawfilter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$target,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetto,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetfrom,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$memberof,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetgroup,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9.]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($right) { $ObjParams | Add-Member -NotePropertyName ipapermright -NotePropertyValue $right }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($bindtype) { $ObjParams | Add-Member -NotePropertyName ipapermbindruletype -NotePropertyValue $bindtype }
       if ($subtree) { $ObjParams | Add-Member -NotePropertyName ipapermlocation -NotePropertyValue $subtree }
       if ($filter) { $ObjParams | Add-Member -NotePropertyName extratargetfilter -NotePropertyValue $filter }
       if ($rawfilter) { $ObjParams | Add-Member -NotePropertyName ipapermtargetfilter -NotePropertyValue $rawfilter }
       if ($target) { $ObjParams | Add-Member -NotePropertyName ipapermtarget -NotePropertyValue $target }
       if ($targetto) { $ObjParams | Add-Member -NotePropertyName ipapermtargetto -NotePropertyValue $targetto }
       if ($targetfrom) { $ObjParams | Add-Member -NotePropertyName ipapermtargetfrom -NotePropertyValue $targetfrom }
       if ($memberof) { $ObjParams | Add-Member -NotePropertyName memberof -NotePropertyValue $memberof }
       if ($targetgroup) { $ObjParams | Add-Member -NotePropertyName targetgroup -NotePropertyValue $targetgroup }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($filter) { $ObjParams | Add-Member -NotePropertyName filter -NotePropertyValue $filter }
       if ($subtree) { $ObjParams | Add-Member -NotePropertyName subtree -NotePropertyValue $subtree }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "permission_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpermission_add_member {
        <#
            .DESCRIPTION
       Add members to a permission.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER privileges
       privileges to add
       .PARAMETER name
       Permission name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$privileges,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9.:/]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($privileges) { $ObjParams | Add-Member -NotePropertyName privilege -NotePropertyValue $privileges }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "permission_add_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpermission_add_noaci {
        <#
            .DESCRIPTION
       Add a system permission without an ACI (internal command)
       .PARAMETER ipapermissiontype
       Permission flags
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Permission name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$ipapermissiontype,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9.:/]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($ipapermissiontype) { $ObjParams | Add-Member -NotePropertyName ipapermissiontype -NotePropertyValue $ipapermissiontype }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "permission_add_noaci/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpermission_del {
        <#
            .DESCRIPTION
       Delete a permission.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER force
       force delete of SYSTEM permissions
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Permission name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    
                [switch]$force,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9.:/]+$")]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }
       if ($force.IsPresent) { $ObjParams | Add-Member -NotePropertyName force -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "permission_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpermission_find {
        <#
            .DESCRIPTION
       Search for permissions.
       .PARAMETER name
       Permission name
       .PARAMETER right
       Rights to grant (read, search, compare, write, add, delete, all)
       .PARAMETER attrs
       All attributes to which the permission applies
       .PARAMETER includedattrs
       User-specified attributes to which the permission applies
       .PARAMETER excludedattrs
       User-specified attributes to which the permission explicitly does not apply
       .PARAMETER defaultattrs
       Attributes to which the permission applies by default
       .PARAMETER bindtype
       Bind rule type
       .PARAMETER subtree
       Subtree to apply permissions to
       .PARAMETER filter
       Extra target filter
       .PARAMETER rawfilter
       All target filters, including those implied by type and memberof
       .PARAMETER target
       Optional DN to apply the permission to (must be in the subtree, but may not yet exist)
       .PARAMETER targetto
       Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)
       .PARAMETER targetfrom
       Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)
       .PARAMETER memberof
       Target members of a group (sets memberOf targetfilter)
       .PARAMETER targetgroup
       User group to apply permissions to (sets target)
       .PARAMETER type
       Type of IPA object (sets subtree and objectClass targetfilter)
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[-_ a-zA-Z0-9.:/]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateSet("read","search","compare","write","add","delete","all")]
                [String[]]$right,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$includedattrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$excludedattrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$defaultattrs,
               [parameter(Mandatory=$false)]
                    [ValidateSet("permission","all","anonymous")]
                [String]$bindtype,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subtree,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$filter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rawfilter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$target,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetto,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetfrom,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$memberof,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetgroup,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($right) { $ObjParams | Add-Member -NotePropertyName ipapermright -NotePropertyValue $right }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($includedattrs) { $ObjParams | Add-Member -NotePropertyName ipapermincludedattr -NotePropertyValue $includedattrs }
       if ($excludedattrs) { $ObjParams | Add-Member -NotePropertyName ipapermexcludedattr -NotePropertyValue $excludedattrs }
       if ($defaultattrs) { $ObjParams | Add-Member -NotePropertyName ipapermdefaultattr -NotePropertyValue $defaultattrs }
       if ($bindtype) { $ObjParams | Add-Member -NotePropertyName ipapermbindruletype -NotePropertyValue $bindtype }
       if ($subtree) { $ObjParams | Add-Member -NotePropertyName ipapermlocation -NotePropertyValue $subtree }
       if ($filter) { $ObjParams | Add-Member -NotePropertyName extratargetfilter -NotePropertyValue $filter }
       if ($rawfilter) { $ObjParams | Add-Member -NotePropertyName ipapermtargetfilter -NotePropertyValue $rawfilter }
       if ($target) { $ObjParams | Add-Member -NotePropertyName ipapermtarget -NotePropertyValue $target }
       if ($targetto) { $ObjParams | Add-Member -NotePropertyName ipapermtargetto -NotePropertyValue $targetto }
       if ($targetfrom) { $ObjParams | Add-Member -NotePropertyName ipapermtargetfrom -NotePropertyValue $targetfrom }
       if ($memberof) { $ObjParams | Add-Member -NotePropertyName memberof -NotePropertyValue $memberof }
       if ($targetgroup) { $ObjParams | Add-Member -NotePropertyName targetgroup -NotePropertyValue $targetgroup }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($filter) { $ObjParams | Add-Member -NotePropertyName filter -NotePropertyValue $filter }
       if ($subtree) { $ObjParams | Add-Member -NotePropertyName subtree -NotePropertyValue $subtree }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "permission_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpermission_mod {
        <#
            .DESCRIPTION
       Modify a permission.
       .PARAMETER right
       Rights to grant (read, search, compare, write, add, delete, all)
       .PARAMETER attrs
       All attributes to which the permission applies
       .PARAMETER includedattrs
       User-specified attributes to which the permission applies
       .PARAMETER excludedattrs
       User-specified attributes to which the permission explicitly does not apply
       .PARAMETER bindtype
       Bind rule type
       .PARAMETER subtree
       Subtree to apply permissions to
       .PARAMETER filter
       Extra target filter
       .PARAMETER rawfilter
       All target filters, including those implied by type and memberof
       .PARAMETER target
       Optional DN to apply the permission to (must be in the subtree, but may not yet exist)
       .PARAMETER targetto
       Optional DN subtree where an entry can be moved to (must be in the subtree, but may not yet exist)
       .PARAMETER targetfrom
       Optional DN subtree from where an entry can be moved (must be in the subtree, but may not yet exist)
       .PARAMETER memberof
       Target members of a group (sets memberOf targetfilter)
       .PARAMETER targetgroup
       User group to apply permissions to (sets target)
       .PARAMETER type
       Type of IPA object (sets subtree and objectClass targetfilter)
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER rename
       Rename the permission object
       .PARAMETER name
       Permission name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateSet("read","search","compare","write","add","delete","all")]
                [String[]]$right,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$includedattrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$excludedattrs,
               [parameter(Mandatory=$false)]
                    [ValidateSet("permission","all","anonymous")]
                [String]$bindtype,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subtree,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$filter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$rawfilter,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$target,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetto,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetfrom,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$memberof,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$targetgroup,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[-_ a-zA-Z0-9.]+$")]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9.:/]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($right) { $ObjParams | Add-Member -NotePropertyName ipapermright -NotePropertyValue $right }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($includedattrs) { $ObjParams | Add-Member -NotePropertyName ipapermincludedattr -NotePropertyValue $includedattrs }
       if ($excludedattrs) { $ObjParams | Add-Member -NotePropertyName ipapermexcludedattr -NotePropertyValue $excludedattrs }
       if ($bindtype) { $ObjParams | Add-Member -NotePropertyName ipapermbindruletype -NotePropertyValue $bindtype }
       if ($subtree) { $ObjParams | Add-Member -NotePropertyName ipapermlocation -NotePropertyValue $subtree }
       if ($filter) { $ObjParams | Add-Member -NotePropertyName extratargetfilter -NotePropertyValue $filter }
       if ($rawfilter) { $ObjParams | Add-Member -NotePropertyName ipapermtargetfilter -NotePropertyValue $rawfilter }
       if ($target) { $ObjParams | Add-Member -NotePropertyName ipapermtarget -NotePropertyValue $target }
       if ($targetto) { $ObjParams | Add-Member -NotePropertyName ipapermtargetto -NotePropertyValue $targetto }
       if ($targetfrom) { $ObjParams | Add-Member -NotePropertyName ipapermtargetfrom -NotePropertyValue $targetfrom }
       if ($memberof) { $ObjParams | Add-Member -NotePropertyName memberof -NotePropertyValue $memberof }
       if ($targetgroup) { $ObjParams | Add-Member -NotePropertyName targetgroup -NotePropertyValue $targetgroup }
       if ($type) { $ObjParams | Add-Member -NotePropertyName type -NotePropertyValue $type }
       if ($filter) { $ObjParams | Add-Member -NotePropertyName filter -NotePropertyValue $filter }
       if ($subtree) { $ObjParams | Add-Member -NotePropertyName subtree -NotePropertyValue $subtree }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "permission_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpermission_remove_member {
        <#
            .DESCRIPTION
       Remove members from a permission.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER privileges
       privileges to remove
       .PARAMETER name
       Permission name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$privileges,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9.:/]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($privileges) { $ObjParams | Add-Member -NotePropertyName privilege -NotePropertyValue $privileges }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "permission_remove_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpermission_show {
        <#
            .DESCRIPTION
       Display information about a permission.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Permission name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9.:/]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "permission_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIping {
        <#
            .DESCRIPTION
       Ping a remote server.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "ping/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpkinit_status {
        <#
            .DESCRIPTION
       Report PKINIT status on the IPA masters
       .PARAMETER server
       IPA server hostname
       .PARAMETER status
       Whether PKINIT is enabled or disabled
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$server,
               [parameter(Mandatory=$false)]
                    [ValidateSet("enabled","disabled")]
                [String]$status,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($server) { $ObjParams | Add-Member -NotePropertyName server_server -NotePropertyValue $server }
       if ($status) { $ObjParams | Add-Member -NotePropertyName status -NotePropertyValue $status }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "pkinit_status/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIplugins {
        <#
            .DESCRIPTION
       Show all loaded plugins.
       .PARAMETER server
       Forward to server instead of running locally
       .PARAMETER all
       retrieve and print all attributes from the server. Affects command output.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$server,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($server.IsPresent) { $ObjParams | Add-Member -NotePropertyName server -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "plugins/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIprivilege_add {
        <#
            .DESCRIPTION
       Add a new privilege.
       .PARAMETER desc
       Privilege description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Privilege name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "privilege_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIprivilege_add_member {
        <#
            .DESCRIPTION
       Add members to a privilege.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER roles
       roles to add
       .PARAMETER name
       Privilege name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$roles,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($roles) { $ObjParams | Add-Member -NotePropertyName role -NotePropertyValue $roles }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "privilege_add_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIprivilege_add_permission {
        <#
            .DESCRIPTION
       Add permissions to a privilege.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER permissions
       permissions
       .PARAMETER name
       Privilege name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permission -NotePropertyValue $permissions }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "privilege_add_permission/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIprivilege_del {
        <#
            .DESCRIPTION
       Delete a privilege.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Privilege name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "privilege_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIprivilege_find {
        <#
            .DESCRIPTION
       Search for privileges.
       .PARAMETER name
       Privilege name
       .PARAMETER desc
       Privilege description
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "privilege_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIprivilege_mod {
        <#
            .DESCRIPTION
       Modify a privilege.
       .PARAMETER desc
       Privilege description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER rename
       Rename the privilege object
       .PARAMETER name
       Privilege name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "privilege_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIprivilege_remove_member {
        <#
            .DESCRIPTION
       
    Remove members from a privilege
     
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER roles
       roles to remove
       .PARAMETER name
       Privilege name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$roles,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($roles) { $ObjParams | Add-Member -NotePropertyName role -NotePropertyValue $roles }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "privilege_remove_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIprivilege_remove_permission {
        <#
            .DESCRIPTION
       Remove permissions from a privilege.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER permissions
       permissions
       .PARAMETER name
       Privilege name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permission -NotePropertyValue $permissions }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "privilege_remove_permission/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIprivilege_show {
        <#
            .DESCRIPTION
       Display information about a privilege.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Privilege name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "privilege_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpwpolicy_add {
        <#
            .DESCRIPTION
       Add a new group password policy.
       .PARAMETER maxlife
       Maximum password lifetime (in days)
       .PARAMETER minlife
       Minimum password lifetime (in hours)
       .PARAMETER history
       Password history size
       .PARAMETER minclasses
       Minimum number of character classes
       .PARAMETER minlength
       Minimum length of password
       .PARAMETER priority
       Priority of the policy (higher number means lower priority
       .PARAMETER maxfail
       Consecutive failures before lockout
       .PARAMETER failinterval
       Period after which failure count will be reset (seconds)
       .PARAMETER lockouttime
       Period for which lockout is enforced (seconds)
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER group
       Manage password policy for specific group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$maxlife,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minlife,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$history,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minclasses,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minlength,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [int]$priority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$maxfail,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$failinterval,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$lockouttime,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($maxlife) { $ObjParams | Add-Member -NotePropertyName krbmaxpwdlife -NotePropertyValue $maxlife }
       if ($minlife) { $ObjParams | Add-Member -NotePropertyName krbminpwdlife -NotePropertyValue $minlife }
       if ($history) { $ObjParams | Add-Member -NotePropertyName krbpwdhistorylength -NotePropertyValue $history }
       if ($minclasses) { $ObjParams | Add-Member -NotePropertyName krbpwdmindiffchars -NotePropertyValue $minclasses }
       if ($minlength) { $ObjParams | Add-Member -NotePropertyName krbpwdminlength -NotePropertyValue $minlength }
       if ($priority) { $ObjParams | Add-Member -NotePropertyName cospriority -NotePropertyValue $priority }
       if ($maxfail) { $ObjParams | Add-Member -NotePropertyName krbpwdmaxfailure -NotePropertyValue $maxfail }
       if ($failinterval) { $ObjParams | Add-Member -NotePropertyName krbpwdfailurecountinterval -NotePropertyValue $failinterval }
       if ($lockouttime) { $ObjParams | Add-Member -NotePropertyName krbpwdlockoutduration -NotePropertyValue $lockouttime }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "pwpolicy_add/1"
                params  = @(@($group),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpwpolicy_del {
        <#
            .DESCRIPTION
       Delete a group password policy.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER group
       Manage password policy for specific group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$group,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "pwpolicy_del/1"
                params  = @(@($group),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpwpolicy_find {
        <#
            .DESCRIPTION
       Search for group password policies.
       .PARAMETER group
       Manage password policy for specific group
       .PARAMETER maxlife
       Maximum password lifetime (in days)
       .PARAMETER minlife
       Minimum password lifetime (in hours)
       .PARAMETER history
       Password history size
       .PARAMETER minclasses
       Minimum number of character classes
       .PARAMETER minlength
       Minimum length of password
       .PARAMETER priority
       Priority of the policy (higher number means lower priority
       .PARAMETER maxfail
       Consecutive failures before lockout
       .PARAMETER failinterval
       Period after which failure count will be reset (seconds)
       .PARAMETER lockouttime
       Period for which lockout is enforced (seconds)
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("group")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$maxlife,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minlife,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$history,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minclasses,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minlength,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$priority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$maxfail,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$failinterval,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$lockouttime,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($group) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $group }
       if ($maxlife) { $ObjParams | Add-Member -NotePropertyName krbmaxpwdlife -NotePropertyValue $maxlife }
       if ($minlife) { $ObjParams | Add-Member -NotePropertyName krbminpwdlife -NotePropertyValue $minlife }
       if ($history) { $ObjParams | Add-Member -NotePropertyName krbpwdhistorylength -NotePropertyValue $history }
       if ($minclasses) { $ObjParams | Add-Member -NotePropertyName krbpwdmindiffchars -NotePropertyValue $minclasses }
       if ($minlength) { $ObjParams | Add-Member -NotePropertyName krbpwdminlength -NotePropertyValue $minlength }
       if ($priority) { $ObjParams | Add-Member -NotePropertyName cospriority -NotePropertyValue $priority }
       if ($maxfail) { $ObjParams | Add-Member -NotePropertyName krbpwdmaxfailure -NotePropertyValue $maxfail }
       if ($failinterval) { $ObjParams | Add-Member -NotePropertyName krbpwdfailurecountinterval -NotePropertyValue $failinterval }
       if ($lockouttime) { $ObjParams | Add-Member -NotePropertyName krbpwdlockoutduration -NotePropertyValue $lockouttime }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "pwpolicy_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpwpolicy_mod {
        <#
            .DESCRIPTION
       Modify a group password policy.
       .PARAMETER maxlife
       Maximum password lifetime (in days)
       .PARAMETER minlife
       Minimum password lifetime (in hours)
       .PARAMETER history
       Password history size
       .PARAMETER minclasses
       Minimum number of character classes
       .PARAMETER minlength
       Minimum length of password
       .PARAMETER priority
       Priority of the policy (higher number means lower priority
       .PARAMETER maxfail
       Consecutive failures before lockout
       .PARAMETER failinterval
       Period after which failure count will be reset (seconds)
       .PARAMETER lockouttime
       Period for which lockout is enforced (seconds)
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER group
       Manage password policy for specific group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$maxlife,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minlife,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$history,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minclasses,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minlength,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$priority,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$maxfail,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$failinterval,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$lockouttime,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($maxlife) { $ObjParams | Add-Member -NotePropertyName krbmaxpwdlife -NotePropertyValue $maxlife }
       if ($minlife) { $ObjParams | Add-Member -NotePropertyName krbminpwdlife -NotePropertyValue $minlife }
       if ($history) { $ObjParams | Add-Member -NotePropertyName krbpwdhistorylength -NotePropertyValue $history }
       if ($minclasses) { $ObjParams | Add-Member -NotePropertyName krbpwdmindiffchars -NotePropertyValue $minclasses }
       if ($minlength) { $ObjParams | Add-Member -NotePropertyName krbpwdminlength -NotePropertyValue $minlength }
       if ($priority) { $ObjParams | Add-Member -NotePropertyName cospriority -NotePropertyValue $priority }
       if ($maxfail) { $ObjParams | Add-Member -NotePropertyName krbpwdmaxfailure -NotePropertyValue $maxfail }
       if ($failinterval) { $ObjParams | Add-Member -NotePropertyName krbpwdfailurecountinterval -NotePropertyValue $failinterval }
       if ($lockouttime) { $ObjParams | Add-Member -NotePropertyName krbpwdlockoutduration -NotePropertyValue $lockouttime }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "pwpolicy_mod/1"
                params  = @(@($group),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIpwpolicy_show {
        <#
            .DESCRIPTION
       Display information about password policy.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER user
       Display effective policy for a specific user
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER group
       Manage password policy for specific group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$group,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "pwpolicy_show/1"
                params  = @(@($group),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIradiusproxy_add {
        <#
            .DESCRIPTION
       Add a new RADIUS proxy server.
       .PARAMETER desc
       A description of this RADIUS proxy server
       .PARAMETER server
       The hostname or IP (with or without port)
       .PARAMETER secret
       The secret used to encrypt data
       .PARAMETER timeout
       The total timeout across all retries (in seconds)
       .PARAMETER retries
       The number of times to retry authentication
       .PARAMETER userattr
       The username attribute on the user object
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       RADIUS proxy server name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$server,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$secret,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timeout,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$retries,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$userattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($secret) { $secret = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($secret)) }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($server) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusserver -NotePropertyValue $server }
       if ($secret) { $ObjParams | Add-Member -NotePropertyName ipatokenradiussecret -NotePropertyValue $secret }
       if ($timeout) { $ObjParams | Add-Member -NotePropertyName ipatokenradiustimeout -NotePropertyValue $timeout }
       if ($retries) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusretries -NotePropertyValue $retries }
       if ($userattr) { $ObjParams | Add-Member -NotePropertyName ipatokenusermapattribute -NotePropertyValue $userattr }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "radiusproxy_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIradiusproxy_del {
        <#
            .DESCRIPTION
       Delete a RADIUS proxy server.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       RADIUS proxy server name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "radiusproxy_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIradiusproxy_find {
        <#
            .DESCRIPTION
       Search for RADIUS proxy servers.
       .PARAMETER name
       RADIUS proxy server name
       .PARAMETER desc
       A description of this RADIUS proxy server
       .PARAMETER server
       The hostname or IP (with or without port)
       .PARAMETER secret
       The secret used to encrypt data
       .PARAMETER timeout
       The total timeout across all retries (in seconds)
       .PARAMETER retries
       The number of times to retry authentication
       .PARAMETER userattr
       The username attribute on the user object
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$server,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$secret,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timeout,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$retries,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$userattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($secret) { $secret = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($secret)) }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($server) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusserver -NotePropertyValue $server }
       if ($secret) { $ObjParams | Add-Member -NotePropertyName ipatokenradiussecret -NotePropertyValue $secret }
       if ($timeout) { $ObjParams | Add-Member -NotePropertyName ipatokenradiustimeout -NotePropertyValue $timeout }
       if ($retries) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusretries -NotePropertyValue $retries }
       if ($userattr) { $ObjParams | Add-Member -NotePropertyName ipatokenusermapattribute -NotePropertyValue $userattr }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "radiusproxy_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIradiusproxy_mod {
        <#
            .DESCRIPTION
       Modify a RADIUS proxy server.
       .PARAMETER desc
       A description of this RADIUS proxy server
       .PARAMETER server
       The hostname or IP (with or without port)
       .PARAMETER secret
       The secret used to encrypt data
       .PARAMETER timeout
       The total timeout across all retries (in seconds)
       .PARAMETER retries
       The number of times to retry authentication
       .PARAMETER userattr
       The username attribute on the user object
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER rename
       Rename the RADIUS proxy server object
       .PARAMETER name
       RADIUS proxy server name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$server,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$secret,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timeout,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$retries,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$userattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($secret) { $secret = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($secret)) }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($server) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusserver -NotePropertyValue $server }
       if ($secret) { $ObjParams | Add-Member -NotePropertyName ipatokenradiussecret -NotePropertyValue $secret }
       if ($timeout) { $ObjParams | Add-Member -NotePropertyName ipatokenradiustimeout -NotePropertyValue $timeout }
       if ($retries) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusretries -NotePropertyValue $retries }
       if ($userattr) { $ObjParams | Add-Member -NotePropertyName ipatokenusermapattribute -NotePropertyValue $userattr }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "radiusproxy_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIradiusproxy_show {
        <#
            .DESCRIPTION
       Display information about a RADIUS proxy server.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       RADIUS proxy server name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "radiusproxy_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrealmdomains_mod {
        <#
            .DESCRIPTION
       
    Modify realm domains

    DNS check: When manually adding a domain to the list, a DNS check is
    performed by default. It ensures that the domain is associated with
    the IPA realm, by checking whether the domain has a _kerberos TXT record
    containing the IPA realm name. This check can be skipped by specifying
    -force option.

    Removal: when a realm domain which has a matching DNS zone managed by
    IPA is being removed, a corresponding _kerberos TXT record in the zone is
    removed automatically as well. Other records in the zone or the zone
    itself are not affected.
     
       .PARAMETER domain
       Domain
       .PARAMETER add_domain
       Add domain
       .PARAMETER del_domain
       Delete domain
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER force
       Force adding domain even if not in DNS
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$domain,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$add_domain,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$del_domain,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$force,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($domain) { $ObjParams | Add-Member -NotePropertyName associateddomain -NotePropertyValue $domain }
       if ($add_domain) { $ObjParams | Add-Member -NotePropertyName add_domain -NotePropertyValue $add_domain }
       if ($del_domain) { $ObjParams | Add-Member -NotePropertyName del_domain -NotePropertyValue $del_domain }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($force.IsPresent) { $ObjParams | Add-Member -NotePropertyName force -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "realmdomains_mod/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrealmdomains_show {
        <#
            .DESCRIPTION
       Display the list of realm domains.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "realmdomains_show/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrole_add {
        <#
            .DESCRIPTION
       Add a new role.
       .PARAMETER desc
       A description of this role-group
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Role name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "role_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrole_add_member {
        <#
            .DESCRIPTION
       Add members to a role.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER services
       services to add
       .PARAMETER name
       Role name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
       if ($services) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "role_add_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrole_add_privilege {
        <#
            .DESCRIPTION
       Add privileges to a role.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER privileges
       privileges
       .PARAMETER name
       Role name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$privileges,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($privileges) { $ObjParams | Add-Member -NotePropertyName privilege -NotePropertyValue $privileges }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "role_add_privilege/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrole_del {
        <#
            .DESCRIPTION
       Delete a role.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Role name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "role_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrole_find {
        <#
            .DESCRIPTION
       Search for roles.
       .PARAMETER name
       Role name
       .PARAMETER desc
       A description of this role-group
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "role_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrole_mod {
        <#
            .DESCRIPTION
       Modify a role.
       .PARAMETER desc
       A description of this role-group
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER rename
       Rename the role object
       .PARAMETER name
       Role name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "role_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrole_remove_member {
        <#
            .DESCRIPTION
       Remove members from a role.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER services
       services to remove
       .PARAMETER name
       Role name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
       if ($services) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "role_remove_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrole_remove_privilege {
        <#
            .DESCRIPTION
       Remove privileges from a role.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER privileges
       privileges
       .PARAMETER name
       Role name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$privileges,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($privileges) { $ObjParams | Add-Member -NotePropertyName privilege -NotePropertyValue $privileges }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "role_remove_privilege/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIrole_show {
        <#
            .DESCRIPTION
       Display information about a role.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Role name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "role_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIschema {
        <#
            .DESCRIPTION
       .PARAMETER known_fingerprints
       Fingerprint of schema cached by client
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$known_fingerprints,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($known_fingerprints) { $ObjParams | Add-Member -NotePropertyName known_fingerprints -NotePropertyValue $known_fingerprints }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "schema/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselfservice_add {
        <#
            .DESCRIPTION
       Add a new self-service permission.
       .PARAMETER permissions
       Permissions to grant (read, write). Default is write.
       .PARAMETER attrs
       Attributes to which the permission applies.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Self-service name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selfservice_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselfservice_del {
        <#
            .DESCRIPTION
       Delete a self-service permission.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Self-service name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selfservice_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselfservice_find {
        <#
            .DESCRIPTION
       Search for a self-service permission.
       .PARAMETER name
       Self-service name
       .PARAMETER permissions
       Permissions to grant (read, write). Default is write.
       .PARAMETER attrs
       Attributes to which the permission applies.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[-_ a-zA-Z0-9]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName aciname -NotePropertyValue $name }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selfservice_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselfservice_mod {
        <#
            .DESCRIPTION
       Modify a self-service permission.
       .PARAMETER permissions
       Permissions to grant (read, write). Default is write.
       .PARAMETER attrs
       Attributes to which the permission applies.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Self-service name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$permissions,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$attrs,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($permissions) { $ObjParams | Add-Member -NotePropertyName permissions -NotePropertyValue $permissions }
       if ($attrs) { $ObjParams | Add-Member -NotePropertyName attrs -NotePropertyValue $attrs }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selfservice_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselfservice_show {
        <#
            .DESCRIPTION
       Display information about a self-service permission.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Self-service name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[-_ a-zA-Z0-9]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selfservice_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_add {
        <#
            .DESCRIPTION
       Create a new SELinux User Map.
       .PARAMETER selinuxuser
       SELinux User
       .PARAMETER hbacrule
       HBAC Rule that defines the users, groups and hostgroups
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$selinuxuser,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$hbacrule,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($selinuxuser) { $ObjParams | Add-Member -NotePropertyName ipaselinuxuser -NotePropertyValue $selinuxuser }
       if ($hbacrule) { $ObjParams | Add-Member -NotePropertyName seealso -NotePropertyValue $hbacrule }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_add_host {
        <#
            .DESCRIPTION
       Add target hosts and hostgroups to an SELinux User Map rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_add_host/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_add_user {
        <#
            .DESCRIPTION
       Add users and groups to an SELinux User Map rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_add_user/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_del {
        <#
            .DESCRIPTION
       Delete a SELinux User Map.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_disable {
        <#
            .DESCRIPTION
       Disable an SELinux User Map rule.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_disable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_enable {
        <#
            .DESCRIPTION
       Enable an SELinux User Map rule.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_enable/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_find {
        <#
            .DESCRIPTION
       Search for SELinux User Maps.
       .PARAMETER name
       Rule name
       .PARAMETER selinuxuser
       SELinux User
       .PARAMETER hbacrule
       HBAC Rule that defines the users, groups and hostgroups
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$selinuxuser,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$hbacrule,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($selinuxuser) { $ObjParams | Add-Member -NotePropertyName ipaselinuxuser -NotePropertyValue $selinuxuser }
       if ($hbacrule) { $ObjParams | Add-Member -NotePropertyName seealso -NotePropertyValue $hbacrule }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_mod {
        <#
            .DESCRIPTION
       Modify a SELinux User Map.
       .PARAMETER selinuxuser
       SELinux User
       .PARAMETER hbacrule
       HBAC Rule that defines the users, groups and hostgroups
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$selinuxuser,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$hbacrule,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($selinuxuser) { $ObjParams | Add-Member -NotePropertyName ipaselinuxuser -NotePropertyValue $selinuxuser }
       if ($hbacrule) { $ObjParams | Add-Member -NotePropertyName seealso -NotePropertyValue $hbacrule }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_remove_host {
        <#
            .DESCRIPTION
       Remove target hosts and hostgroups from an SELinux User Map rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_remove_host/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_remove_user {
        <#
            .DESCRIPTION
       Remove users and groups from an SELinux User Map rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_remove_user/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIselinuxusermap_show {
        <#
            .DESCRIPTION
       Display the properties of a SELinux User Map rule.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "selinuxusermap_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIserver_conncheck {
        <#
            .DESCRIPTION
       Check connection to remote IPA server.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       IPA server hostname
       .PARAMETER remote_name
       Remote IPA server hostname
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$remote_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "server_conncheck/1"
                params  = @(@($name,$remote_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIserver_del {
        <#
            .DESCRIPTION
       Delete IPA server.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER ignore_topology_disconnect
       Ignore topology connectivity problems after removal
       .PARAMETER ignore_last_of_role
       Skip a check whether the last CA master or DNS server is removed
       .PARAMETER force
       Force server removal even if it does not exist
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       IPA server hostname
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    
                [switch]$ignore_topology_disconnect,
               [parameter(Mandatory=$false)]
                    
                [switch]$ignore_last_of_role,
               [parameter(Mandatory=$false)]
                    
                [switch]$force,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }
       if ($ignore_topology_disconnect.IsPresent) { $ObjParams | Add-Member -NotePropertyName ignore_topology_disconnect -NotePropertyValue $true }
       if ($ignore_last_of_role.IsPresent) { $ObjParams | Add-Member -NotePropertyName ignore_last_of_role -NotePropertyValue $true }
       if ($force.IsPresent) { $ObjParams | Add-Member -NotePropertyName force -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "server_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIserver_find {
        <#
            .DESCRIPTION
       Search for IPA servers.
       .PARAMETER name
       IPA server hostname
       .PARAMETER minlevel
       Minimum domain level
       .PARAMETER maxlevel
       Maximum domain level
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER topologysuffixes
       Search for servers with these managed suffixes.
       .PARAMETER no_topologysuffixes
       Search for servers without these managed suffixes.
       .PARAMETER in_locations
       Search for servers with these ipa locations.
       .PARAMETER not_in_locations
       Search for servers without these ipa locations.
       .PARAMETER servroles
       Search for servers with these enabled roles.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$minlevel,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$maxlevel,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$topologysuffixes,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$no_topologysuffixes,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_locations,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_locations,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$servroles,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($minlevel) { $ObjParams | Add-Member -NotePropertyName ipamindomainlevel -NotePropertyValue $minlevel }
       if ($maxlevel) { $ObjParams | Add-Member -NotePropertyName ipamaxdomainlevel -NotePropertyValue $maxlevel }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($topologysuffixes) { $ObjParams | Add-Member -NotePropertyName topologysuffix -NotePropertyValue $topologysuffixes }
       if ($no_topologysuffixes) { $ObjParams | Add-Member -NotePropertyName no_topologysuffix -NotePropertyValue $no_topologysuffixes }
       if ($in_locations) { $ObjParams | Add-Member -NotePropertyName in_location -NotePropertyValue $in_locations }
       if ($not_in_locations) { $ObjParams | Add-Member -NotePropertyName not_in_location -NotePropertyValue $not_in_locations }
       if ($servroles) { $ObjParams | Add-Member -NotePropertyName servrole -NotePropertyValue $servroles }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "server_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIserver_mod {
        <#
            .DESCRIPTION
       Modify information about an IPA server.
       .PARAMETER location
       Server location
       .PARAMETER service_weight
       Weight for server services
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       IPA server hostname
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$location,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$service_weight,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($location) { $ObjParams | Add-Member -NotePropertyName ipalocation_location -NotePropertyValue $location }
       if ($service_weight) { $ObjParams | Add-Member -NotePropertyName ipaserviceweight -NotePropertyValue $service_weight }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "server_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIserver_role_find {
        <#
            .DESCRIPTION
       Find a server role on a server(s)
       .PARAMETER server
       IPA server hostname
       .PARAMETER role
       IPA server role name
       .PARAMETER status
       Status of the role
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$server,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$role,
               [parameter(Mandatory=$false)]
                    [ValidateSet("enabled","configured","absent")]
                [String]$status,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($server) { $ObjParams | Add-Member -NotePropertyName server_server -NotePropertyValue $server }
       if ($role) { $ObjParams | Add-Member -NotePropertyName role_servrole -NotePropertyValue $role }
       if ($status) { $ObjParams | Add-Member -NotePropertyName status -NotePropertyValue $status }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "server_role_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIserver_role_show {
        <#
            .DESCRIPTION
       Show role status on a server
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER server
       IPA server hostname
       .PARAMETER role
       IPA server role name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$server,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$role,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "server_role_show/1"
                params  = @(@($server,$role),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIserver_show {
        <#
            .DESCRIPTION
       Show IPA server.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       IPA server hostname
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "server_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationrule_add {
        <#
            .DESCRIPTION
       Create a new service delegation rule.
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationrule_add/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationrule_add_member {
        <#
            .DESCRIPTION
       Add member to a named service delegation rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER principals
       principal to add
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principals,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($principals) { $ObjParams | Add-Member -NotePropertyName principal -NotePropertyValue $principals }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationrule_add_member/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationrule_add_target {
        <#
            .DESCRIPTION
       Add target to a named service delegation rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER servicedelegationtargets
       service delegation targets to add
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$servicedelegationtargets,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($servicedelegationtargets) { $ObjParams | Add-Member -NotePropertyName servicedelegationtarget -NotePropertyValue $servicedelegationtargets }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationrule_add_target/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationrule_del {
        <#
            .DESCRIPTION
       Delete service delegation.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String[]]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationrule_del/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationrule_find {
        <#
            .DESCRIPTION
       Search for service delegations rule.
       .PARAMETER delegation_name
       Delegation name
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("delegation-name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($delegation_name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $delegation_name }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationrule_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationrule_remove_member {
        <#
            .DESCRIPTION
       Remove member from a named service delegation rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER principals
       principal to remove
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principals,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($principals) { $ObjParams | Add-Member -NotePropertyName principal -NotePropertyValue $principals }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationrule_remove_member/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationrule_remove_target {
        <#
            .DESCRIPTION
       Remove target from a named service delegation rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER servicedelegationtargets
       service delegation targets to remove
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$servicedelegationtargets,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($servicedelegationtargets) { $ObjParams | Add-Member -NotePropertyName servicedelegationtarget -NotePropertyValue $servicedelegationtargets }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationrule_remove_target/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationrule_show {
        <#
            .DESCRIPTION
       Display information about a named service delegation rule.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationrule_show/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationtarget_add {
        <#
            .DESCRIPTION
       Create a new service delegation target.
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationtarget_add/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationtarget_add_member {
        <#
            .DESCRIPTION
       Add member to a named service delegation target.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER principals
       principal to add
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principals,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($principals) { $ObjParams | Add-Member -NotePropertyName principal -NotePropertyValue $principals }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationtarget_add_member/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationtarget_del {
        <#
            .DESCRIPTION
       Delete service delegation target.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String[]]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationtarget_del/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationtarget_find {
        <#
            .DESCRIPTION
       Search for service delegation target.
       .PARAMETER delegation_name
       Delegation name
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("delegation-name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($delegation_name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $delegation_name }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationtarget_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationtarget_remove_member {
        <#
            .DESCRIPTION
       Remove member from a named service delegation target.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER principals
       principal to remove
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principals,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($principals) { $ObjParams | Add-Member -NotePropertyName principal -NotePropertyValue $principals }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationtarget_remove_member/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservicedelegationtarget_show {
        <#
            .DESCRIPTION
       Display information about a named service delegation target.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER delegation_name
       Delegation name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_ .-]*[a-zA-Z0-9_.-]?$")]
                [String]$delegation_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "servicedelegationtarget_show/1"
                params  = @(@($delegation_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_add {
        <#
            .DESCRIPTION
       Add a new IPA service.
       .PARAMETER certificate
       Base-64 encoded service certificate
       .PARAMETER pac_type
       Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.
       .PARAMETER auth_ind
       Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.
       .PARAMETER requires_pre_auth
       Pre-authentication is required for the service
       .PARAMETER ok_as_delegate
       Client credentials may be delegated to the service
       .PARAMETER ok_to_auth_as_delegate
       The service is allowed to authenticate on behalf of a client
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER force
       force principal name even if not in DNS
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateSet("MS-PAC","PAD","NONE")]
                [String[]]$pac_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$auth_ind,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$requires_pre_auth,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ok_as_delegate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ok_to_auth_as_delegate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$force,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($pac_type) { $ObjParams | Add-Member -NotePropertyName ipakrbauthzdata -NotePropertyValue $pac_type }
       if ($auth_ind) { $ObjParams | Add-Member -NotePropertyName krbprincipalauthind -NotePropertyValue $auth_ind }
       if ($requires_pre_auth.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrbrequirespreauth -NotePropertyValue $true }
       if ($ok_as_delegate.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrbokasdelegate -NotePropertyValue $true }
       if ($ok_to_auth_as_delegate.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrboktoauthasdelegate -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($force.IsPresent) { $ObjParams | Add-Member -NotePropertyName force -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_add/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_add_cert {
        <#
            .DESCRIPTION
       Add new certificates to a service
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER certificate
       Base-64 encoded service certificate
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_add_cert/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_add_host {
        <#
            .DESCRIPTION
       Add hosts that can manage this service.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to add
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_add_host/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_add_principal {
        <#
            .DESCRIPTION
       Add new principal alias to a service
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER canonical_principal
       Service principal
       .PARAMETER principal
       Service principal alias
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_add_principal/1"
                params  = @(@($canonical_principal,$principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_allow_create_keytab {
        <#
            .DESCRIPTION
       Allow users, groups, hosts or host groups to create a keytab of this service.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_allow_create_keytab/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_allow_retrieve_keytab {
        <#
            .DESCRIPTION
       Allow users, groups, hosts or host groups to retrieve a keytab of this service.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_allow_retrieve_keytab/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_del {
        <#
            .DESCRIPTION
       Delete an IPA service.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_del/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_disable {
        <#
            .DESCRIPTION
       Disable the Kerberos key and SSL certificate of a service.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_disable/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_disallow_create_keytab {
        <#
            .DESCRIPTION
       Disallow users, groups, hosts or host groups to create a keytab of this service.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_disallow_create_keytab/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_disallow_retrieve_keytab {
        <#
            .DESCRIPTION
       Disallow users, groups, hosts or host groups to retrieve a keytab of this service.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_disallow_retrieve_keytab/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_find {
        <#
            .DESCRIPTION
       Search for IPA services.
       .PARAMETER canonical_principal
       Service principal
       .PARAMETER principal
       Service principal alias
       .PARAMETER pac_type
       Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.
       .PARAMETER auth_ind
       Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("canonical-principal")
       .PARAMETER man_by_hosts
       Search for services with these managed by hosts.
       .PARAMETER not_man_by_hosts
       Search for services without these managed by hosts.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [ValidateSet("MS-PAC","PAD","NONE")]
                [String[]]$pac_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$auth_ind,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$man_by_hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_man_by_hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($canonical_principal) { $ObjParams | Add-Member -NotePropertyName krbcanonicalname -NotePropertyValue $canonical_principal }
       if ($principal) { $ObjParams | Add-Member -NotePropertyName krbprincipalname -NotePropertyValue $principal }
       if ($pac_type) { $ObjParams | Add-Member -NotePropertyName ipakrbauthzdata -NotePropertyValue $pac_type }
       if ($auth_ind) { $ObjParams | Add-Member -NotePropertyName krbprincipalauthind -NotePropertyValue $auth_ind }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($man_by_hosts) { $ObjParams | Add-Member -NotePropertyName man_by_host -NotePropertyValue $man_by_hosts }
       if ($not_man_by_hosts) { $ObjParams | Add-Member -NotePropertyName not_man_by_host -NotePropertyValue $not_man_by_hosts }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_mod {
        <#
            .DESCRIPTION
       Modify an existing IPA service.
       .PARAMETER principal
       Service principal alias
       .PARAMETER certificate
       Base-64 encoded service certificate
       .PARAMETER pac_type
       Override default list of supported PAC types. Use 'NONE' to disable PAC support for this service, e.g. this might be necessary for NFS services.
       .PARAMETER auth_ind
       Defines a whitelist for Authentication Indicators. Use 'otp' to allow OTP-based 2FA authentications. Use 'radius' to allow RADIUS-based 2FA authentications. Other values may be used for custom configurations.
       .PARAMETER requires_pre_auth
       Pre-authentication is required for the service
       .PARAMETER ok_as_delegate
       Client credentials may be delegated to the service
       .PARAMETER ok_to_auth_as_delegate
       The service is allowed to authenticate on behalf of a client
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateSet("MS-PAC","PAD","NONE")]
                [String[]]$pac_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$auth_ind,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$requires_pre_auth,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ok_as_delegate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ok_to_auth_as_delegate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($principal) { $ObjParams | Add-Member -NotePropertyName krbprincipalname -NotePropertyValue $principal }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($pac_type) { $ObjParams | Add-Member -NotePropertyName ipakrbauthzdata -NotePropertyValue $pac_type }
       if ($auth_ind) { $ObjParams | Add-Member -NotePropertyName krbprincipalauthind -NotePropertyValue $auth_ind }
       if ($requires_pre_auth.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrbrequirespreauth -NotePropertyValue $true }
       if ($ok_as_delegate.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrbokasdelegate -NotePropertyValue $true }
       if ($ok_to_auth_as_delegate.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipakrboktoauthasdelegate -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_mod/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_remove_cert {
        <#
            .DESCRIPTION
       Remove certificates from a service
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER certificate
       Base-64 encoded service certificate
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_remove_cert/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_remove_host {
        <#
            .DESCRIPTION
       Remove hosts that can manage this service.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to remove
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_remove_host/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_remove_principal {
        <#
            .DESCRIPTION
       Remove principal alias from a service
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER canonical_principal
       Service principal
       .PARAMETER principal
       Service principal alias
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_remove_principal/1"
                params  = @(@($canonical_principal,$principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIservice_show {
        <#
            .DESCRIPTION
       Display information about an IPA service.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER out
       file to store certificate in
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER canonical_principal
       Service principal
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$out,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$canonical_principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($out) { $ObjParams | Add-Member -NotePropertyName out -NotePropertyValue $out }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "service_show/1"
                params  = @(@($canonical_principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsession_logout {
        <#
            .DESCRIPTION
       
    RPC command used to log the current user out of their session.
     
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "session_logout/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsidgen_was_run {
        <#
            .DESCRIPTION
       Determine whether ipa-adtrust-install has been run with sidgen task
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sidgen_was_run/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_activate {
        <#
            .DESCRIPTION
       Activate a stage user.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_activate/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_add {
        <#
            .DESCRIPTION
       Add a new stage user.
       .PARAMETER first
       First name
       .PARAMETER last
       Last name
       .PARAMETER cn
       Full name
       .PARAMETER displayname
       Display name
       .PARAMETER initials
       Initials
       .PARAMETER homedir
       Home directory
       .PARAMETER gecos
       GECOS
       .PARAMETER shell
       Login shell
       .PARAMETER principal
       Principal alias
       .PARAMETER principal_expiration
       Kerberos principal expiration
       .PARAMETER password_expiration
       User password expiration
       .PARAMETER email
       Email address
       .PARAMETER password
       Prompt to set the user password
       .PARAMETER random
       Generate a random user password
       .PARAMETER uid
       User ID Number (system will assign one if not provided)
       .PARAMETER gidnumber
       Group ID Number
       .PARAMETER street
       Street address
       .PARAMETER city
       City
       .PARAMETER state
       State/Province
       .PARAMETER postalcode
       ZIP
       .PARAMETER phone
       Telephone Number
       .PARAMETER mobile
       Mobile Telephone Number
       .PARAMETER pager
       Pager Number
       .PARAMETER fax
       Fax Number
       .PARAMETER orgunit
       Org. Unit
       .PARAMETER title
       Job Title
       .PARAMETER manager
       Manager
       .PARAMETER carlicense
       Car License
       .PARAMETER sshpubkey
       SSH public key
       .PARAMETER user_auth_type
       Types of supported user authentication
       .PARAMETER class
       User category (semantics placed on this attribute are for local interpretation)
       .PARAMETER radius
       RADIUS proxy configuration
       .PARAMETER radius_username
       RADIUS proxy username
       .PARAMETER departmentnumber
       Department Number
       .PARAMETER employeenumber
       Employee Number
       .PARAMETER employeetype
       Employee Type
       .PARAMETER preferredlanguage
       Preferred Language
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$first,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$last,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$cn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$displayname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$initials,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$homedir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$gecos,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$shell,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$principal_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$password_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$email,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    
                [switch]$random,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gidnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$street,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$city,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$state,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$postalcode,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$phone,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$mobile,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$pager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$fax,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$orgunit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$title,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$manager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$carlicense,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshpubkey,
               [parameter(Mandatory=$false)]
                    [ValidateSet("password","radius","otp")]
                [String[]]$user_auth_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius_username,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$departmentnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeenumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeetype,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^(([a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?(\s*,\s*[a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?)*)|(\*))$")]
                [String]$preferredlanguage,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($first) { $ObjParams | Add-Member -NotePropertyName givenname -NotePropertyValue $first }
       if ($last) { $ObjParams | Add-Member -NotePropertyName sn -NotePropertyValue $last }
       if ($cn) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $cn }
       if ($displayname) { $ObjParams | Add-Member -NotePropertyName displayname -NotePropertyValue $displayname }
       if ($initials) { $ObjParams | Add-Member -NotePropertyName initials -NotePropertyValue $initials }
       if ($homedir) { $ObjParams | Add-Member -NotePropertyName homedirectory -NotePropertyValue $homedir }
       if ($gecos) { $ObjParams | Add-Member -NotePropertyName gecos -NotePropertyValue $gecos }
       if ($shell) { $ObjParams | Add-Member -NotePropertyName loginshell -NotePropertyValue $shell }
       if ($principal) { $ObjParams | Add-Member -NotePropertyName krbprincipalname -NotePropertyValue $principal }
       if ($principal_expiration) { $ObjParams | Add-Member -NotePropertyName krbprincipalexpiration -NotePropertyValue $principal_expiration }
       if ($password_expiration) { $ObjParams | Add-Member -NotePropertyName krbpasswordexpiration -NotePropertyValue $password_expiration }
       if ($email) { $ObjParams | Add-Member -NotePropertyName mail -NotePropertyValue $email }
       if ($password) { $ObjParams | Add-Member -NotePropertyName userpassword -NotePropertyValue $password }
       if ($random.IsPresent) { $ObjParams | Add-Member -NotePropertyName random -NotePropertyValue $true }
       if ($uid) { $ObjParams | Add-Member -NotePropertyName uidnumber -NotePropertyValue $uid }
       if ($gidnumber) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gidnumber }
       if ($street) { $ObjParams | Add-Member -NotePropertyName street -NotePropertyValue $street }
       if ($city) { $ObjParams | Add-Member -NotePropertyName l -NotePropertyValue $city }
       if ($state) { $ObjParams | Add-Member -NotePropertyName st -NotePropertyValue $state }
       if ($postalcode) { $ObjParams | Add-Member -NotePropertyName postalcode -NotePropertyValue $postalcode }
       if ($phone) { $ObjParams | Add-Member -NotePropertyName telephonenumber -NotePropertyValue $phone }
       if ($mobile) { $ObjParams | Add-Member -NotePropertyName mobile -NotePropertyValue $mobile }
       if ($pager) { $ObjParams | Add-Member -NotePropertyName pager -NotePropertyValue $pager }
       if ($fax) { $ObjParams | Add-Member -NotePropertyName facsimiletelephonenumber -NotePropertyValue $fax }
       if ($orgunit) { $ObjParams | Add-Member -NotePropertyName ou -NotePropertyValue $orgunit }
       if ($title) { $ObjParams | Add-Member -NotePropertyName title -NotePropertyValue $title }
       if ($manager) { $ObjParams | Add-Member -NotePropertyName manager -NotePropertyValue $manager }
       if ($carlicense) { $ObjParams | Add-Member -NotePropertyName carlicense -NotePropertyValue $carlicense }
       if ($sshpubkey) { $ObjParams | Add-Member -NotePropertyName ipasshpubkey -NotePropertyValue $sshpubkey }
       if ($user_auth_type) { $ObjParams | Add-Member -NotePropertyName ipauserauthtype -NotePropertyValue $user_auth_type }
       if ($class) { $ObjParams | Add-Member -NotePropertyName userclass -NotePropertyValue $class }
       if ($radius) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusconfiglink -NotePropertyValue $radius }
       if ($radius_username) { $ObjParams | Add-Member -NotePropertyName ipatokenradiususername -NotePropertyValue $radius_username }
       if ($departmentnumber) { $ObjParams | Add-Member -NotePropertyName departmentnumber -NotePropertyValue $departmentnumber }
       if ($employeenumber) { $ObjParams | Add-Member -NotePropertyName employeenumber -NotePropertyValue $employeenumber }
       if ($employeetype) { $ObjParams | Add-Member -NotePropertyName employeetype -NotePropertyValue $employeetype }
       if ($preferredlanguage) { $ObjParams | Add-Member -NotePropertyName preferredlanguage -NotePropertyValue $preferredlanguage }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($from_delete.IsPresent) { $ObjParams | Add-Member -NotePropertyName from_delete -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_add/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_add_cert {
        <#
            .DESCRIPTION
       Add one or more certificates to the stageuser entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_add_cert/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_add_certmapdata {
        <#
            .DESCRIPTION
       Add one or more certificate mappings to the stage user entry.
       .PARAMETER issuer
       Issuer of the certificate
       .PARAMETER subject
       Subject of the certificate
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
       .PARAMETER certmapdata
       Certificate mapping data
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$issuer,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subject,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certmapdata,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($issuer) { $ObjParams | Add-Member -NotePropertyName issuer -NotePropertyValue $issuer }
       if ($subject) { $ObjParams | Add-Member -NotePropertyName subject -NotePropertyValue $subject }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName certificate -NotePropertyValue $certificate }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_add_certmapdata/1"
                params  = @(@($login,$certmapdata),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_add_manager {
        <#
            .DESCRIPTION
       Add a manager to the stage user entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_add_manager/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_add_principal {
        <#
            .DESCRIPTION
       Add new principal alias to the stageuser entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
       .PARAMETER principal
       Principal alias
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_add_principal/1"
                params  = @(@($login,$principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_del {
        <#
            .DESCRIPTION
       Delete a stage user.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_del/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_find {
        <#
            .DESCRIPTION
       Search for stage users.
       .PARAMETER login
       User login
       .PARAMETER first
       First name
       .PARAMETER last
       Last name
       .PARAMETER cn
       Full name
       .PARAMETER displayname
       Display name
       .PARAMETER initials
       Initials
       .PARAMETER homedir
       Home directory
       .PARAMETER gecos
       GECOS
       .PARAMETER shell
       Login shell
       .PARAMETER principal
       Principal alias
       .PARAMETER principal_expiration
       Kerberos principal expiration
       .PARAMETER password_expiration
       User password expiration
       .PARAMETER email
       Email address
       .PARAMETER password
       Prompt to set the user password
       .PARAMETER uid
       User ID Number (system will assign one if not provided)
       .PARAMETER gidnumber
       Group ID Number
       .PARAMETER street
       Street address
       .PARAMETER city
       City
       .PARAMETER state
       State/Province
       .PARAMETER postalcode
       ZIP
       .PARAMETER phone
       Telephone Number
       .PARAMETER mobile
       Mobile Telephone Number
       .PARAMETER pager
       Pager Number
       .PARAMETER fax
       Fax Number
       .PARAMETER orgunit
       Org. Unit
       .PARAMETER title
       Job Title
       .PARAMETER manager
       Manager
       .PARAMETER carlicense
       Car License
       .PARAMETER user_auth_type
       Types of supported user authentication
       .PARAMETER class
       User category (semantics placed on this attribute are for local interpretation)
       .PARAMETER radius
       RADIUS proxy configuration
       .PARAMETER radius_username
       RADIUS proxy username
       .PARAMETER departmentnumber
       Department Number
       .PARAMETER employeenumber
       Employee Number
       .PARAMETER employeetype
       Employee Type
       .PARAMETER preferredlanguage
       Preferred Language
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("login")
       .PARAMETER in_groups
       Search for stage users with these member of groups.
       .PARAMETER not_in_groups
       Search for stage users without these member of groups.
       .PARAMETER in_netgroups
       Search for stage users with these member of netgroups.
       .PARAMETER not_in_netgroups
       Search for stage users without these member of netgroups.
       .PARAMETER in_roles
       Search for stage users with these member of roles.
       .PARAMETER not_in_roles
       Search for stage users without these member of roles.
       .PARAMETER in_hbacrules
       Search for stage users with these member of HBAC rules.
       .PARAMETER not_in_hbacrules
       Search for stage users without these member of HBAC rules.
       .PARAMETER in_sudorules
       Search for stage users with these member of sudo rules.
       .PARAMETER not_in_sudorules
       Search for stage users without these member of sudo rules.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$first,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$last,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$cn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$displayname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$initials,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$homedir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$gecos,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$shell,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$principal_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$password_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$email,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gidnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$street,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$city,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$state,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$postalcode,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$phone,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$mobile,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$pager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$fax,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$orgunit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$title,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$manager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$carlicense,
               [parameter(Mandatory=$false)]
                    [ValidateSet("password","radius","otp")]
                [String[]]$user_auth_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius_username,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$departmentnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeenumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeetype,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^(([a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?(\s*,\s*[a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?)*)|(\*))$")]
                [String]$preferredlanguage,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$in_groups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$not_in_groups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$not_in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_roles,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_roles,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_hbacrules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_hbacrules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_sudorules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_sudorules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($login) { $ObjParams | Add-Member -NotePropertyName uid -NotePropertyValue $login }
       if ($first) { $ObjParams | Add-Member -NotePropertyName givenname -NotePropertyValue $first }
       if ($last) { $ObjParams | Add-Member -NotePropertyName sn -NotePropertyValue $last }
       if ($cn) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $cn }
       if ($displayname) { $ObjParams | Add-Member -NotePropertyName displayname -NotePropertyValue $displayname }
       if ($initials) { $ObjParams | Add-Member -NotePropertyName initials -NotePropertyValue $initials }
       if ($homedir) { $ObjParams | Add-Member -NotePropertyName homedirectory -NotePropertyValue $homedir }
       if ($gecos) { $ObjParams | Add-Member -NotePropertyName gecos -NotePropertyValue $gecos }
       if ($shell) { $ObjParams | Add-Member -NotePropertyName loginshell -NotePropertyValue $shell }
       if ($principal) { $ObjParams | Add-Member -NotePropertyName krbprincipalname -NotePropertyValue $principal }
       if ($principal_expiration) { $ObjParams | Add-Member -NotePropertyName krbprincipalexpiration -NotePropertyValue $principal_expiration }
       if ($password_expiration) { $ObjParams | Add-Member -NotePropertyName krbpasswordexpiration -NotePropertyValue $password_expiration }
       if ($email) { $ObjParams | Add-Member -NotePropertyName mail -NotePropertyValue $email }
       if ($password) { $ObjParams | Add-Member -NotePropertyName userpassword -NotePropertyValue $password }
       if ($uid) { $ObjParams | Add-Member -NotePropertyName uidnumber -NotePropertyValue $uid }
       if ($gidnumber) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gidnumber }
       if ($street) { $ObjParams | Add-Member -NotePropertyName street -NotePropertyValue $street }
       if ($city) { $ObjParams | Add-Member -NotePropertyName l -NotePropertyValue $city }
       if ($state) { $ObjParams | Add-Member -NotePropertyName st -NotePropertyValue $state }
       if ($postalcode) { $ObjParams | Add-Member -NotePropertyName postalcode -NotePropertyValue $postalcode }
       if ($phone) { $ObjParams | Add-Member -NotePropertyName telephonenumber -NotePropertyValue $phone }
       if ($mobile) { $ObjParams | Add-Member -NotePropertyName mobile -NotePropertyValue $mobile }
       if ($pager) { $ObjParams | Add-Member -NotePropertyName pager -NotePropertyValue $pager }
       if ($fax) { $ObjParams | Add-Member -NotePropertyName facsimiletelephonenumber -NotePropertyValue $fax }
       if ($orgunit) { $ObjParams | Add-Member -NotePropertyName ou -NotePropertyValue $orgunit }
       if ($title) { $ObjParams | Add-Member -NotePropertyName title -NotePropertyValue $title }
       if ($manager) { $ObjParams | Add-Member -NotePropertyName manager -NotePropertyValue $manager }
       if ($carlicense) { $ObjParams | Add-Member -NotePropertyName carlicense -NotePropertyValue $carlicense }
       if ($user_auth_type) { $ObjParams | Add-Member -NotePropertyName ipauserauthtype -NotePropertyValue $user_auth_type }
       if ($class) { $ObjParams | Add-Member -NotePropertyName userclass -NotePropertyValue $class }
       if ($radius) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusconfiglink -NotePropertyValue $radius }
       if ($radius_username) { $ObjParams | Add-Member -NotePropertyName ipatokenradiususername -NotePropertyValue $radius_username }
       if ($departmentnumber) { $ObjParams | Add-Member -NotePropertyName departmentnumber -NotePropertyValue $departmentnumber }
       if ($employeenumber) { $ObjParams | Add-Member -NotePropertyName employeenumber -NotePropertyValue $employeenumber }
       if ($employeetype) { $ObjParams | Add-Member -NotePropertyName employeetype -NotePropertyValue $employeetype }
       if ($preferredlanguage) { $ObjParams | Add-Member -NotePropertyName preferredlanguage -NotePropertyValue $preferredlanguage }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($in_groups) { $ObjParams | Add-Member -NotePropertyName in_group -NotePropertyValue $in_groups }
       if ($not_in_groups) { $ObjParams | Add-Member -NotePropertyName not_in_group -NotePropertyValue $not_in_groups }
       if ($in_netgroups) { $ObjParams | Add-Member -NotePropertyName in_netgroup -NotePropertyValue $in_netgroups }
       if ($not_in_netgroups) { $ObjParams | Add-Member -NotePropertyName not_in_netgroup -NotePropertyValue $not_in_netgroups }
       if ($in_roles) { $ObjParams | Add-Member -NotePropertyName in_role -NotePropertyValue $in_roles }
       if ($not_in_roles) { $ObjParams | Add-Member -NotePropertyName not_in_role -NotePropertyValue $not_in_roles }
       if ($in_hbacrules) { $ObjParams | Add-Member -NotePropertyName in_hbacrule -NotePropertyValue $in_hbacrules }
       if ($not_in_hbacrules) { $ObjParams | Add-Member -NotePropertyName not_in_hbacrule -NotePropertyValue $not_in_hbacrules }
       if ($in_sudorules) { $ObjParams | Add-Member -NotePropertyName in_sudorule -NotePropertyValue $in_sudorules }
       if ($not_in_sudorules) { $ObjParams | Add-Member -NotePropertyName not_in_sudorule -NotePropertyValue $not_in_sudorules }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_mod {
        <#
            .DESCRIPTION
       Modify a stage user.
       .PARAMETER first
       First name
       .PARAMETER last
       Last name
       .PARAMETER cn
       Full name
       .PARAMETER displayname
       Display name
       .PARAMETER initials
       Initials
       .PARAMETER homedir
       Home directory
       .PARAMETER gecos
       GECOS
       .PARAMETER shell
       Login shell
       .PARAMETER principal
       Principal alias
       .PARAMETER principal_expiration
       Kerberos principal expiration
       .PARAMETER password_expiration
       User password expiration
       .PARAMETER email
       Email address
       .PARAMETER password
       Prompt to set the user password
       .PARAMETER random
       Generate a random user password
       .PARAMETER uid
       User ID Number (system will assign one if not provided)
       .PARAMETER gidnumber
       Group ID Number
       .PARAMETER street
       Street address
       .PARAMETER city
       City
       .PARAMETER state
       State/Province
       .PARAMETER postalcode
       ZIP
       .PARAMETER phone
       Telephone Number
       .PARAMETER mobile
       Mobile Telephone Number
       .PARAMETER pager
       Pager Number
       .PARAMETER fax
       Fax Number
       .PARAMETER orgunit
       Org. Unit
       .PARAMETER title
       Job Title
       .PARAMETER manager
       Manager
       .PARAMETER carlicense
       Car License
       .PARAMETER sshpubkey
       SSH public key
       .PARAMETER user_auth_type
       Types of supported user authentication
       .PARAMETER class
       User category (semantics placed on this attribute are for local interpretation)
       .PARAMETER radius
       RADIUS proxy configuration
       .PARAMETER radius_username
       RADIUS proxy username
       .PARAMETER departmentnumber
       Department Number
       .PARAMETER employeenumber
       Employee Number
       .PARAMETER employeetype
       Employee Type
       .PARAMETER preferredlanguage
       Preferred Language
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER rename
       Rename the stage user object
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$first,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$last,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$cn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$displayname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$initials,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$homedir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$gecos,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$shell,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$principal_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$password_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$email,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    
                [switch]$random,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gidnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$street,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$city,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$state,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$postalcode,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$phone,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$mobile,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$pager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$fax,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$orgunit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$title,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$manager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$carlicense,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshpubkey,
               [parameter(Mandatory=$false)]
                    [ValidateSet("password","radius","otp")]
                [String[]]$user_auth_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius_username,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$departmentnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeenumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeetype,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^(([a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?(\s*,\s*[a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?)*)|(\*))$")]
                [String]$preferredlanguage,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($first) { $ObjParams | Add-Member -NotePropertyName givenname -NotePropertyValue $first }
       if ($last) { $ObjParams | Add-Member -NotePropertyName sn -NotePropertyValue $last }
       if ($cn) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $cn }
       if ($displayname) { $ObjParams | Add-Member -NotePropertyName displayname -NotePropertyValue $displayname }
       if ($initials) { $ObjParams | Add-Member -NotePropertyName initials -NotePropertyValue $initials }
       if ($homedir) { $ObjParams | Add-Member -NotePropertyName homedirectory -NotePropertyValue $homedir }
       if ($gecos) { $ObjParams | Add-Member -NotePropertyName gecos -NotePropertyValue $gecos }
       if ($shell) { $ObjParams | Add-Member -NotePropertyName loginshell -NotePropertyValue $shell }
       if ($principal) { $ObjParams | Add-Member -NotePropertyName krbprincipalname -NotePropertyValue $principal }
       if ($principal_expiration) { $ObjParams | Add-Member -NotePropertyName krbprincipalexpiration -NotePropertyValue $principal_expiration }
       if ($password_expiration) { $ObjParams | Add-Member -NotePropertyName krbpasswordexpiration -NotePropertyValue $password_expiration }
       if ($email) { $ObjParams | Add-Member -NotePropertyName mail -NotePropertyValue $email }
       if ($password) { $ObjParams | Add-Member -NotePropertyName userpassword -NotePropertyValue $password }
       if ($random.IsPresent) { $ObjParams | Add-Member -NotePropertyName random -NotePropertyValue $true }
       if ($uid) { $ObjParams | Add-Member -NotePropertyName uidnumber -NotePropertyValue $uid }
       if ($gidnumber) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gidnumber }
       if ($street) { $ObjParams | Add-Member -NotePropertyName street -NotePropertyValue $street }
       if ($city) { $ObjParams | Add-Member -NotePropertyName l -NotePropertyValue $city }
       if ($state) { $ObjParams | Add-Member -NotePropertyName st -NotePropertyValue $state }
       if ($postalcode) { $ObjParams | Add-Member -NotePropertyName postalcode -NotePropertyValue $postalcode }
       if ($phone) { $ObjParams | Add-Member -NotePropertyName telephonenumber -NotePropertyValue $phone }
       if ($mobile) { $ObjParams | Add-Member -NotePropertyName mobile -NotePropertyValue $mobile }
       if ($pager) { $ObjParams | Add-Member -NotePropertyName pager -NotePropertyValue $pager }
       if ($fax) { $ObjParams | Add-Member -NotePropertyName facsimiletelephonenumber -NotePropertyValue $fax }
       if ($orgunit) { $ObjParams | Add-Member -NotePropertyName ou -NotePropertyValue $orgunit }
       if ($title) { $ObjParams | Add-Member -NotePropertyName title -NotePropertyValue $title }
       if ($manager) { $ObjParams | Add-Member -NotePropertyName manager -NotePropertyValue $manager }
       if ($carlicense) { $ObjParams | Add-Member -NotePropertyName carlicense -NotePropertyValue $carlicense }
       if ($sshpubkey) { $ObjParams | Add-Member -NotePropertyName ipasshpubkey -NotePropertyValue $sshpubkey }
       if ($user_auth_type) { $ObjParams | Add-Member -NotePropertyName ipauserauthtype -NotePropertyValue $user_auth_type }
       if ($class) { $ObjParams | Add-Member -NotePropertyName userclass -NotePropertyValue $class }
       if ($radius) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusconfiglink -NotePropertyValue $radius }
       if ($radius_username) { $ObjParams | Add-Member -NotePropertyName ipatokenradiususername -NotePropertyValue $radius_username }
       if ($departmentnumber) { $ObjParams | Add-Member -NotePropertyName departmentnumber -NotePropertyValue $departmentnumber }
       if ($employeenumber) { $ObjParams | Add-Member -NotePropertyName employeenumber -NotePropertyValue $employeenumber }
       if ($employeetype) { $ObjParams | Add-Member -NotePropertyName employeetype -NotePropertyValue $employeetype }
       if ($preferredlanguage) { $ObjParams | Add-Member -NotePropertyName preferredlanguage -NotePropertyValue $preferredlanguage }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_mod/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_remove_cert {
        <#
            .DESCRIPTION
       Remove one or more certificates to the stageuser entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_remove_cert/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_remove_certmapdata {
        <#
            .DESCRIPTION
       Remove one or more certificate mappings from the stage user entry.
       .PARAMETER issuer
       Issuer of the certificate
       .PARAMETER subject
       Subject of the certificate
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
       .PARAMETER certmapdata
       Certificate mapping data
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$issuer,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subject,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certmapdata,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($issuer) { $ObjParams | Add-Member -NotePropertyName issuer -NotePropertyValue $issuer }
       if ($subject) { $ObjParams | Add-Member -NotePropertyName subject -NotePropertyValue $subject }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName certificate -NotePropertyValue $certificate }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_remove_certmapdata/1"
                params  = @(@($login,$certmapdata),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_remove_manager {
        <#
            .DESCRIPTION
       Remove a manager to the stage user entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_remove_manager/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_remove_principal {
        <#
            .DESCRIPTION
       Remove principal alias from the stageuser entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
       .PARAMETER principal
       Principal alias
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_remove_principal/1"
                params  = @(@($login,$principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIstageuser_show {
        <#
            .DESCRIPTION
       Display information about a stage user.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "stageuser_show/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmdgroup_add {
        <#
            .DESCRIPTION
       Create new Sudo Command Group.
       .PARAMETER desc
       Group description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudocmdgroup_name
       Sudo Command Group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudocmdgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmdgroup_add/1"
                params  = @(@($sudocmdgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmdgroup_add_member {
        <#
            .DESCRIPTION
       Add members to Sudo Command Group.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudocmds
       sudo commands to add
       .PARAMETER sudocmdgroup_name
       Sudo Command Group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmds,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudocmdgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($sudocmds) { $ObjParams | Add-Member -NotePropertyName sudocmd -NotePropertyValue $sudocmds }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmdgroup_add_member/1"
                params  = @(@($sudocmdgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmdgroup_del {
        <#
            .DESCRIPTION
       Delete Sudo Command Group.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER sudocmdgroup_name
       Sudo Command Group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmdgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmdgroup_del/1"
                params  = @(@($sudocmdgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmdgroup_find {
        <#
            .DESCRIPTION
       Search for Sudo Command Groups.
       .PARAMETER sudocmdgroup_name
       Sudo Command Group
       .PARAMETER desc
       Group description
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("sudocmdgroup-name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudocmdgroup_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($sudocmdgroup_name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $sudocmdgroup_name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmdgroup_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmdgroup_mod {
        <#
            .DESCRIPTION
       Modify Sudo Command Group.
       .PARAMETER desc
       Group description
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudocmdgroup_name
       Sudo Command Group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudocmdgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmdgroup_mod/1"
                params  = @(@($sudocmdgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmdgroup_remove_member {
        <#
            .DESCRIPTION
       Remove members from Sudo Command Group.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudocmds
       sudo commands to remove
       .PARAMETER sudocmdgroup_name
       Sudo Command Group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmds,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudocmdgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($sudocmds) { $ObjParams | Add-Member -NotePropertyName sudocmd -NotePropertyValue $sudocmds }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmdgroup_remove_member/1"
                params  = @(@($sudocmdgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmdgroup_show {
        <#
            .DESCRIPTION
       Display Sudo Command Group.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudocmdgroup_name
       Sudo Command Group
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudocmdgroup_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmdgroup_show/1"
                params  = @(@($sudocmdgroup_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmd_add {
        <#
            .DESCRIPTION
       Create new Sudo Command.
       .PARAMETER desc
       A description of this command
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER command
       Sudo Command
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$command,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmd_add/1"
                params  = @(@($command),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmd_del {
        <#
            .DESCRIPTION
       Delete Sudo Command.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER command
       Sudo Command
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$command,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmd_del/1"
                params  = @(@($command),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmd_find {
        <#
            .DESCRIPTION
       Search for Sudo Commands.
       .PARAMETER command
       Sudo Command
       .PARAMETER desc
       A description of this command
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("command")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$command,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($command) { $ObjParams | Add-Member -NotePropertyName sudocmd -NotePropertyValue $command }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmd_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmd_mod {
        <#
            .DESCRIPTION
       Modify Sudo Command.
       .PARAMETER desc
       A description of this command
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER command
       Sudo Command
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$command,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmd_mod/1"
                params  = @(@($command),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudocmd_show {
        <#
            .DESCRIPTION
       Display Sudo Command.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER command
       Sudo Command
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$command,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudocmd_show/1"
                params  = @(@($command),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_add {
        <#
            .DESCRIPTION
       Create new Sudo Rule.
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER cmdcat
       Command category the rule applies to
       .PARAMETER runasusercat
       RunAs User category the rule applies to
       .PARAMETER runasgroupcat
       RunAs Group category the rule applies to
       .PARAMETER order
       integer to order the Sudo rules
       .PARAMETER externaluser
       External User the rule applies to (sudorule-find only)
       .PARAMETER externalhost
       External host
       .PARAMETER runasexternaluser
       External User the commands can run as (sudorule-find only)
       .PARAMETER runasexternalgroup
       External Group the commands can run as (sudorule-find only)
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$cmdcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$runasusercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$runasgroupcat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$order,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$externaluser,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$externalhost,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$runasexternaluser,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$runasexternalgroup,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($cmdcat) { $ObjParams | Add-Member -NotePropertyName cmdcategory -NotePropertyValue $cmdcat }
       if ($runasusercat) { $ObjParams | Add-Member -NotePropertyName ipasudorunasusercategory -NotePropertyValue $runasusercat }
       if ($runasgroupcat) { $ObjParams | Add-Member -NotePropertyName ipasudorunasgroupcategory -NotePropertyValue $runasgroupcat }
       if ($order) { $ObjParams | Add-Member -NotePropertyName sudoorder -NotePropertyValue $order }
       if ($externaluser) { $ObjParams | Add-Member -NotePropertyName externaluser -NotePropertyValue $externaluser }
       if ($externalhost) { $ObjParams | Add-Member -NotePropertyName externalhost -NotePropertyValue $externalhost }
       if ($runasexternaluser) { $ObjParams | Add-Member -NotePropertyName ipasudorunasextuser -NotePropertyValue $runasexternaluser }
       if ($runasexternalgroup) { $ObjParams | Add-Member -NotePropertyName ipasudorunasextgroup -NotePropertyValue $runasexternalgroup }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_add/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_add_allow_command {
        <#
            .DESCRIPTION
       Add commands and sudo command groups affected by Sudo Rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudocmds
       sudo commands to add
       .PARAMETER sudocmdgroups
       sudo command groups to add
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmds,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmdgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($sudocmds) { $ObjParams | Add-Member -NotePropertyName sudocmd -NotePropertyValue $sudocmds }
       if ($sudocmdgroups) { $ObjParams | Add-Member -NotePropertyName sudocmdgroup -NotePropertyValue $sudocmdgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_add_allow_command/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_add_deny_command {
        <#
            .DESCRIPTION
       Add commands and sudo command groups affected by Sudo Rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudocmds
       sudo commands to add
       .PARAMETER sudocmdgroups
       sudo command groups to add
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmds,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmdgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($sudocmds) { $ObjParams | Add-Member -NotePropertyName sudocmd -NotePropertyValue $sudocmds }
       if ($sudocmdgroups) { $ObjParams | Add-Member -NotePropertyName sudocmdgroup -NotePropertyValue $sudocmdgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_add_deny_command/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_add_host {
        <#
            .DESCRIPTION
       Add hosts and hostgroups affected by Sudo Rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to add
       .PARAMETER hostgroups
       host groups to add
       .PARAMETER hostmask
       host masks of allowed hosts
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostmask,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
       if ($hostmask) { $ObjParams | Add-Member -NotePropertyName hostmask -NotePropertyValue $hostmask }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_add_host/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_add_option {
        <#
            .DESCRIPTION
       Add an option to the Sudo Rule.
       .PARAMETER sudooption
       Sudo Option
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudooption,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($sudooption) { $ObjParams | Add-Member -NotePropertyName ipasudoopt -NotePropertyValue $sudooption }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_add_option/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_add_runasgroup {
        <#
            .DESCRIPTION
       Add group for Sudo to execute as.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER groups
       groups to add
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_add_runasgroup/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_add_runasuser {
        <#
            .DESCRIPTION
       Add users and groups for Sudo to execute as.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_add_runasuser/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_add_user {
        <#
            .DESCRIPTION
       Add users and groups affected by Sudo Rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_add_user/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_del {
        <#
            .DESCRIPTION
       Delete Sudo Rule.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_del/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_disable {
        <#
            .DESCRIPTION
       Disable a Sudo Rule.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_disable/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_enable {
        <#
            .DESCRIPTION
       Enable a Sudo Rule.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_enable/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_find {
        <#
            .DESCRIPTION
       Search for Sudo Rule.
       .PARAMETER sudorule_name
       Rule name
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER cmdcat
       Command category the rule applies to
       .PARAMETER runasusercat
       RunAs User category the rule applies to
       .PARAMETER runasgroupcat
       RunAs Group category the rule applies to
       .PARAMETER order
       integer to order the Sudo rules
       .PARAMETER externaluser
       External User the rule applies to (sudorule-find only)
       .PARAMETER externalhost
       External host
       .PARAMETER runasexternaluser
       External User the commands can run as (sudorule-find only)
       .PARAMETER runasexternalgroup
       External Group the commands can run as (sudorule-find only)
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("sudorule-name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$cmdcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$runasusercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$runasgroupcat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$order,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$externaluser,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$externalhost,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$runasexternaluser,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$runasexternalgroup,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($sudorule_name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $sudorule_name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($cmdcat) { $ObjParams | Add-Member -NotePropertyName cmdcategory -NotePropertyValue $cmdcat }
       if ($runasusercat) { $ObjParams | Add-Member -NotePropertyName ipasudorunasusercategory -NotePropertyValue $runasusercat }
       if ($runasgroupcat) { $ObjParams | Add-Member -NotePropertyName ipasudorunasgroupcategory -NotePropertyValue $runasgroupcat }
       if ($order) { $ObjParams | Add-Member -NotePropertyName sudoorder -NotePropertyValue $order }
       if ($externaluser) { $ObjParams | Add-Member -NotePropertyName externaluser -NotePropertyValue $externaluser }
       if ($externalhost) { $ObjParams | Add-Member -NotePropertyName externalhost -NotePropertyValue $externalhost }
       if ($runasexternaluser) { $ObjParams | Add-Member -NotePropertyName ipasudorunasextuser -NotePropertyValue $runasexternaluser }
       if ($runasexternalgroup) { $ObjParams | Add-Member -NotePropertyName ipasudorunasextgroup -NotePropertyValue $runasexternalgroup }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_mod {
        <#
            .DESCRIPTION
       Modify Sudo Rule.
       .PARAMETER desc
       Description
       .PARAMETER ipaenabledflag
       Enabled
       .PARAMETER usercat
       User category the rule applies to
       .PARAMETER hostcat
       Host category the rule applies to
       .PARAMETER cmdcat
       Command category the rule applies to
       .PARAMETER runasusercat
       RunAs User category the rule applies to
       .PARAMETER runasgroupcat
       RunAs Group category the rule applies to
       .PARAMETER order
       integer to order the Sudo rules
       .PARAMETER externaluser
       External User the rule applies to (sudorule-find only)
       .PARAMETER externalhost
       External host
       .PARAMETER runasexternaluser
       External User the commands can run as (sudorule-find only)
       .PARAMETER runasexternalgroup
       External Group the commands can run as (sudorule-find only)
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER rename
       Rename the sudo rule object
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$ipaenabledflag,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$usercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$hostcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$cmdcat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$runasusercat,
               [parameter(Mandatory=$false)]
                    [ValidateSet("all")]
                [String]$runasgroupcat,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$order,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$externaluser,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$externalhost,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$runasexternaluser,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$runasexternalgroup,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($ipaenabledflag.IsPresent) { $ObjParams | Add-Member -NotePropertyName ipaenabledflag -NotePropertyValue $true }
       if ($usercat) { $ObjParams | Add-Member -NotePropertyName usercategory -NotePropertyValue $usercat }
       if ($hostcat) { $ObjParams | Add-Member -NotePropertyName hostcategory -NotePropertyValue $hostcat }
       if ($cmdcat) { $ObjParams | Add-Member -NotePropertyName cmdcategory -NotePropertyValue $cmdcat }
       if ($runasusercat) { $ObjParams | Add-Member -NotePropertyName ipasudorunasusercategory -NotePropertyValue $runasusercat }
       if ($runasgroupcat) { $ObjParams | Add-Member -NotePropertyName ipasudorunasgroupcategory -NotePropertyValue $runasgroupcat }
       if ($order) { $ObjParams | Add-Member -NotePropertyName sudoorder -NotePropertyValue $order }
       if ($externaluser) { $ObjParams | Add-Member -NotePropertyName externaluser -NotePropertyValue $externaluser }
       if ($externalhost) { $ObjParams | Add-Member -NotePropertyName externalhost -NotePropertyValue $externalhost }
       if ($runasexternaluser) { $ObjParams | Add-Member -NotePropertyName ipasudorunasextuser -NotePropertyValue $runasexternaluser }
       if ($runasexternalgroup) { $ObjParams | Add-Member -NotePropertyName ipasudorunasextgroup -NotePropertyValue $runasexternalgroup }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_mod/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_remove_allow_command {
        <#
            .DESCRIPTION
       Remove commands and sudo command groups affected by Sudo Rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudocmds
       sudo commands to remove
       .PARAMETER sudocmdgroups
       sudo command groups to remove
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmds,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmdgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($sudocmds) { $ObjParams | Add-Member -NotePropertyName sudocmd -NotePropertyValue $sudocmds }
       if ($sudocmdgroups) { $ObjParams | Add-Member -NotePropertyName sudocmdgroup -NotePropertyValue $sudocmdgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_remove_allow_command/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_remove_deny_command {
        <#
            .DESCRIPTION
       Remove commands and sudo command groups affected by Sudo Rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudocmds
       sudo commands to remove
       .PARAMETER sudocmdgroups
       sudo command groups to remove
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmds,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sudocmdgroups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($sudocmds) { $ObjParams | Add-Member -NotePropertyName sudocmd -NotePropertyValue $sudocmds }
       if ($sudocmdgroups) { $ObjParams | Add-Member -NotePropertyName sudocmdgroup -NotePropertyValue $sudocmdgroups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_remove_deny_command/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_remove_host {
        <#
            .DESCRIPTION
       Remove hosts and hostgroups affected by Sudo Rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER hosts
       hosts to remove
       .PARAMETER hostgroups
       host groups to remove
       .PARAMETER hostmask
       host masks of allowed hosts
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hosts,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$hostmask,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($hosts) { $ObjParams | Add-Member -NotePropertyName host -NotePropertyValue $hosts }
       if ($hostgroups) { $ObjParams | Add-Member -NotePropertyName hostgroup -NotePropertyValue $hostgroups }
       if ($hostmask) { $ObjParams | Add-Member -NotePropertyName hostmask -NotePropertyValue $hostmask }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_remove_host/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_remove_option {
        <#
            .DESCRIPTION
       Remove an option from Sudo Rule.
       .PARAMETER sudooption
       Sudo Option
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudooption,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($sudooption) { $ObjParams | Add-Member -NotePropertyName ipasudoopt -NotePropertyValue $sudooption }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_remove_option/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_remove_runasgroup {
        <#
            .DESCRIPTION
       Remove group for Sudo to execute as.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER groups
       groups to remove
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_remove_runasgroup/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_remove_runasuser {
        <#
            .DESCRIPTION
       Remove users and groups for Sudo to execute as.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_remove_runasuser/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_remove_user {
        <#
            .DESCRIPTION
       Remove users and groups affected by Sudo Rule.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_remove_user/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIsudorule_show {
        <#
            .DESCRIPTION
       Display Sudo Rule.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER sudorule_name
       Rule name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$sudorule_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "sudorule_show/1"
                params  = @(@($sudorule_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopic_find {
        <#
            .DESCRIPTION
       Search for help topics.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topic_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopic_show {
        <#
            .DESCRIPTION
       Display information about a help topic.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER full_name
       Full name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$full_name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topic_show/1"
                params  = @(@($full_name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysegment_add {
        <#
            .DESCRIPTION
       Add a new segment.
       .PARAMETER leftnode
       Left replication node - an IPA server
       .PARAMETER rightnode
       Right replication node - an IPA server
       .PARAMETER direction
       Direction of replication between left and right replication node
       .PARAMETER stripattrs
       A space separated list of attributes which are removed from replication updates.
       .PARAMETER replattrs
       Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof
       .PARAMETER replattrstotal
       Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout
       .PARAMETER timeout
       Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing
       .PARAMETER enabled
       Whether a replication agreement is active, meaning whether replication is occurring per that agreement
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER topologysuffix
       Suffix name
       .PARAMETER name
       Arbitrary string identifying the segment
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9.][a-zA-Z0-9.-]*[a-zA-Z0-9.$-]?$")]
                [String]$leftnode,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9.][a-zA-Z0-9.-]*[a-zA-Z0-9.$-]?$")]
                [String]$rightnode,
               [parameter(Mandatory=$false)]
                    [ValidateSet("both","left-right","right-left")]
                [String]$direction,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$stripattrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$replattrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$replattrstotal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timeout,
               [parameter(Mandatory=$false)]
                    [ValidateSet("on","off")]
                [String]$enabled,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$topologysuffix,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($leftnode) { $ObjParams | Add-Member -NotePropertyName iparepltoposegmentleftnode -NotePropertyValue $leftnode }
       if ($rightnode) { $ObjParams | Add-Member -NotePropertyName iparepltoposegmentrightnode -NotePropertyValue $rightnode }
       if ($direction) { $ObjParams | Add-Member -NotePropertyName iparepltoposegmentdirection -NotePropertyValue $direction }
       if ($stripattrs) { $ObjParams | Add-Member -NotePropertyName nsds5replicastripattrs -NotePropertyValue $stripattrs }
       if ($replattrs) { $ObjParams | Add-Member -NotePropertyName nsds5replicatedattributelist -NotePropertyValue $replattrs }
       if ($replattrstotal) { $ObjParams | Add-Member -NotePropertyName nsds5replicatedattributelisttotal -NotePropertyValue $replattrstotal }
       if ($timeout) { $ObjParams | Add-Member -NotePropertyName nsds5replicatimeout -NotePropertyValue $timeout }
       if ($enabled) { $ObjParams | Add-Member -NotePropertyName nsds5replicaenabled -NotePropertyValue $enabled }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysegment_add/1"
                params  = @(@($topologysuffix,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysegment_del {
        <#
            .DESCRIPTION
       Delete a segment.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER topologysuffix
       Suffix name
       .PARAMETER name
       Arbitrary string identifying the segment
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$topologysuffix,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysegment_del/1"
                params  = @(@($topologysuffix,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysegment_find {
        <#
            .DESCRIPTION
       Search for topology segments.
       .PARAMETER name
       Arbitrary string identifying the segment
       .PARAMETER leftnode
       Left replication node - an IPA server
       .PARAMETER rightnode
       Right replication node - an IPA server
       .PARAMETER direction
       Direction of replication between left and right replication node
       .PARAMETER stripattrs
       A space separated list of attributes which are removed from replication updates.
       .PARAMETER replattrs
       Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof
       .PARAMETER replattrstotal
       Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout
       .PARAMETER timeout
       Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing
       .PARAMETER enabled
       Whether a replication agreement is active, meaning whether replication is occurring per that agreement
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER topologysuffix
       Suffix name
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9.][a-zA-Z0-9.-]*[a-zA-Z0-9.$-]?$")]
                [String]$leftnode,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9.][a-zA-Z0-9.-]*[a-zA-Z0-9.$-]?$")]
                [String]$rightnode,
               [parameter(Mandatory=$false)]
                    [ValidateSet("both","left-right","right-left")]
                [String]$direction,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$stripattrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$replattrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$replattrstotal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timeout,
               [parameter(Mandatory=$false)]
                    [ValidateSet("on","off")]
                [String]$enabled,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$topologysuffix,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($leftnode) { $ObjParams | Add-Member -NotePropertyName iparepltoposegmentleftnode -NotePropertyValue $leftnode }
       if ($rightnode) { $ObjParams | Add-Member -NotePropertyName iparepltoposegmentrightnode -NotePropertyValue $rightnode }
       if ($direction) { $ObjParams | Add-Member -NotePropertyName iparepltoposegmentdirection -NotePropertyValue $direction }
       if ($stripattrs) { $ObjParams | Add-Member -NotePropertyName nsds5replicastripattrs -NotePropertyValue $stripattrs }
       if ($replattrs) { $ObjParams | Add-Member -NotePropertyName nsds5replicatedattributelist -NotePropertyValue $replattrs }
       if ($replattrstotal) { $ObjParams | Add-Member -NotePropertyName nsds5replicatedattributelisttotal -NotePropertyValue $replattrstotal }
       if ($timeout) { $ObjParams | Add-Member -NotePropertyName nsds5replicatimeout -NotePropertyValue $timeout }
       if ($enabled) { $ObjParams | Add-Member -NotePropertyName nsds5replicaenabled -NotePropertyValue $enabled }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysegment_find/1"
                params  = @(@($topologysuffix,$criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysegment_mod {
        <#
            .DESCRIPTION
       Modify a segment.
       .PARAMETER stripattrs
       A space separated list of attributes which are removed from replication updates.
       .PARAMETER replattrs
       Attributes that are not replicated to a consumer server during a fractional update. E.g., `(objectclass=*) $ EXCLUDE accountlockout memberof
       .PARAMETER replattrstotal
       Attributes that are not replicated to a consumer server during a total update. E.g. (objectclass=*) $ EXCLUDE accountlockout
       .PARAMETER timeout
       Number of seconds outbound LDAP operations waits for a response from the remote replica before timing out and failing
       .PARAMETER enabled
       Whether a replication agreement is active, meaning whether replication is occurring per that agreement
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER topologysuffix
       Suffix name
       .PARAMETER name
       Arbitrary string identifying the segment
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$stripattrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$replattrs,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$replattrstotal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timeout,
               [parameter(Mandatory=$false)]
                    [ValidateSet("on","off")]
                [String]$enabled,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$topologysuffix,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($stripattrs) { $ObjParams | Add-Member -NotePropertyName nsds5replicastripattrs -NotePropertyValue $stripattrs }
       if ($replattrs) { $ObjParams | Add-Member -NotePropertyName nsds5replicatedattributelist -NotePropertyValue $replattrs }
       if ($replattrstotal) { $ObjParams | Add-Member -NotePropertyName nsds5replicatedattributelisttotal -NotePropertyValue $replattrstotal }
       if ($timeout) { $ObjParams | Add-Member -NotePropertyName nsds5replicatimeout -NotePropertyValue $timeout }
       if ($enabled) { $ObjParams | Add-Member -NotePropertyName nsds5replicaenabled -NotePropertyValue $enabled }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysegment_mod/1"
                params  = @(@($topologysuffix,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysegment_reinitialize {
        <#
            .DESCRIPTION
       Request a full re-initialization of the node retrieving data from the other node.
       .PARAMETER left
       Initialize left node
       .PARAMETER right
       Initialize right node
       .PARAMETER stop
       Stop already started refresh of chosen node(s)
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER topologysuffix
       Suffix name
       .PARAMETER name
       Arbitrary string identifying the segment
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$left,
               [parameter(Mandatory=$false)]
                    
                [switch]$right,
               [parameter(Mandatory=$false)]
                    
                [switch]$stop,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$topologysuffix,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($left.IsPresent) { $ObjParams | Add-Member -NotePropertyName left -NotePropertyValue $true }
       if ($right.IsPresent) { $ObjParams | Add-Member -NotePropertyName right -NotePropertyValue $true }
       if ($stop.IsPresent) { $ObjParams | Add-Member -NotePropertyName stop -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysegment_reinitialize/1"
                params  = @(@($topologysuffix,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysegment_show {
        <#
            .DESCRIPTION
       Display a segment.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER topologysuffix
       Suffix name
       .PARAMETER name
       Arbitrary string identifying the segment
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$topologysuffix,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysegment_show/1"
                params  = @(@($topologysuffix,$name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysuffix_add {
        <#
            .DESCRIPTION
       Add a new topology suffix to be managed.
       .PARAMETER suffix_dn
       Managed LDAP suffix DN
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Suffix name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$suffix_dn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($suffix_dn) { $ObjParams | Add-Member -NotePropertyName iparepltopoconfroot -NotePropertyValue $suffix_dn }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysuffix_add/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysuffix_del {
        <#
            .DESCRIPTION
       Delete a topology suffix.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Suffix name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysuffix_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysuffix_find {
        <#
            .DESCRIPTION
       Search for topology suffixes.
       .PARAMETER name
       Suffix name
       .PARAMETER suffix_dn
       Managed LDAP suffix DN
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$suffix_dn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($suffix_dn) { $ObjParams | Add-Member -NotePropertyName iparepltopoconfroot -NotePropertyValue $suffix_dn }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysuffix_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysuffix_mod {
        <#
            .DESCRIPTION
       Modify a topology suffix.
       .PARAMETER suffix_dn
       Managed LDAP suffix DN
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Suffix name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$suffix_dn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($suffix_dn) { $ObjParams | Add-Member -NotePropertyName iparepltopoconfroot -NotePropertyValue $suffix_dn }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysuffix_mod/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysuffix_show {
        <#
            .DESCRIPTION
       Show managed suffix.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Suffix name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysuffix_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItopologysuffix_verify {
        <#
            .DESCRIPTION
       
Verify replication topology for suffix.

Checks done:
  1. check if a topology is not disconnected. In other words if there are
     replication paths between all servers.
  2. check if servers don't have more than the recommended number of
     replication agreements
 
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Suffix name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "topologysuffix_verify/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrustconfig_mod {
        <#
            .DESCRIPTION
       Modify global trust configuration.
       .PARAMETER fallback_primary_group
       Fallback primary group
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER type
       Trust type (ad for Active Directory, default)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$fallback_primary_group,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateSet("ad")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($fallback_primary_group) { $ObjParams | Add-Member -NotePropertyName ipantfallbackprimarygroup -NotePropertyValue $fallback_primary_group }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($type) { $ObjParams | Add-Member -NotePropertyName trust_type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trustconfig_mod/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrustconfig_show {
        <#
            .DESCRIPTION
       Show global trust configuration.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER type
       Trust type (ad for Active Directory, default)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateSet("ad")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($type) { $ObjParams | Add-Member -NotePropertyName trust_type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trustconfig_show/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrustdomain_add {
        <#
            .DESCRIPTION
       Allow access from the trusted domain
       .PARAMETER flat_name
       Domain NetBIOS name
       .PARAMETER sid
       Domain Security Identifier
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER type
       Trust type (ad for Active Directory, default)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER trust
       Realm name
       .PARAMETER domain
       Domain name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$flat_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$sid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateSet("ad")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$trust,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$domain,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($flat_name) { $ObjParams | Add-Member -NotePropertyName ipantflatname -NotePropertyValue $flat_name }
       if ($sid) { $ObjParams | Add-Member -NotePropertyName ipanttrusteddomainsid -NotePropertyValue $sid }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($type) { $ObjParams | Add-Member -NotePropertyName trust_type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trustdomain_add/1"
                params  = @(@($trust,$domain),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrustdomain_del {
        <#
            .DESCRIPTION
       Remove information about the domain associated with the trust.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER trust
       Realm name
       .PARAMETER domain
       Domain name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$trust,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$domain,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trustdomain_del/1"
                params  = @(@($trust,$domain),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrustdomain_disable {
        <#
            .DESCRIPTION
       Disable use of IPA resources by the domain of the trust
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER trust
       Realm name
       .PARAMETER domain
       Domain name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$trust,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$domain,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trustdomain_disable/1"
                params  = @(@($trust,$domain),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrustdomain_enable {
        <#
            .DESCRIPTION
       Allow use of IPA resources by the domain of the trust
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER trust
       Realm name
       .PARAMETER domain
       Domain name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$trust,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$domain,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trustdomain_enable/1"
                params  = @(@($trust,$domain),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrustdomain_find {
        <#
            .DESCRIPTION
       Search domains of the trust
       .PARAMETER domain
       Domain name
       .PARAMETER flat_name
       Domain NetBIOS name
       .PARAMETER sid
       Domain Security Identifier
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("domain")
       .PARAMETER trust
       Realm name
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$domain,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$flat_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$sid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$trust,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($domain) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $domain }
       if ($flat_name) { $ObjParams | Add-Member -NotePropertyName ipantflatname -NotePropertyValue $flat_name }
       if ($sid) { $ObjParams | Add-Member -NotePropertyName ipanttrusteddomainsid -NotePropertyValue $sid }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trustdomain_find/1"
                params  = @(@($trust,$criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrustdomain_mod {
        <#
            .DESCRIPTION
       Modify trustdomain of the trust
       .PARAMETER flat_name
       Domain NetBIOS name
       .PARAMETER sid
       Domain Security Identifier
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER type
       Trust type (ad for Active Directory, default)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER trust
       Realm name
       .PARAMETER domain
       Domain name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$flat_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$sid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateSet("ad")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$trust,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$domain,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($flat_name) { $ObjParams | Add-Member -NotePropertyName ipantflatname -NotePropertyValue $flat_name }
       if ($sid) { $ObjParams | Add-Member -NotePropertyName ipanttrusteddomainsid -NotePropertyValue $sid }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($type) { $ObjParams | Add-Member -NotePropertyName trust_type -NotePropertyValue $type }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trustdomain_mod/1"
                params  = @(@($trust,$domain),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrust_add {
        <#
            .DESCRIPTION
       
Add new trust to use.

This command establishes trust relationship to another domain
which becomes 'trusted'. As result, users of the trusted domain
may access resources of this domain.

Only trusts to Active Directory domains are supported right now.

The command can be safely run multiple times against the same domain,
this will cause change to trust relationship credentials on both
sides.

Note that if the command was previously run with a specific range type,
or with automatic detection of the range type, and you want to configure a
different range type, you may need to delete first the ID range using
ipa idrange-del before retrying the command with the desired range type.
     
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER type
       Trust type (ad for Active Directory, default)
       .PARAMETER admin
       Active Directory domain administrator
       .PARAMETER password
       Active Directory domain administrator's password
       .PARAMETER server
       Domain controller for the Active Directory domain (optional)
       .PARAMETER trust_secret
       Shared secret for the trust
       .PARAMETER base_id
       First Posix ID of the range reserved for the trusted domain
       .PARAMETER range_size
       Size of the ID range reserved for the trusted domain
       .PARAMETER range_type
       Type of trusted domain ID range, one of ipa-ad-trust, ipa-ad-trust-posix
       .PARAMETER two_way
       Establish bi-directional trust. By default trust is inbound one-way only.
       .PARAMETER external
       Establish external trust to a domain in another forest. The trust is not transitive beyond the domain.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER realm
       Realm name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateSet("ad")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$admin,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$server,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$trust_secret,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$base_id,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$range_size,
               [parameter(Mandatory=$false)]
                    [ValidateSet("ipa-ad-trust","ipa-ad-trust-posix")]
                [String]$range_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$two_way,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$external,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$realm,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($trust_secret) { $trust_secret = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($trust_secret)) }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($type) { $ObjParams | Add-Member -NotePropertyName trust_type -NotePropertyValue $type }
       if ($admin) { $ObjParams | Add-Member -NotePropertyName realm_admin -NotePropertyValue $admin }
       if ($password) { $ObjParams | Add-Member -NotePropertyName realm_passwd -NotePropertyValue $password }
       if ($server) { $ObjParams | Add-Member -NotePropertyName realm_server -NotePropertyValue $server }
       if ($trust_secret) { $ObjParams | Add-Member -NotePropertyName trust_secret -NotePropertyValue $trust_secret }
       if ($base_id) { $ObjParams | Add-Member -NotePropertyName base_id -NotePropertyValue $base_id }
       if ($range_size) { $ObjParams | Add-Member -NotePropertyName range_size -NotePropertyValue $range_size }
       if ($range_type) { $ObjParams | Add-Member -NotePropertyName range_type -NotePropertyValue $range_type }
       if ($two_way.IsPresent) { $ObjParams | Add-Member -NotePropertyName bidirectional -NotePropertyValue $true }
       if ($external.IsPresent) { $ObjParams | Add-Member -NotePropertyName external -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trust_add/1"
                params  = @(@($realm),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrust_del {
        <#
            .DESCRIPTION
       Delete a trust.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER realm
       Realm name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$realm,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trust_del/1"
                params  = @(@($realm),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrust_fetch_domains {
        <#
            .DESCRIPTION
       Refresh list of the domains associated with the trust
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER server
       Domain controller for the Active Directory domain (optional)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER realm
       Realm name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$server,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$realm,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($server) { $ObjParams | Add-Member -NotePropertyName realm_server -NotePropertyValue $server }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trust_fetch_domains/1"
                params  = @(@($realm),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrust_find {
        <#
            .DESCRIPTION
       Search for trusts.
       .PARAMETER realm
       Realm name
       .PARAMETER flat_name
       Domain NetBIOS name
       .PARAMETER sid
       Domain Security Identifier
       .PARAMETER sid_blacklist_incoming
       SID blacklist incoming
       .PARAMETER sid_blacklist_outgoing
       SID blacklist outgoing
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("realm")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$realm,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$flat_name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$sid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sid_blacklist_incoming,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sid_blacklist_outgoing,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($realm) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $realm }
       if ($flat_name) { $ObjParams | Add-Member -NotePropertyName ipantflatname -NotePropertyValue $flat_name }
       if ($sid) { $ObjParams | Add-Member -NotePropertyName ipanttrusteddomainsid -NotePropertyValue $sid }
       if ($sid_blacklist_incoming) { $ObjParams | Add-Member -NotePropertyName ipantsidblacklistincoming -NotePropertyValue $sid_blacklist_incoming }
       if ($sid_blacklist_outgoing) { $ObjParams | Add-Member -NotePropertyName ipantsidblacklistoutgoing -NotePropertyValue $sid_blacklist_outgoing }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trust_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrust_mod {
        <#
            .DESCRIPTION
       
    Modify a trust (for future use).

    Currently only the default option to modify the LDAP attributes is
    available. More specific options will be added in coming releases.
     
       .PARAMETER sid_blacklist_incoming
       SID blacklist incoming
       .PARAMETER sid_blacklist_outgoing
       SID blacklist outgoing
       .PARAMETER upn_suffixes
       UPN suffixes
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER realm
       Realm name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sid_blacklist_incoming,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sid_blacklist_outgoing,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$upn_suffixes,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$realm,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($sid_blacklist_incoming) { $ObjParams | Add-Member -NotePropertyName ipantsidblacklistincoming -NotePropertyValue $sid_blacklist_incoming }
       if ($sid_blacklist_outgoing) { $ObjParams | Add-Member -NotePropertyName ipantsidblacklistoutgoing -NotePropertyValue $sid_blacklist_outgoing }
       if ($upn_suffixes) { $ObjParams | Add-Member -NotePropertyName ipantadditionalsuffixes -NotePropertyValue $upn_suffixes }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trust_mod/1"
                params  = @(@($realm),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrust_resolve {
        <#
            .DESCRIPTION
       Resolve security identifiers of users and groups in trusted domains
       .PARAMETER sids
       Security Identifiers (SIDs)
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sids,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($sids) { $ObjParams | Add-Member -NotePropertyName sids -NotePropertyValue $sids }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trust_resolve/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPItrust_show {
        <#
            .DESCRIPTION
       Display information about a trust.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER realm
       Realm name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$realm,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "trust_show/1"
                params  = @(@($realm),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_add {
        <#
            .DESCRIPTION
       Add a new user.
       .PARAMETER first
       First name
       .PARAMETER last
       Last name
       .PARAMETER cn
       Full name
       .PARAMETER displayname
       Display name
       .PARAMETER initials
       Initials
       .PARAMETER homedir
       Home directory
       .PARAMETER gecos
       GECOS
       .PARAMETER shell
       Login shell
       .PARAMETER principal
       Principal alias
       .PARAMETER principal_expiration
       Kerberos principal expiration
       .PARAMETER password_expiration
       User password expiration
       .PARAMETER email
       Email address
       .PARAMETER password
       Prompt to set the user password
       .PARAMETER random
       Generate a random user password
       .PARAMETER uid
       User ID Number (system will assign one if not provided)
       .PARAMETER gidnumber
       Group ID Number
       .PARAMETER street
       Street address
       .PARAMETER city
       City
       .PARAMETER state
       State/Province
       .PARAMETER postalcode
       ZIP
       .PARAMETER phone
       Telephone Number
       .PARAMETER mobile
       Mobile Telephone Number
       .PARAMETER pager
       Pager Number
       .PARAMETER fax
       Fax Number
       .PARAMETER orgunit
       Org. Unit
       .PARAMETER title
       Job Title
       .PARAMETER manager
       Manager
       .PARAMETER carlicense
       Car License
       .PARAMETER sshpubkey
       SSH public key
       .PARAMETER user_auth_type
       Types of supported user authentication
       .PARAMETER class
       User category (semantics placed on this attribute are for local interpretation)
       .PARAMETER radius
       RADIUS proxy configuration
       .PARAMETER radius_username
       RADIUS proxy username
       .PARAMETER departmentnumber
       Department Number
       .PARAMETER employeenumber
       Employee Number
       .PARAMETER employeetype
       Employee Type
       .PARAMETER preferredlanguage
       Preferred Language
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER disabled
       Account disabled
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER noprivate
       Don't create user private group
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$first,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$last,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$cn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$displayname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$initials,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$homedir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$gecos,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$shell,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$principal_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$password_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$email,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    
                [switch]$random,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gidnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$street,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$city,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$state,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$postalcode,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$phone,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$mobile,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$pager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$fax,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$orgunit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$title,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$manager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$carlicense,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshpubkey,
               [parameter(Mandatory=$false)]
                    [ValidateSet("password","radius","otp")]
                [String[]]$user_auth_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius_username,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$departmentnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeenumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeetype,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^(([a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?(\s*,\s*[a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?)*)|(\*))$")]
                [String]$preferredlanguage,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$disabled,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$noprivate,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($first) { $ObjParams | Add-Member -NotePropertyName givenname -NotePropertyValue $first }
       if ($last) { $ObjParams | Add-Member -NotePropertyName sn -NotePropertyValue $last }
       if ($cn) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $cn }
       if ($displayname) { $ObjParams | Add-Member -NotePropertyName displayname -NotePropertyValue $displayname }
       if ($initials) { $ObjParams | Add-Member -NotePropertyName initials -NotePropertyValue $initials }
       if ($homedir) { $ObjParams | Add-Member -NotePropertyName homedirectory -NotePropertyValue $homedir }
       if ($gecos) { $ObjParams | Add-Member -NotePropertyName gecos -NotePropertyValue $gecos }
       if ($shell) { $ObjParams | Add-Member -NotePropertyName loginshell -NotePropertyValue $shell }
       if ($principal) { $ObjParams | Add-Member -NotePropertyName krbprincipalname -NotePropertyValue $principal }
       if ($principal_expiration) { $ObjParams | Add-Member -NotePropertyName krbprincipalexpiration -NotePropertyValue $principal_expiration }
       if ($password_expiration) { $ObjParams | Add-Member -NotePropertyName krbpasswordexpiration -NotePropertyValue $password_expiration }
       if ($email) { $ObjParams | Add-Member -NotePropertyName mail -NotePropertyValue $email }
       if ($password) { $ObjParams | Add-Member -NotePropertyName userpassword -NotePropertyValue $password }
       if ($random.IsPresent) { $ObjParams | Add-Member -NotePropertyName random -NotePropertyValue $true }
       if ($uid) { $ObjParams | Add-Member -NotePropertyName uidnumber -NotePropertyValue $uid }
       if ($gidnumber) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gidnumber }
       if ($street) { $ObjParams | Add-Member -NotePropertyName street -NotePropertyValue $street }
       if ($city) { $ObjParams | Add-Member -NotePropertyName l -NotePropertyValue $city }
       if ($state) { $ObjParams | Add-Member -NotePropertyName st -NotePropertyValue $state }
       if ($postalcode) { $ObjParams | Add-Member -NotePropertyName postalcode -NotePropertyValue $postalcode }
       if ($phone) { $ObjParams | Add-Member -NotePropertyName telephonenumber -NotePropertyValue $phone }
       if ($mobile) { $ObjParams | Add-Member -NotePropertyName mobile -NotePropertyValue $mobile }
       if ($pager) { $ObjParams | Add-Member -NotePropertyName pager -NotePropertyValue $pager }
       if ($fax) { $ObjParams | Add-Member -NotePropertyName facsimiletelephonenumber -NotePropertyValue $fax }
       if ($orgunit) { $ObjParams | Add-Member -NotePropertyName ou -NotePropertyValue $orgunit }
       if ($title) { $ObjParams | Add-Member -NotePropertyName title -NotePropertyValue $title }
       if ($manager) { $ObjParams | Add-Member -NotePropertyName manager -NotePropertyValue $manager }
       if ($carlicense) { $ObjParams | Add-Member -NotePropertyName carlicense -NotePropertyValue $carlicense }
       if ($sshpubkey) { $ObjParams | Add-Member -NotePropertyName ipasshpubkey -NotePropertyValue $sshpubkey }
       if ($user_auth_type) { $ObjParams | Add-Member -NotePropertyName ipauserauthtype -NotePropertyValue $user_auth_type }
       if ($class) { $ObjParams | Add-Member -NotePropertyName userclass -NotePropertyValue $class }
       if ($radius) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusconfiglink -NotePropertyValue $radius }
       if ($radius_username) { $ObjParams | Add-Member -NotePropertyName ipatokenradiususername -NotePropertyValue $radius_username }
       if ($departmentnumber) { $ObjParams | Add-Member -NotePropertyName departmentnumber -NotePropertyValue $departmentnumber }
       if ($employeenumber) { $ObjParams | Add-Member -NotePropertyName employeenumber -NotePropertyValue $employeenumber }
       if ($employeetype) { $ObjParams | Add-Member -NotePropertyName employeetype -NotePropertyValue $employeetype }
       if ($preferredlanguage) { $ObjParams | Add-Member -NotePropertyName preferredlanguage -NotePropertyValue $preferredlanguage }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($disabled.IsPresent) { $ObjParams | Add-Member -NotePropertyName nsaccountlock -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($noprivate.IsPresent) { $ObjParams | Add-Member -NotePropertyName noprivate -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_add/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_add_cert {
        <#
            .DESCRIPTION
       Add one or more certificates to the user entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_add_cert/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_add_certmapdata {
        <#
            .DESCRIPTION
       Add one or more certificate mappings to the user entry.
       .PARAMETER issuer
       Issuer of the certificate
       .PARAMETER subject
       Subject of the certificate
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
       .PARAMETER certmapdata
       Certificate mapping data
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$issuer,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subject,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certmapdata,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($issuer) { $ObjParams | Add-Member -NotePropertyName issuer -NotePropertyValue $issuer }
       if ($subject) { $ObjParams | Add-Member -NotePropertyName subject -NotePropertyValue $subject }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName certificate -NotePropertyValue $certificate }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_add_certmapdata/1"
                params  = @(@($login,$certmapdata),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_add_manager {
        <#
            .DESCRIPTION
       Add a manager to the user entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_add_manager/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_add_principal {
        <#
            .DESCRIPTION
       Add new principal alias to the user entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
       .PARAMETER principal
       Principal alias
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_add_principal/1"
                params  = @(@($login,$principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_del {
        <#
            .DESCRIPTION
       Delete a user.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER preserve
       <preserve>
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$preserve,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }
       if ($preserve.IsPresent) { $ObjParams | Add-Member -NotePropertyName preserve -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_del/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_disable {
        <#
            .DESCRIPTION
       Disable a user account.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_disable/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_enable {
        <#
            .DESCRIPTION
       Enable a user account.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_enable/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_find {
        <#
            .DESCRIPTION
       Search for users.
       .PARAMETER login
       User login
       .PARAMETER first
       First name
       .PARAMETER last
       Last name
       .PARAMETER cn
       Full name
       .PARAMETER displayname
       Display name
       .PARAMETER initials
       Initials
       .PARAMETER homedir
       Home directory
       .PARAMETER gecos
       GECOS
       .PARAMETER shell
       Login shell
       .PARAMETER principal
       Principal alias
       .PARAMETER principal_expiration
       Kerberos principal expiration
       .PARAMETER password_expiration
       User password expiration
       .PARAMETER email
       Email address
       .PARAMETER password
       Prompt to set the user password
       .PARAMETER uid
       User ID Number (system will assign one if not provided)
       .PARAMETER gidnumber
       Group ID Number
       .PARAMETER street
       Street address
       .PARAMETER city
       City
       .PARAMETER state
       State/Province
       .PARAMETER postalcode
       ZIP
       .PARAMETER phone
       Telephone Number
       .PARAMETER mobile
       Mobile Telephone Number
       .PARAMETER pager
       Pager Number
       .PARAMETER fax
       Fax Number
       .PARAMETER orgunit
       Org. Unit
       .PARAMETER title
       Job Title
       .PARAMETER manager
       Manager
       .PARAMETER carlicense
       Car License
       .PARAMETER user_auth_type
       Types of supported user authentication
       .PARAMETER class
       User category (semantics placed on this attribute are for local interpretation)
       .PARAMETER radius
       RADIUS proxy configuration
       .PARAMETER radius_username
       RADIUS proxy username
       .PARAMETER departmentnumber
       Department Number
       .PARAMETER employeenumber
       Employee Number
       .PARAMETER employeetype
       Employee Type
       .PARAMETER preferredlanguage
       Preferred Language
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER disabled
       Account disabled
       .PARAMETER preserved
       Preserved user
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER whoami
       Display user record for current Kerberos principal
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("login")
       .PARAMETER in_groups
       Search for users with these member of groups.
       .PARAMETER not_in_groups
       Search for users without these member of groups.
       .PARAMETER in_netgroups
       Search for users with these member of netgroups.
       .PARAMETER not_in_netgroups
       Search for users without these member of netgroups.
       .PARAMETER in_roles
       Search for users with these member of roles.
       .PARAMETER not_in_roles
       Search for users without these member of roles.
       .PARAMETER in_hbacrules
       Search for users with these member of HBAC rules.
       .PARAMETER not_in_hbacrules
       Search for users without these member of HBAC rules.
       .PARAMETER in_sudorules
       Search for users with these member of sudo rules.
       .PARAMETER not_in_sudorules
       Search for users without these member of sudo rules.
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$first,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$last,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$cn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$displayname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$initials,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$homedir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$gecos,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$shell,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$principal_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$password_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$email,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gidnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$street,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$city,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$state,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$postalcode,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$phone,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$mobile,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$pager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$fax,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$orgunit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$title,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$manager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$carlicense,
               [parameter(Mandatory=$false)]
                    [ValidateSet("password","radius","otp")]
                [String[]]$user_auth_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius_username,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$departmentnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeenumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeetype,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^(([a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?(\s*,\s*[a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?)*)|(\*))$")]
                [String]$preferredlanguage,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$disabled,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$preserved,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    
                [switch]$whoami,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$in_groups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$not_in_groups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*$")]
                [String[]]$not_in_netgroups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_roles,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_roles,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_hbacrules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_hbacrules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$in_sudorules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$not_in_sudorules,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($login) { $ObjParams | Add-Member -NotePropertyName uid -NotePropertyValue $login }
       if ($first) { $ObjParams | Add-Member -NotePropertyName givenname -NotePropertyValue $first }
       if ($last) { $ObjParams | Add-Member -NotePropertyName sn -NotePropertyValue $last }
       if ($cn) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $cn }
       if ($displayname) { $ObjParams | Add-Member -NotePropertyName displayname -NotePropertyValue $displayname }
       if ($initials) { $ObjParams | Add-Member -NotePropertyName initials -NotePropertyValue $initials }
       if ($homedir) { $ObjParams | Add-Member -NotePropertyName homedirectory -NotePropertyValue $homedir }
       if ($gecos) { $ObjParams | Add-Member -NotePropertyName gecos -NotePropertyValue $gecos }
       if ($shell) { $ObjParams | Add-Member -NotePropertyName loginshell -NotePropertyValue $shell }
       if ($principal) { $ObjParams | Add-Member -NotePropertyName krbprincipalname -NotePropertyValue $principal }
       if ($principal_expiration) { $ObjParams | Add-Member -NotePropertyName krbprincipalexpiration -NotePropertyValue $principal_expiration }
       if ($password_expiration) { $ObjParams | Add-Member -NotePropertyName krbpasswordexpiration -NotePropertyValue $password_expiration }
       if ($email) { $ObjParams | Add-Member -NotePropertyName mail -NotePropertyValue $email }
       if ($password) { $ObjParams | Add-Member -NotePropertyName userpassword -NotePropertyValue $password }
       if ($uid) { $ObjParams | Add-Member -NotePropertyName uidnumber -NotePropertyValue $uid }
       if ($gidnumber) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gidnumber }
       if ($street) { $ObjParams | Add-Member -NotePropertyName street -NotePropertyValue $street }
       if ($city) { $ObjParams | Add-Member -NotePropertyName l -NotePropertyValue $city }
       if ($state) { $ObjParams | Add-Member -NotePropertyName st -NotePropertyValue $state }
       if ($postalcode) { $ObjParams | Add-Member -NotePropertyName postalcode -NotePropertyValue $postalcode }
       if ($phone) { $ObjParams | Add-Member -NotePropertyName telephonenumber -NotePropertyValue $phone }
       if ($mobile) { $ObjParams | Add-Member -NotePropertyName mobile -NotePropertyValue $mobile }
       if ($pager) { $ObjParams | Add-Member -NotePropertyName pager -NotePropertyValue $pager }
       if ($fax) { $ObjParams | Add-Member -NotePropertyName facsimiletelephonenumber -NotePropertyValue $fax }
       if ($orgunit) { $ObjParams | Add-Member -NotePropertyName ou -NotePropertyValue $orgunit }
       if ($title) { $ObjParams | Add-Member -NotePropertyName title -NotePropertyValue $title }
       if ($manager) { $ObjParams | Add-Member -NotePropertyName manager -NotePropertyValue $manager }
       if ($carlicense) { $ObjParams | Add-Member -NotePropertyName carlicense -NotePropertyValue $carlicense }
       if ($user_auth_type) { $ObjParams | Add-Member -NotePropertyName ipauserauthtype -NotePropertyValue $user_auth_type }
       if ($class) { $ObjParams | Add-Member -NotePropertyName userclass -NotePropertyValue $class }
       if ($radius) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusconfiglink -NotePropertyValue $radius }
       if ($radius_username) { $ObjParams | Add-Member -NotePropertyName ipatokenradiususername -NotePropertyValue $radius_username }
       if ($departmentnumber) { $ObjParams | Add-Member -NotePropertyName departmentnumber -NotePropertyValue $departmentnumber }
       if ($employeenumber) { $ObjParams | Add-Member -NotePropertyName employeenumber -NotePropertyValue $employeenumber }
       if ($employeetype) { $ObjParams | Add-Member -NotePropertyName employeetype -NotePropertyValue $employeetype }
       if ($preferredlanguage) { $ObjParams | Add-Member -NotePropertyName preferredlanguage -NotePropertyValue $preferredlanguage }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($disabled.IsPresent) { $ObjParams | Add-Member -NotePropertyName nsaccountlock -NotePropertyValue $true }
       if ($preserved.IsPresent) { $ObjParams | Add-Member -NotePropertyName preserved -NotePropertyValue $true }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($whoami.IsPresent) { $ObjParams | Add-Member -NotePropertyName whoami -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
       if ($in_groups) { $ObjParams | Add-Member -NotePropertyName in_group -NotePropertyValue $in_groups }
       if ($not_in_groups) { $ObjParams | Add-Member -NotePropertyName not_in_group -NotePropertyValue $not_in_groups }
       if ($in_netgroups) { $ObjParams | Add-Member -NotePropertyName in_netgroup -NotePropertyValue $in_netgroups }
       if ($not_in_netgroups) { $ObjParams | Add-Member -NotePropertyName not_in_netgroup -NotePropertyValue $not_in_netgroups }
       if ($in_roles) { $ObjParams | Add-Member -NotePropertyName in_role -NotePropertyValue $in_roles }
       if ($not_in_roles) { $ObjParams | Add-Member -NotePropertyName not_in_role -NotePropertyValue $not_in_roles }
       if ($in_hbacrules) { $ObjParams | Add-Member -NotePropertyName in_hbacrule -NotePropertyValue $in_hbacrules }
       if ($not_in_hbacrules) { $ObjParams | Add-Member -NotePropertyName not_in_hbacrule -NotePropertyValue $not_in_hbacrules }
       if ($in_sudorules) { $ObjParams | Add-Member -NotePropertyName in_sudorule -NotePropertyValue $in_sudorules }
       if ($not_in_sudorules) { $ObjParams | Add-Member -NotePropertyName not_in_sudorule -NotePropertyValue $not_in_sudorules }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_mod {
        <#
            .DESCRIPTION
       Modify a user.
       .PARAMETER first
       First name
       .PARAMETER last
       Last name
       .PARAMETER cn
       Full name
       .PARAMETER displayname
       Display name
       .PARAMETER initials
       Initials
       .PARAMETER homedir
       Home directory
       .PARAMETER gecos
       GECOS
       .PARAMETER shell
       Login shell
       .PARAMETER principal
       Principal alias
       .PARAMETER principal_expiration
       Kerberos principal expiration
       .PARAMETER password_expiration
       User password expiration
       .PARAMETER email
       Email address
       .PARAMETER password
       Prompt to set the user password
       .PARAMETER random
       Generate a random user password
       .PARAMETER uid
       User ID Number (system will assign one if not provided)
       .PARAMETER gidnumber
       Group ID Number
       .PARAMETER street
       Street address
       .PARAMETER city
       City
       .PARAMETER state
       State/Province
       .PARAMETER postalcode
       ZIP
       .PARAMETER phone
       Telephone Number
       .PARAMETER mobile
       Mobile Telephone Number
       .PARAMETER pager
       Pager Number
       .PARAMETER fax
       Fax Number
       .PARAMETER orgunit
       Org. Unit
       .PARAMETER title
       Job Title
       .PARAMETER manager
       Manager
       .PARAMETER carlicense
       Car License
       .PARAMETER sshpubkey
       SSH public key
       .PARAMETER user_auth_type
       Types of supported user authentication
       .PARAMETER class
       User category (semantics placed on this attribute are for local interpretation)
       .PARAMETER radius
       RADIUS proxy configuration
       .PARAMETER radius_username
       RADIUS proxy username
       .PARAMETER departmentnumber
       Department Number
       .PARAMETER employeenumber
       Employee Number
       .PARAMETER employeetype
       Employee Type
       .PARAMETER preferredlanguage
       Preferred Language
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER disabled
       Account disabled
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER rename
       Rename the user object
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$first,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$last,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$cn,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$displayname,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$initials,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$homedir,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$gecos,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$shell,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$principal_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [System.DateTime]$password_expiration,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$email,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [SecureString]$password,
               [parameter(Mandatory=$false)]
                    
                [switch]$random,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$uid,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$gidnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$street,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$city,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$state,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$postalcode,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$phone,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$mobile,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$pager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$fax,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$orgunit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$title,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$manager,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$carlicense,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$sshpubkey,
               [parameter(Mandatory=$false)]
                    [ValidateSet("password","radius","otp")]
                [String[]]$user_auth_type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$class,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$radius_username,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$departmentnumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeenumber,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$employeetype,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^(([a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?(\s*,\s*[a-zA-Z]{1,8}(-[a-zA-Z]{1,8})?(;q\=((0(\.[0-9]{0,3})?)|(1(\.0{0,3})?)))?)*)|(\*))$")]
                [String]$preferredlanguage,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [switch]$disabled,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$rename,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($password) { $password = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($password)) }
       if ($first) { $ObjParams | Add-Member -NotePropertyName givenname -NotePropertyValue $first }
       if ($last) { $ObjParams | Add-Member -NotePropertyName sn -NotePropertyValue $last }
       if ($cn) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $cn }
       if ($displayname) { $ObjParams | Add-Member -NotePropertyName displayname -NotePropertyValue $displayname }
       if ($initials) { $ObjParams | Add-Member -NotePropertyName initials -NotePropertyValue $initials }
       if ($homedir) { $ObjParams | Add-Member -NotePropertyName homedirectory -NotePropertyValue $homedir }
       if ($gecos) { $ObjParams | Add-Member -NotePropertyName gecos -NotePropertyValue $gecos }
       if ($shell) { $ObjParams | Add-Member -NotePropertyName loginshell -NotePropertyValue $shell }
       if ($principal) { $ObjParams | Add-Member -NotePropertyName krbprincipalname -NotePropertyValue $principal }
       if ($principal_expiration) { $ObjParams | Add-Member -NotePropertyName krbprincipalexpiration -NotePropertyValue $principal_expiration }
       if ($password_expiration) { $ObjParams | Add-Member -NotePropertyName krbpasswordexpiration -NotePropertyValue $password_expiration }
       if ($email) { $ObjParams | Add-Member -NotePropertyName mail -NotePropertyValue $email }
       if ($password) { $ObjParams | Add-Member -NotePropertyName userpassword -NotePropertyValue $password }
       if ($random.IsPresent) { $ObjParams | Add-Member -NotePropertyName random -NotePropertyValue $true }
       if ($uid) { $ObjParams | Add-Member -NotePropertyName uidnumber -NotePropertyValue $uid }
       if ($gidnumber) { $ObjParams | Add-Member -NotePropertyName gidnumber -NotePropertyValue $gidnumber }
       if ($street) { $ObjParams | Add-Member -NotePropertyName street -NotePropertyValue $street }
       if ($city) { $ObjParams | Add-Member -NotePropertyName l -NotePropertyValue $city }
       if ($state) { $ObjParams | Add-Member -NotePropertyName st -NotePropertyValue $state }
       if ($postalcode) { $ObjParams | Add-Member -NotePropertyName postalcode -NotePropertyValue $postalcode }
       if ($phone) { $ObjParams | Add-Member -NotePropertyName telephonenumber -NotePropertyValue $phone }
       if ($mobile) { $ObjParams | Add-Member -NotePropertyName mobile -NotePropertyValue $mobile }
       if ($pager) { $ObjParams | Add-Member -NotePropertyName pager -NotePropertyValue $pager }
       if ($fax) { $ObjParams | Add-Member -NotePropertyName facsimiletelephonenumber -NotePropertyValue $fax }
       if ($orgunit) { $ObjParams | Add-Member -NotePropertyName ou -NotePropertyValue $orgunit }
       if ($title) { $ObjParams | Add-Member -NotePropertyName title -NotePropertyValue $title }
       if ($manager) { $ObjParams | Add-Member -NotePropertyName manager -NotePropertyValue $manager }
       if ($carlicense) { $ObjParams | Add-Member -NotePropertyName carlicense -NotePropertyValue $carlicense }
       if ($sshpubkey) { $ObjParams | Add-Member -NotePropertyName ipasshpubkey -NotePropertyValue $sshpubkey }
       if ($user_auth_type) { $ObjParams | Add-Member -NotePropertyName ipauserauthtype -NotePropertyValue $user_auth_type }
       if ($class) { $ObjParams | Add-Member -NotePropertyName userclass -NotePropertyValue $class }
       if ($radius) { $ObjParams | Add-Member -NotePropertyName ipatokenradiusconfiglink -NotePropertyValue $radius }
       if ($radius_username) { $ObjParams | Add-Member -NotePropertyName ipatokenradiususername -NotePropertyValue $radius_username }
       if ($departmentnumber) { $ObjParams | Add-Member -NotePropertyName departmentnumber -NotePropertyValue $departmentnumber }
       if ($employeenumber) { $ObjParams | Add-Member -NotePropertyName employeenumber -NotePropertyValue $employeenumber }
       if ($employeetype) { $ObjParams | Add-Member -NotePropertyName employeetype -NotePropertyValue $employeetype }
       if ($preferredlanguage) { $ObjParams | Add-Member -NotePropertyName preferredlanguage -NotePropertyValue $preferredlanguage }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
       if ($disabled.IsPresent) { $ObjParams | Add-Member -NotePropertyName nsaccountlock -NotePropertyValue $true }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($rename) { $ObjParams | Add-Member -NotePropertyName rename -NotePropertyValue $rename }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_mod/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_remove_cert {
        <#
            .DESCRIPTION
       Remove one or more certificates to the user entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName usercertificate -NotePropertyValue $certificate }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_remove_cert/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_remove_certmapdata {
        <#
            .DESCRIPTION
       Remove one or more certificate mappings from the user entry.
       .PARAMETER issuer
       Issuer of the certificate
       .PARAMETER subject
       Subject of the certificate
       .PARAMETER certificate
       Base-64 encoded user certificate
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
       .PARAMETER certmapdata
       Certificate mapping data
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$issuer,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$subject,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certificate,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$certmapdata,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($issuer) { $ObjParams | Add-Member -NotePropertyName issuer -NotePropertyValue $issuer }
       if ($subject) { $ObjParams | Add-Member -NotePropertyName subject -NotePropertyValue $subject }
       if ($certificate) { $ObjParams | Add-Member -NotePropertyName certificate -NotePropertyValue $certificate }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_remove_certmapdata/1"
                params  = @(@($login,$certmapdata),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_remove_manager {
        <#
            .DESCRIPTION
       Remove a manager to the user entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_remove_manager/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_remove_principal {
        <#
            .DESCRIPTION
       Remove principal alias from the user entry
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
       .PARAMETER principal
       Principal alias
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$principal,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_remove_principal/1"
                params  = @(@($login,$principal),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_show {
        <#
            .DESCRIPTION
       Display information about a user.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER out
       file to store certificate in
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$out,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($out) { $ObjParams | Add-Member -NotePropertyName out -NotePropertyValue $out }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_show/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_stage {
        <#
            .DESCRIPTION
       Move deleted user into staged area
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String[]]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_stage/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_status {
        <#
            .DESCRIPTION
       
    Lockout status of a user account

    An account may become locked if the password is entered incorrectly too
    many times within a specific time period as controlled by password
    policy. A locked account is a temporary condition and may be unlocked by
    an administrator.

    This connects to each IPA master and displays the lockout status on
    each one.

    To determine whether an account is locked on a given server you need
    to compare the number of failed logins and the time of the last failure.
    For an account to be locked it must exceed the maxfail failures within
    the failinterval duration as specified in the password policy associated
    with the user.

    The failed login counter is modified only when a user attempts a log in
    so it is possible that an account may appear locked but the last failed
    login attempt is older than the lockouttime of the password policy. This
    means that the user may attempt a login again.
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_status/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_undel {
        <#
            .DESCRIPTION
       Undelete a delete user account.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_undel/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIuser_unlock {
        <#
            .DESCRIPTION
       
    Unlock a user account

    An account may become locked if the password is entered incorrectly too
    many times within a specific time period as controlled by password
    policy. A locked account is a temporary condition and may be unlocked by
    an administrator.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER login
       User login
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*[a-zA-Z0-9_.$-]?$")]
                [String]$login,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "user_unlock/1"
                params  = @(@($login),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvaultconfig_show {
        <#
            .DESCRIPTION
       Show vault configuration.
       .PARAMETER transport_out
       Output file to store the transport certificate
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$transport_out,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($transport_out) { $ObjParams | Add-Member -NotePropertyName transport_out -NotePropertyValue $transport_out }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vaultconfig_show/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvaultcontainer_add_owner {
        <#
            .DESCRIPTION
       Add owners to a vault container.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER services
       services to add
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($services) { $ObjParams | Add-Member -NotePropertyName services -NotePropertyValue $services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vaultcontainer_add_owner/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvaultcontainer_del {
        <#
            .DESCRIPTION
       Delete a vault container.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vaultcontainer_del/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvaultcontainer_remove_owner {
        <#
            .DESCRIPTION
       Remove owners from a vault container.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER services
       services to remove
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($services) { $ObjParams | Add-Member -NotePropertyName services -NotePropertyValue $services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vaultcontainer_remove_owner/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvaultcontainer_show {
        <#
            .DESCRIPTION
       Display information about a vault container.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vaultcontainer_show/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_add_internal {
        <#
            .DESCRIPTION
       .PARAMETER desc
       Vault description
       .PARAMETER type
       Vault type
       .PARAMETER salt
       Vault salt
       .PARAMETER public_key
       Vault public key
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Vault name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateSet("standard","symmetric","asymmetric")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$salt,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$public_key,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($type) { $ObjParams | Add-Member -NotePropertyName ipavaulttype -NotePropertyValue $type }
       if ($salt) { $ObjParams | Add-Member -NotePropertyName ipavaultsalt -NotePropertyValue $salt }
       if ($public_key) { $ObjParams | Add-Member -NotePropertyName ipavaultpublickey -NotePropertyValue $public_key }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_add_internal/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_add_member {
        <#
            .DESCRIPTION
       Add members to a vault.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER services
       services to add
       .PARAMETER name
       Vault name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($services) { $ObjParams | Add-Member -NotePropertyName services -NotePropertyValue $services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_add_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_add_owner {
        <#
            .DESCRIPTION
       Add owners to a vault.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to add
       .PARAMETER groups
       groups to add
       .PARAMETER services
       services to add
       .PARAMETER name
       Vault name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($services) { $ObjParams | Add-Member -NotePropertyName services -NotePropertyValue $services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_add_owner/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_archive_internal {
        <#
            .DESCRIPTION
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER session_key
       Session key wrapped with transport certificate
       .PARAMETER vault_data
       Vault data encrypted with session key
       .PARAMETER nonce
       Nonce
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Vault name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$session_key,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$vault_data,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$nonce,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($session_key) { $ObjParams | Add-Member -NotePropertyName session_key -NotePropertyValue $session_key }
       if ($vault_data) { $ObjParams | Add-Member -NotePropertyName vault_data -NotePropertyValue $vault_data }
       if ($nonce) { $ObjParams | Add-Member -NotePropertyName nonce -NotePropertyValue $nonce }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_archive_internal/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_del {
        <#
            .DESCRIPTION
       Delete a vault.
       .PARAMETER continue
       Continuous mode: Don't stop on errors.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Vault name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$continue,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String[]]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($continue.IsPresent) { $ObjParams | Add-Member -NotePropertyName continue -NotePropertyValue $true }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_del/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_find {
        <#
            .DESCRIPTION
       Search for vaults.
       .PARAMETER name
       Vault name
       .PARAMETER desc
       Vault description
       .PARAMETER type
       Vault type
       .PARAMETER timelimit
       Time limit of search in seconds (0 is unlimited)
       .PARAMETER sizelimit
       Maximum number of entries returned (0 is unlimited)
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER services
       List all service vaults
       .PARAMETER users
       List all user vaults
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER pkey_only
       Results should contain primary key attribute only ("name")
       .PARAMETER criteria
       A string searched in all relevant object attributes
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateSet("standard","symmetric","asymmetric")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$timelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [int]$sizelimit,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$services,
               [parameter(Mandatory=$false)]
                    
                [switch]$users,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    
                [switch]$pkey_only,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$criteria,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($name) { $ObjParams | Add-Member -NotePropertyName cn -NotePropertyValue $name }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($type) { $ObjParams | Add-Member -NotePropertyName ipavaulttype -NotePropertyValue $type }
       if ($timelimit) { $ObjParams | Add-Member -NotePropertyName timelimit -NotePropertyValue $timelimit }
       if ($sizelimit) { $ObjParams | Add-Member -NotePropertyName sizelimit -NotePropertyValue $sizelimit }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($services.IsPresent) { $ObjParams | Add-Member -NotePropertyName services -NotePropertyValue $true }
       if ($users.IsPresent) { $ObjParams | Add-Member -NotePropertyName users -NotePropertyValue $true }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($pkey_only.IsPresent) { $ObjParams | Add-Member -NotePropertyName pkey_only -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_find/1"
                params  = @(@($criteria),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_mod_internal {
        <#
            .DESCRIPTION
       .PARAMETER desc
       Vault description
       .PARAMETER type
       Vault type
       .PARAMETER salt
       Vault salt
       .PARAMETER public_key
       Vault public key
       .PARAMETER setattr
       Set an attribute to a name/value pair. Format is attr=value.
For multi-valued attributes, the command replaces the values already present.
       .PARAMETER addattr
       Add an attribute/value pair. Format is attr=value. The attribute
must be part of the schema.
       .PARAMETER delattr
       Delete an attribute/value pair. The option will be evaluated
last, after all sets and adds.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Vault name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$desc,
               [parameter(Mandatory=$false)]
                    [ValidateSet("standard","symmetric","asymmetric")]
                [String]$type,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$salt,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$public_key,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$setattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$addattr,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$delattr,
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($desc) { $ObjParams | Add-Member -NotePropertyName description -NotePropertyValue $desc }
       if ($type) { $ObjParams | Add-Member -NotePropertyName ipavaulttype -NotePropertyValue $type }
       if ($salt) { $ObjParams | Add-Member -NotePropertyName ipavaultsalt -NotePropertyValue $salt }
       if ($public_key) { $ObjParams | Add-Member -NotePropertyName ipavaultpublickey -NotePropertyValue $public_key }
       if ($setattr) { $ObjParams | Add-Member -NotePropertyName setattr -NotePropertyValue $setattr }
       if ($addattr) { $ObjParams | Add-Member -NotePropertyName addattr -NotePropertyValue $addattr }
       if ($delattr) { $ObjParams | Add-Member -NotePropertyName delattr -NotePropertyValue $delattr }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_mod_internal/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_remove_member {
        <#
            .DESCRIPTION
       Remove members from a vault.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER services
       services to remove
       .PARAMETER name
       Vault name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($services) { $ObjParams | Add-Member -NotePropertyName services -NotePropertyValue $services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_remove_member/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_remove_owner {
        <#
            .DESCRIPTION
       Remove owners from a vault.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER users
       users to remove
       .PARAMETER groups
       groups to remove
       .PARAMETER services
       services to remove
       .PARAMETER name
       Vault name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$users,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$groups,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String[]]$services,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
       if ($users) { $ObjParams | Add-Member -NotePropertyName user -NotePropertyValue $users }
       if ($groups) { $ObjParams | Add-Member -NotePropertyName group -NotePropertyValue $groups }
       if ($services) { $ObjParams | Add-Member -NotePropertyName services -NotePropertyValue $services }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_remove_owner/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_retrieve_internal {
        <#
            .DESCRIPTION
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER session_key
       Session key wrapped with transport certificate
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER name
       Vault name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$true)]
                    [ValidateNotNullOrEmpty()]
                [String]$session_key,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($session_key) { $ObjParams | Add-Member -NotePropertyName session_key -NotePropertyValue $session_key }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_retrieve_internal/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIvault_show {
        <#
            .DESCRIPTION
       Display information about a vault.
       .PARAMETER rights
       Display the access rights of this entry (requires -all). See ipa man page for details.
       .PARAMETER service
       Service name of the service vault
       .PARAMETER shared
       Shared vault
       .PARAMETER user
       Username of the user vault
       .PARAMETER all
       Retrieve and print all attributes from the server. Affects command output.
       .PARAMETER raw
       Print entries as stored on the server. Only affects output format.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
       .PARAMETER no_members
       Suppress processing of membership attributes.
       .PARAMETER name
       Vault name
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    
                [switch]$rights,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$service,
               [parameter(Mandatory=$false)]
                    
                [switch]$shared,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$user,
               [parameter(Mandatory=$false)]
                    
                [switch]$all,
               [parameter(Mandatory=$false)]
                    
                [switch]$raw,
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    
                [switch]$no_members,
               [parameter(Mandatory=$true)]
                    [ValidatePattern("^[a-zA-Z0-9_.-]+$")]
                [String]$name,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }
       if ($rights.IsPresent) { $ObjParams | Add-Member -NotePropertyName rights -NotePropertyValue $true }
       if ($service) { $ObjParams | Add-Member -NotePropertyName service -NotePropertyValue $service }
       if ($shared.IsPresent) { $ObjParams | Add-Member -NotePropertyName shared -NotePropertyValue $true }
       if ($user) { $ObjParams | Add-Member -NotePropertyName username -NotePropertyValue $user }
       if ($all.IsPresent) { $ObjParams | Add-Member -NotePropertyName all -NotePropertyValue $true }
       if ($raw.IsPresent) { $ObjParams | Add-Member -NotePropertyName raw -NotePropertyValue $true }

       if ($no_members.IsPresent) { $ObjParams | Add-Member -NotePropertyName no_members -NotePropertyValue $true }
        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "vault_show/1"
                params  = @(@($name),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
function Invoke-FreeIPAAPIwhoami {
        <#
            .DESCRIPTION
       Describe currently authenticated identity.
       .PARAMETER version
       Client version. Used to determine if server will accept request.
    #>

    [CmdletBinding()]
        [OutputType([psobject])]
            Param(
               [parameter(Mandatory=$false)]
                    [ValidateNotNullOrEmpty()]
                [String]$version,
               [parameter(Mandatory=$false)]
                    [switch]$FullResultsOutput
           )
    process {
        If ($version) {
                $ObjParams = New-Object psobject -property @{
                    version = $version
                }
            } else {
                $ObjParams = New-Object psobject -property @{
                    version = $global:FreeIPAAPIServerConfig.ClientVersion
                }
            }

        $JsonObject = New-Object psobject -property @{
                id        = 0
                method    = "whoami/1"
                params  = @(@(),$ObjParams)
            }
        if (!($FullResultsOutput.IsPresent)) {
                (Invoke-FreeIPAAPI $JsonObject).result.result
            } else {
                Invoke-FreeIPAAPI $JsonObject
            }
    }
}
New-alias -Name Add-IPAAci -Value Invoke-FreeIPAAPIAci_Add -Description "
    Create new ACI.
    "

New-alias -Name Remove-IPAAci -Value Invoke-FreeIPAAPIAci_Del -Description "
    Delete ACI.
    "

New-alias -Name Find-IPAAci -Value Invoke-FreeIPAAPIAci_Find -Description "
    Search for ACIs.

    Returns a list of ACIs

    EXAMPLES:

     To find all ACIs that apply directly to members of the group ipausers:
       ipa aci-find --memberof=ipausers

     To find all ACIs that grant add access:
       ipa aci-find --permissions=add

    Note that the find command only looks for the given text in the set of
    ACIs, it does not evaluate the ACIs to see if something would apply.
    For example, searching on memberof=ipausers will find all ACIs that
    have ipausers as a memberof. There may be other ACIs that apply to
    members of that group indirectly.
    "

New-alias -Name Set-IPAAci -Value Invoke-FreeIPAAPIAci_Mod -Description "
    Modify ACI.
    "

New-alias -Name Rename-IPAAci -Value Invoke-FreeIPAAPIAci_Rename -Description "
    Rename an ACI.
    "

New-alias -Name Show-IPAAci -Value Invoke-FreeIPAAPIAci_Show -Description "
    Display a single ACI given an ACI name.
    "

New-alias -Name Test-IPAAdtrustEnabled -Value Invoke-FreeIPAAPIAdtrust_Is_Enabled -Description "Determine whether ipa-adtrust-install has been run on this system"
New-alias -Name Add-IPAAutomember -Value Invoke-FreeIPAAPIAutomember_Add -Description "
    Add an automember rule.
    "

New-alias -Name Add-IPAAutomemberCondition -Value Invoke-FreeIPAAPIAutomember_Add_Condition -Description "
    Add conditions to an automember rule.
    "

New-alias -Name remove-IPAAutomemberDefaultGroup -Value Invoke-FreeIPAAPIAutomember_Default_Group_Remove -Description "
    Remove default (fallback) group for all unmatched entries.
    "

New-alias -Name set-IPAAutomemberDefaultGroup -Value Invoke-FreeIPAAPIAutomember_Default_Group_Set -Description "
    Set default (fallback) group for all unmatched entries.
    "

New-alias -Name show-IPAAutomemberDefaultGroup -Value Invoke-FreeIPAAPIAutomember_Default_Group_Show -Description "
    Display information about the default (fallback) automember groups.
    "

New-alias -Name Remove-IPAAutomember -Value Invoke-FreeIPAAPIAutomember_Del -Description "
    Delete an automember rule.
    "

New-alias -Name Find-IPAAutomember -Value Invoke-FreeIPAAPIAutomember_Find -Description "
    Search for automember rules.
    "

New-alias -Name Set-IPAAutomember -Value Invoke-FreeIPAAPIAutomember_Mod -Description "
    Modify an automember rule.
    "

New-alias -Name Build-IPAAutomember -Value Invoke-FreeIPAAPIAutomember_Rebuild -Description "Rebuild auto membership."
New-alias -Name Remove-IPAAutomemberCondition -Value Invoke-FreeIPAAPIAutomember_Remove_Condition -Description "
    Remove conditions from an automember rule.
    "

New-alias -Name Show-IPAAutomember -Value Invoke-FreeIPAAPIAutomember_Show -Description "
    Display information about an automember rule.
    "

New-alias -Name Add-IPAAutomountkey -Value Invoke-FreeIPAAPIAutomountkey_Add -Description "Create a new automount key."
New-alias -Name Remove-IPAAutomountkey -Value Invoke-FreeIPAAPIAutomountkey_Del -Description "Delete an automount key."
New-alias -Name Find-IPAAutomountkey -Value Invoke-FreeIPAAPIAutomountkey_Find -Description "Search for an automount key."
New-alias -Name Set-IPAAutomountkey -Value Invoke-FreeIPAAPIAutomountkey_Mod -Description "Modify an automount key."
New-alias -Name Show-IPAAutomountkey -Value Invoke-FreeIPAAPIAutomountkey_Show -Description "Display an automount key."
New-alias -Name Add-IPAAutomountlocation -Value Invoke-FreeIPAAPIAutomountlocation_Add -Description "Create a new automount location."
New-alias -Name Remove-IPAAutomountlocation -Value Invoke-FreeIPAAPIAutomountlocation_Del -Description "Delete an automount location."
New-alias -Name Find-IPAAutomountlocation -Value Invoke-FreeIPAAPIAutomountlocation_Find -Description "Search for an automount location."
New-alias -Name Show-IPAAutomountlocation -Value Invoke-FreeIPAAPIAutomountlocation_Show -Description "Display an automount location."
New-alias -Name Build-IPAFilesAutomountlocation -Value Invoke-FreeIPAAPIAutomountlocation_Tofiles -Description "Generate automount files for a specific location."
New-alias -Name Add-IPAAutomountmap -Value Invoke-FreeIPAAPIAutomountmap_Add -Description "Create a new automount map."
New-alias -Name Add-IPAAutomountmapIndirect -Value Invoke-FreeIPAAPIAutomountmap_Add_Indirect -Description "Create a new indirect mount point."
New-alias -Name Remove-IPAAutomountmap -Value Invoke-FreeIPAAPIAutomountmap_Del -Description "Delete an automount map."
New-alias -Name Find-IPAAutomountmap -Value Invoke-FreeIPAAPIAutomountmap_Find -Description "Search for an automount map."
New-alias -Name Set-IPAAutomountmap -Value Invoke-FreeIPAAPIAutomountmap_Mod -Description "Modify an automount map."
New-alias -Name Show-IPAAutomountmap -Value Invoke-FreeIPAAPIAutomountmap_Show -Description "Display an automount map."
New-alias -Name Use-IPABatch -Value Invoke-FreeIPAAPIBatch
New-alias -Name Add-IPACaacl -Value Invoke-FreeIPAAPICaacl_Add -Description "Create a new CA ACL."
New-alias -Name Add-IPACaaclCa -Value Invoke-FreeIPAAPICaacl_Add_Ca -Description "Add CAs to a CA ACL."
New-alias -Name Add-IPACaaclHost -Value Invoke-FreeIPAAPICaacl_Add_Host -Description "Add target hosts and hostgroups to a CA ACL."
New-alias -Name Add-IPACaaclProfile -Value Invoke-FreeIPAAPICaacl_Add_Profile -Description "Add profiles to a CA ACL."
New-alias -Name Add-IPACaaclService -Value Invoke-FreeIPAAPICaacl_Add_Service -Description "Add services to a CA ACL."
New-alias -Name Add-IPACaaclUser -Value Invoke-FreeIPAAPICaacl_Add_User -Description "Add users and groups to a CA ACL."
New-alias -Name Remove-IPACaacl -Value Invoke-FreeIPAAPICaacl_Del -Description "Delete a CA ACL."
New-alias -Name Disable-IPACaacl -Value Invoke-FreeIPAAPICaacl_Disable -Description "Disable a CA ACL."
New-alias -Name Enable-IPACaacl -Value Invoke-FreeIPAAPICaacl_Enable -Description "Enable a CA ACL."
New-alias -Name Find-IPACaacl -Value Invoke-FreeIPAAPICaacl_Find -Description "Search for CA ACLs."
New-alias -Name Set-IPACaacl -Value Invoke-FreeIPAAPICaacl_Mod -Description "Modify a CA ACL."
New-alias -Name Remove-IPACaaclCa -Value Invoke-FreeIPAAPICaacl_Remove_Ca -Description "Remove CAs from a CA ACL."
New-alias -Name Remove-IPACaaclHost -Value Invoke-FreeIPAAPICaacl_Remove_Host -Description "Remove target hosts and hostgroups from a CA ACL."
New-alias -Name Remove-IPACaaclProfile -Value Invoke-FreeIPAAPICaacl_Remove_Profile -Description "Remove profiles from a CA ACL."
New-alias -Name Remove-IPACaaclService -Value Invoke-FreeIPAAPICaacl_Remove_Service -Description "Remove services from a CA ACL."
New-alias -Name Remove-IPACaaclUser -Value Invoke-FreeIPAAPICaacl_Remove_User -Description "Remove users and groups from a CA ACL."
New-alias -Name Show-IPACaacl -Value Invoke-FreeIPAAPICaacl_Show -Description "Display the properties of a CA ACL."
New-alias -Name Add-IPACa -Value Invoke-FreeIPAAPICa_Add -Description "Create a CA."
New-alias -Name Remove-IPACa -Value Invoke-FreeIPAAPICa_Del -Description "Delete a CA."
New-alias -Name Disable-IPACa -Value Invoke-FreeIPAAPICa_Disable -Description "Disable a CA."
New-alias -Name Enable-IPACa -Value Invoke-FreeIPAAPICa_Enable -Description "Enable a CA."
New-alias -Name Find-IPACa -Value Invoke-FreeIPAAPICa_Find -Description "Search for CAs."
New-alias -Name Test-IPACaEnabled -Value Invoke-FreeIPAAPICa_Is_Enabled -Description "
    Checks if any of the servers has the CA service enabled.
    "

New-alias -Name Set-IPACa -Value Invoke-FreeIPAAPICa_Mod -Description "Modify CA configuration."
New-alias -Name Show-IPACa -Value Invoke-FreeIPAAPICa_Show -Description "Display the properties of a CA."
New-alias -Name Set-IPACertmapconfig -Value Invoke-FreeIPAAPICertmapconfig_Mod -Description "Modify Certificate Identity Mapping configuration."
New-alias -Name Show-IPACertmapconfig -Value Invoke-FreeIPAAPICertmapconfig_Show -Description "Show the current Certificate Identity Mapping configuration."
New-alias -Name Add-IPACertmaprule -Value Invoke-FreeIPAAPICertmaprule_Add -Description "Create a new Certificate Identity Mapping Rule."
New-alias -Name Remove-IPACertmaprule -Value Invoke-FreeIPAAPICertmaprule_Del -Description "Delete a Certificate Identity Mapping Rule."
New-alias -Name Disable-IPACertmaprule -Value Invoke-FreeIPAAPICertmaprule_Disable -Description "Disable a Certificate Identity Mapping Rule."
New-alias -Name Enable-IPACertmaprule -Value Invoke-FreeIPAAPICertmaprule_Enable -Description "Enable a Certificate Identity Mapping Rule."
New-alias -Name Find-IPACertmaprule -Value Invoke-FreeIPAAPICertmaprule_Find -Description "Search for Certificate Identity Mapping Rules."
New-alias -Name Set-IPACertmaprule -Value Invoke-FreeIPAAPICertmaprule_Mod -Description "Modify a Certificate Identity Mapping Rule."
New-alias -Name Show-IPACertmaprule -Value Invoke-FreeIPAAPICertmaprule_Show -Description "Display information about a Certificate Identity Mapping Rule."
New-alias -Name Search-IPAMatchCertmap -Value Invoke-FreeIPAAPICertmap_Match -Description "
    Search for users matching the provided certificate.

    This command relies on SSSD to retrieve the list of matching users and
    may return cached data. For more information on purging SSSD cache,
    please refer to sss_cache documentation.
    "

New-alias -Name Remove-IPACertprofile -Value Invoke-FreeIPAAPICertprofile_Del -Description "Delete a Certificate Profile."
New-alias -Name Find-IPACertprofile -Value Invoke-FreeIPAAPICertprofile_Find -Description "Search for Certificate Profiles."
New-alias -Name Import-IPACertprofile -Value Invoke-FreeIPAAPICertprofile_Import -Description "Import a Certificate Profile."
New-alias -Name Set-IPACertprofile -Value Invoke-FreeIPAAPICertprofile_Mod -Description "Modify Certificate Profile configuration."
New-alias -Name Show-IPACertprofile -Value Invoke-FreeIPAAPICertprofile_Show -Description "Display the properties of a Certificate Profile."
New-alias -Name Find-IPACert -Value Invoke-FreeIPAAPICert_Find -Description "Search for existing certificates."
New-alias -Name Remove-IPACertHold -Value Invoke-FreeIPAAPICert_Remove_Hold -Description "Take a revoked certificate off hold."
New-alias -Name Request-IPACert -Value Invoke-FreeIPAAPICert_Request -Description "Submit a certificate signing request."
New-alias -Name Revoke-IPACert -Value Invoke-FreeIPAAPICert_Revoke -Description "Revoke a certificate."
New-alias -Name Show-IPACert -Value Invoke-FreeIPAAPICert_Show -Description "Retrieve an existing certificate."
New-alias -Name Get-IPAStatusCert -Value Invoke-FreeIPAAPICert_Status -Description "Check the status of a certificate signing request."
New-alias -Name Find-IPAClass -Value Invoke-FreeIPAAPIClass_Find -Description "Search for classes."
New-alias -Name Show-IPAClass -Value Invoke-FreeIPAAPIClass_Show -Description "Display information about a class."
New-alias -Name Get-IPADefaultsDefaults -Value Invoke-FreeIPAAPICommand_Defaults
New-alias -Name Find-IPACommand -Value Invoke-FreeIPAAPICommand_Find -Description "Search for commands."
New-alias -Name Show-IPACommand -Value Invoke-FreeIPAAPICommand_Show -Description "Display information about a command."
New-alias -Name Test-IPACompatEnabled -Value Invoke-FreeIPAAPICompat_Is_Enabled -Description "Determine whether Schema Compatibility plugin is configured to serve trusted domain users and groups"
New-alias -Name Set-IPAConfig -Value Invoke-FreeIPAAPIConfig_Mod -Description "Modify configuration options."
New-alias -Name Show-IPAConfig -Value Invoke-FreeIPAAPIConfig_Show -Description "Show the current configuration."
New-alias -Name Add-IPACosentry -Value Invoke-FreeIPAAPICosentry_Add
New-alias -Name Remove-IPACosentry -Value Invoke-FreeIPAAPICosentry_Del
New-alias -Name Find-IPACosentry -Value Invoke-FreeIPAAPICosentry_Find
New-alias -Name Set-IPACosentry -Value Invoke-FreeIPAAPICosentry_Mod
New-alias -Name Show-IPACosentry -Value Invoke-FreeIPAAPICosentry_Show
New-alias -Name Add-IPADelegation -Value Invoke-FreeIPAAPIDelegation_Add -Description "Add a new delegation."
New-alias -Name Remove-IPADelegation -Value Invoke-FreeIPAAPIDelegation_Del -Description "Delete a delegation."
New-alias -Name Find-IPADelegation -Value Invoke-FreeIPAAPIDelegation_Find -Description "Search for delegations."
New-alias -Name Set-IPADelegation -Value Invoke-FreeIPAAPIDelegation_Mod -Description "Modify a delegation."
New-alias -Name Show-IPADelegation -Value Invoke-FreeIPAAPIDelegation_Show -Description "Display information about a delegation."
New-alias -Name Set-IPADnsconfig -Value Invoke-FreeIPAAPIDnsconfig_Mod -Description "Modify global DNS configuration."
New-alias -Name Show-IPADnsconfig -Value Invoke-FreeIPAAPIDnsconfig_Show -Description "Show the current global DNS configuration."
New-alias -Name Add-IPADnsforwardzone -Value Invoke-FreeIPAAPIDnsforwardzone_Add -Description "Create new DNS forward zone."
New-alias -Name Add-IPADnsforwardzonePermission -Value Invoke-FreeIPAAPIDnsforwardzone_Add_Permission -Description "Add a permission for per-forward zone access delegation."
New-alias -Name Remove-IPADnsforwardzone -Value Invoke-FreeIPAAPIDnsforwardzone_Del -Description "Delete DNS forward zone."
New-alias -Name Disable-IPADnsforwardzone -Value Invoke-FreeIPAAPIDnsforwardzone_Disable -Description "Disable DNS Forward Zone."
New-alias -Name Enable-IPADnsforwardzone -Value Invoke-FreeIPAAPIDnsforwardzone_Enable -Description "Enable DNS Forward Zone."
New-alias -Name Find-IPADnsforwardzone -Value Invoke-FreeIPAAPIDnsforwardzone_Find -Description "Search for DNS forward zones."
New-alias -Name Set-IPADnsforwardzone -Value Invoke-FreeIPAAPIDnsforwardzone_Mod -Description "Modify DNS forward zone."
New-alias -Name Remove-IPADnsforwardzonePermission -Value Invoke-FreeIPAAPIDnsforwardzone_Remove_Permission -Description "Remove a permission for per-forward zone access delegation."
New-alias -Name Show-IPADnsforwardzone -Value Invoke-FreeIPAAPIDnsforwardzone_Show -Description "Display information about a DNS forward zone."
New-alias -Name Add-IPADnsrecord -Value Invoke-FreeIPAAPIDnsrecord_Add -Description "Add new DNS resource record."
New-alias -Name Remove-IPADnsrecord -Value Invoke-FreeIPAAPIDnsrecord_Del -Description "Delete DNS resource record."
New-alias -Name Remove-IPADnsrecordEntry -Value Invoke-FreeIPAAPIDnsrecord_Delentry -Description "
    Delete DNS record entry.
    "

New-alias -Name Find-IPADnsrecord -Value Invoke-FreeIPAAPIDnsrecord_Find -Description "Search for DNS resources."
New-alias -Name Set-IPADnsrecord -Value Invoke-FreeIPAAPIDnsrecord_Mod -Description "Modify a DNS resource record."
New-alias -Name Show-IPADnsrecord -Value Invoke-FreeIPAAPIDnsrecord_Show -Description "Display DNS resource."
New-alias -Name Split-IPADnsrecordParts -Value Invoke-FreeIPAAPIDnsrecord_Split_Parts
New-alias -Name Find-IPADnsserver -Value Invoke-FreeIPAAPIDnsserver_Find -Description "Search for DNS servers."
New-alias -Name Set-IPADnsserver -Value Invoke-FreeIPAAPIDnsserver_Mod -Description "Modify DNS server configuration"
New-alias -Name Show-IPADnsserver -Value Invoke-FreeIPAAPIDnsserver_Show -Description "Display configuration of a DNS server."
New-alias -Name Add-IPADnszone -Value Invoke-FreeIPAAPIDnszone_Add -Description "Create new DNS zone (SOA record)."
New-alias -Name Add-IPADnszonePermission -Value Invoke-FreeIPAAPIDnszone_Add_Permission -Description "Add a permission for per-zone access delegation."
New-alias -Name Remove-IPADnszone -Value Invoke-FreeIPAAPIDnszone_Del -Description "Delete DNS zone (SOA record)."
New-alias -Name Disable-IPADnszone -Value Invoke-FreeIPAAPIDnszone_Disable -Description "Disable DNS Zone."
New-alias -Name Enable-IPADnszone -Value Invoke-FreeIPAAPIDnszone_Enable -Description "Enable DNS Zone."
New-alias -Name Find-IPADnszone -Value Invoke-FreeIPAAPIDnszone_Find -Description "Search for DNS zones (SOA records)."
New-alias -Name Set-IPADnszone -Value Invoke-FreeIPAAPIDnszone_Mod -Description "Modify DNS zone (SOA record)."
New-alias -Name Remove-IPADnszonePermission -Value Invoke-FreeIPAAPIDnszone_Remove_Permission -Description "Remove a permission for per-zone access delegation."
New-alias -Name Show-IPADnszone -Value Invoke-FreeIPAAPIDnszone_Show -Description "Display information about a DNS zone (SOA record)."
New-alias -Name Test-IPADnsEnabled -Value Invoke-FreeIPAAPIDns_Is_Enabled -Description "
    Checks if any of the servers has the DNS service enabled.
    "

New-alias -Name Resolve-IPADns -Value Invoke-FreeIPAAPIDns_Resolve -Description "Resolve a host name in DNS. (Deprecated)"
New-alias -Name Update-IPADnsSystemRecords -Value Invoke-FreeIPAAPIDns_Update_System_Records -Description "Update location and IPA server DNS records"
New-alias -Name Get-IPADomainlevel -Value Invoke-FreeIPAAPIDomainlevel_Get -Description "Query current Domain Level."
New-alias -Name Set-IPADomainlevel -Value Invoke-FreeIPAAPIDomainlevel_Set -Description "Change current Domain Level."
New-alias -Name Use-IPAEnv -Value Invoke-FreeIPAAPIEnv -Description "Show environment variables."
New-alias -Name Add-IPAGroup -Value Invoke-FreeIPAAPIGroup_Add -Description "Create a new group."
New-alias -Name Add-IPAGroupMember -Value Invoke-FreeIPAAPIGroup_Add_Member -Description "Add members to a group."
New-alias -Name Remove-IPAGroup -Value Invoke-FreeIPAAPIGroup_Del -Description "Delete group."
New-alias -Name Remove-IPAManagedGroup -Value Invoke-FreeIPAAPIGroup_Detach -Description "Detach a managed group from a user."
New-alias -Name Find-IPAGroup -Value Invoke-FreeIPAAPIGroup_Find -Description "Search for groups."
New-alias -Name Set-IPAGroup -Value Invoke-FreeIPAAPIGroup_Mod -Description "Modify a group."
New-alias -Name Remove-IPAGroupMember -Value Invoke-FreeIPAAPIGroup_Remove_Member -Description "Remove members from a group."
New-alias -Name Show-IPAGroup -Value Invoke-FreeIPAAPIGroup_Show -Description "Display information about a named group."
New-alias -Name Add-IPAHbacrule -Value Invoke-FreeIPAAPIHbacrule_Add -Description "Create a new HBAC rule."
New-alias -Name Add-IPAHbacruleHost -Value Invoke-FreeIPAAPIHbacrule_Add_Host -Description "Add target hosts and hostgroups to an HBAC rule."
New-alias -Name Add-IPAHbacruleService -Value Invoke-FreeIPAAPIHbacrule_Add_Service -Description "Add services to an HBAC rule."
New-alias -Name Add-IPAHbacruleSourcehost -Value Invoke-FreeIPAAPIHbacrule_Add_Sourcehost
New-alias -Name Add-IPAHbacruleUser -Value Invoke-FreeIPAAPIHbacrule_Add_User -Description "Add users and groups to an HBAC rule."
New-alias -Name Remove-IPAHbacrule -Value Invoke-FreeIPAAPIHbacrule_Del -Description "Delete an HBAC rule."
New-alias -Name Disable-IPAHbacrule -Value Invoke-FreeIPAAPIHbacrule_Disable -Description "Disable an HBAC rule."
New-alias -Name Enable-IPAHbacrule -Value Invoke-FreeIPAAPIHbacrule_Enable -Description "Enable an HBAC rule."
New-alias -Name Find-IPAHbacrule -Value Invoke-FreeIPAAPIHbacrule_Find -Description "Search for HBAC rules."
New-alias -Name Set-IPAHbacrule -Value Invoke-FreeIPAAPIHbacrule_Mod -Description "Modify an HBAC rule."
New-alias -Name Remove-IPAHbacruleHost -Value Invoke-FreeIPAAPIHbacrule_Remove_Host -Description "Remove target hosts and hostgroups from an HBAC rule."
New-alias -Name Remove-IPAHbacruleService -Value Invoke-FreeIPAAPIHbacrule_Remove_Service -Description "Remove service and service groups from an HBAC rule."
New-alias -Name Remove-IPAHbacruleSourcehost -Value Invoke-FreeIPAAPIHbacrule_Remove_Sourcehost
New-alias -Name Remove-IPAHbacruleUser -Value Invoke-FreeIPAAPIHbacrule_Remove_User -Description "Remove users and groups from an HBAC rule."
New-alias -Name Show-IPAHbacrule -Value Invoke-FreeIPAAPIHbacrule_Show -Description "Display the properties of an HBAC rule."
New-alias -Name Add-IPAHbacsvcgroup -Value Invoke-FreeIPAAPIHbacsvcgroup_Add -Description "Add a new HBAC service group."
New-alias -Name Add-IPAHbacsvcgroupMember -Value Invoke-FreeIPAAPIHbacsvcgroup_Add_Member -Description "Add members to an HBAC service group."
New-alias -Name Remove-IPAHbacsvcgroup -Value Invoke-FreeIPAAPIHbacsvcgroup_Del -Description "Delete an HBAC service group."
New-alias -Name Find-IPAHbacsvcgroup -Value Invoke-FreeIPAAPIHbacsvcgroup_Find -Description "Search for an HBAC service group."
New-alias -Name Set-IPAHbacsvcgroup -Value Invoke-FreeIPAAPIHbacsvcgroup_Mod -Description "Modify an HBAC service group."
New-alias -Name Remove-IPAHbacsvcgroupMember -Value Invoke-FreeIPAAPIHbacsvcgroup_Remove_Member -Description "Remove members from an HBAC service group."
New-alias -Name Show-IPAHbacsvcgroup -Value Invoke-FreeIPAAPIHbacsvcgroup_Show -Description "Display information about an HBAC service group."
New-alias -Name Add-IPAHbacsvc -Value Invoke-FreeIPAAPIHbacsvc_Add -Description "Add a new HBAC service."
New-alias -Name Remove-IPAHbacsvc -Value Invoke-FreeIPAAPIHbacsvc_Del -Description "Delete an existing HBAC service."
New-alias -Name Find-IPAHbacsvc -Value Invoke-FreeIPAAPIHbacsvc_Find -Description "Search for HBAC services."
New-alias -Name Set-IPAHbacsvc -Value Invoke-FreeIPAAPIHbacsvc_Mod -Description "Modify an HBAC service."
New-alias -Name Show-IPAHbacsvc -Value Invoke-FreeIPAAPIHbacsvc_Show -Description "Display information about an HBAC service."
New-alias -Name Use-IPAHbactest -Value Invoke-FreeIPAAPIHbactest -Description "Simulate use of Host-based access controls"
New-alias -Name Add-IPAHostgroup -Value Invoke-FreeIPAAPIHostgroup_Add -Description "Add a new hostgroup."
New-alias -Name Add-IPAHostgroupMember -Value Invoke-FreeIPAAPIHostgroup_Add_Member -Description "Add members to a hostgroup."
New-alias -Name Remove-IPAHostgroup -Value Invoke-FreeIPAAPIHostgroup_Del -Description "Delete a hostgroup."
New-alias -Name Find-IPAHostgroup -Value Invoke-FreeIPAAPIHostgroup_Find -Description "Search for hostgroups."
New-alias -Name Set-IPAHostgroup -Value Invoke-FreeIPAAPIHostgroup_Mod -Description "Modify a hostgroup."
New-alias -Name Remove-IPAHostgroupMember -Value Invoke-FreeIPAAPIHostgroup_Remove_Member -Description "Remove members from a hostgroup."
New-alias -Name Show-IPAHostgroup -Value Invoke-FreeIPAAPIHostgroup_Show -Description "Display information about a hostgroup."
New-alias -Name Add-IPAHost -Value Invoke-FreeIPAAPIHost_Add -Description "Add a new host."
New-alias -Name Add-IPAHostCert -Value Invoke-FreeIPAAPIHost_Add_Cert -Description "Add certificates to host entry"
New-alias -Name Add-IPAHostManagedby -Value Invoke-FreeIPAAPIHost_Add_Managedby -Description "Add hosts that can manage this host."
New-alias -Name Add-IPAHostPrincipal -Value Invoke-FreeIPAAPIHost_Add_Principal -Description "Add new principal alias to host entry"
New-alias -Name Approve-IPAHostCreateKeytab -Value Invoke-FreeIPAAPIHost_Allow_Create_Keytab -Description "Allow users, groups, hosts or host groups to create a keytab of this host."
New-alias -Name Approve-IPAHostRetrieveKeytab -Value Invoke-FreeIPAAPIHost_Allow_Retrieve_Keytab -Description "Allow users, groups, hosts or host groups to retrieve a keytab of this host."
New-alias -Name Remove-IPAHost -Value Invoke-FreeIPAAPIHost_Del -Description "Delete a host."
New-alias -Name Disable-IPAHost -Value Invoke-FreeIPAAPIHost_Disable -Description "Disable the Kerberos key, SSL certificate and all services of a host."
New-alias -Name Deny-IPAHostCreateKeytab -Value Invoke-FreeIPAAPIHost_Disallow_Create_Keytab -Description "Disallow users, groups, hosts or host groups to create a keytab of this host."
New-alias -Name Deny-IPAHostRetrieveKeytab -Value Invoke-FreeIPAAPIHost_Disallow_Retrieve_Keytab -Description "Disallow users, groups, hosts or host groups to retrieve a keytab of this host."
New-alias -Name Find-IPAHost -Value Invoke-FreeIPAAPIHost_Find -Description "Search for hosts."
New-alias -Name Set-IPAHost -Value Invoke-FreeIPAAPIHost_Mod -Description "Modify information about a host."
New-alias -Name Remove-IPAHostCert -Value Invoke-FreeIPAAPIHost_Remove_Cert -Description "Remove certificates from host entry"
New-alias -Name Remove-IPAHostManagedby -Value Invoke-FreeIPAAPIHost_Remove_Managedby -Description "Remove hosts that can manage this host."
New-alias -Name Remove-IPAHostPrincipal -Value Invoke-FreeIPAAPIHost_Remove_Principal -Description "Remove principal alias from a host entry"
New-alias -Name Show-IPAHost -Value Invoke-FreeIPAAPIHost_Show -Description "Display information about a host."
New-alias -Name Get-IPAMessagesI18n -Value Invoke-FreeIPAAPII18n_Messages
New-alias -Name Add-IPAIdoverridegroup -Value Invoke-FreeIPAAPIIdoverridegroup_Add -Description "Add a new Group ID override."
New-alias -Name Remove-IPAIdoverridegroup -Value Invoke-FreeIPAAPIIdoverridegroup_Del -Description "Delete an Group ID override."
New-alias -Name Find-IPAIdoverridegroup -Value Invoke-FreeIPAAPIIdoverridegroup_Find -Description "Search for an Group ID override."
New-alias -Name Set-IPAIdoverridegroup -Value Invoke-FreeIPAAPIIdoverridegroup_Mod -Description "Modify an Group ID override."
New-alias -Name Show-IPAIdoverridegroup -Value Invoke-FreeIPAAPIIdoverridegroup_Show -Description "Display information about an Group ID override."
New-alias -Name Add-IPAIdoverrideuser -Value Invoke-FreeIPAAPIIdoverrideuser_Add -Description "Add a new User ID override."
New-alias -Name Add-IPAIdoverrideuserCert -Value Invoke-FreeIPAAPIIdoverrideuser_Add_Cert -Description "Add one or more certificates to the idoverrideuser entry"
New-alias -Name Remove-IPAIdoverrideuser -Value Invoke-FreeIPAAPIIdoverrideuser_Del -Description "Delete an User ID override."
New-alias -Name Find-IPAIdoverrideuser -Value Invoke-FreeIPAAPIIdoverrideuser_Find -Description "Search for an User ID override."
New-alias -Name Set-IPAIdoverrideuser -Value Invoke-FreeIPAAPIIdoverrideuser_Mod -Description "Modify an User ID override."
New-alias -Name Remove-IPAIdoverrideuserCert -Value Invoke-FreeIPAAPIIdoverrideuser_Remove_Cert -Description "Remove one or more certificates to the idoverrideuser entry"
New-alias -Name Show-IPAIdoverrideuser -Value Invoke-FreeIPAAPIIdoverrideuser_Show -Description "Display information about an User ID override."
New-alias -Name Add-IPAIdrange -Value Invoke-FreeIPAAPIIdrange_Add -Description "
    Add new ID range.

    To add a new ID range you always have to specify

        --base-id
        --range-size

    Additionally

        --rid-base
        --secondary-rid-base

    may be given for a new ID range for the local domain while

        --rid-base
        --dom-sid

    must be given to add a new range for a trusted AD domain.

=======
WARNING:

DNA plugin in 389-ds will allocate IDs based on the ranges configured for the
local domain. Currently the DNA plugin *cannot* be reconfigured itself based
on the local ranges set via this family of commands.

Manual configuration change has to be done in the DNA plugin configuration for
the new local range. Specifically, The dnaNextRange attribute of 'cn=Posix
IDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config' has to be
modified to match the new range.
=======

"

New-alias -Name Remove-IPAIdrange -Value Invoke-FreeIPAAPIIdrange_Del -Description "Delete an ID range."
New-alias -Name Find-IPAIdrange -Value Invoke-FreeIPAAPIIdrange_Find -Description "Search for ranges."
New-alias -Name Set-IPAIdrange -Value Invoke-FreeIPAAPIIdrange_Mod -Description "Modify ID range.

=======
WARNING:

DNA plugin in 389-ds will allocate IDs based on the ranges configured for the
local domain. Currently the DNA plugin *cannot* be reconfigured itself based
on the local ranges set via this family of commands.

Manual configuration change has to be done in the DNA plugin configuration for
the new local range. Specifically, The dnaNextRange attribute of 'cn=Posix
IDs,cn=Distributed Numeric Assignment Plugin,cn=plugins,cn=config' has to be
modified to match the new range.
=======

"

New-alias -Name Show-IPAIdrange -Value Invoke-FreeIPAAPIIdrange_Show -Description "Display information about a range."
New-alias -Name Add-IPAIdview -Value Invoke-FreeIPAAPIIdview_Add -Description "Add a new ID View."
New-alias -Name Publish-IPAIdview -Value Invoke-FreeIPAAPIIdview_Apply -Description "Applies ID View to specified hosts or current members of specified hostgroups. If any other ID View is applied to the host, it is overridden."
New-alias -Name Remove-IPAIdview -Value Invoke-FreeIPAAPIIdview_Del -Description "Delete an ID View."
New-alias -Name Find-IPAIdview -Value Invoke-FreeIPAAPIIdview_Find -Description "Search for an ID View."
New-alias -Name Set-IPAIdview -Value Invoke-FreeIPAAPIIdview_Mod -Description "Modify an ID View."
New-alias -Name Show-IPAIdview -Value Invoke-FreeIPAAPIIdview_Show -Description "Display information about an ID View."
New-alias -Name Undo-IPAIdview -Value Invoke-FreeIPAAPIIdview_Unapply -Description "Clears ID View from specified hosts or current members of specified hostgroups."
New-alias -Name Use-IPAJoin -Value Invoke-FreeIPAAPIJoin -Description "Join an IPA domain"
New-alias -Name Get-IPAMetadata -Value Invoke-FreeIPAAPIJson_Metadata -Description "
    Export plugin meta-data for the webUI.
    "

New-alias -Name Test-IPAKraEnabled -Value Invoke-FreeIPAAPIKra_Is_Enabled
New-alias -Name Set-IPAKrbtpolicy -Value Invoke-FreeIPAAPIKrbtpolicy_Mod -Description "Modify Kerberos ticket policy."
New-alias -Name Reset-IPAKrbtpolicy -Value Invoke-FreeIPAAPIKrbtpolicy_Reset -Description "Reset Kerberos ticket policy to the default values."
New-alias -Name Show-IPAKrbtpolicy -Value Invoke-FreeIPAAPIKrbtpolicy_Show -Description "Display the current Kerberos ticket policy."
New-alias -Name Add-IPALocation -Value Invoke-FreeIPAAPILocation_Add -Description "Add a new IPA location."
New-alias -Name Remove-IPALocation -Value Invoke-FreeIPAAPILocation_Del -Description "Delete an IPA location."
New-alias -Name Find-IPALocation -Value Invoke-FreeIPAAPILocation_Find -Description "Search for IPA locations."
New-alias -Name Set-IPALocation -Value Invoke-FreeIPAAPILocation_Mod -Description "Modify information about an IPA location."
New-alias -Name Show-IPALocation -Value Invoke-FreeIPAAPILocation_Show -Description "Display information about an IPA location."
New-alias -Name Do-IPADsMigrate -Value Invoke-FreeIPAAPIMigrate_Ds -Description "Migrate users and groups from DS to IPA."
New-alias -Name Add-IPANetgroup -Value Invoke-FreeIPAAPINetgroup_Add -Description "Add a new netgroup."
New-alias -Name Add-IPANetgroupMember -Value Invoke-FreeIPAAPINetgroup_Add_Member -Description "Add members to a netgroup."
New-alias -Name Remove-IPANetgroup -Value Invoke-FreeIPAAPINetgroup_Del -Description "Delete a netgroup."
New-alias -Name Find-IPANetgroup -Value Invoke-FreeIPAAPINetgroup_Find -Description "Search for a netgroup."
New-alias -Name Set-IPANetgroup -Value Invoke-FreeIPAAPINetgroup_Mod -Description "Modify a netgroup."
New-alias -Name Remove-IPANetgroupMember -Value Invoke-FreeIPAAPINetgroup_Remove_Member -Description "Remove members from a netgroup."
New-alias -Name Show-IPANetgroup -Value Invoke-FreeIPAAPINetgroup_Show -Description "Display information about a netgroup."
New-alias -Name Set-IPAOtpconfig -Value Invoke-FreeIPAAPIOtpconfig_Mod -Description "Modify OTP configuration options."
New-alias -Name Show-IPAOtpconfig -Value Invoke-FreeIPAAPIOtpconfig_Show -Description "Show the current OTP configuration."
New-alias -Name Add-IPAOtptoken -Value Invoke-FreeIPAAPIOtptoken_Add -Description "Add a new OTP token."
New-alias -Name Add-IPAOtptokenManagedby -Value Invoke-FreeIPAAPIOtptoken_Add_Managedby -Description "Add users that can manage this token."
New-alias -Name Remove-IPAOtptoken -Value Invoke-FreeIPAAPIOtptoken_Del -Description "Delete an OTP token."
New-alias -Name Find-IPAOtptoken -Value Invoke-FreeIPAAPIOtptoken_Find -Description "Search for OTP token."
New-alias -Name Set-IPAOtptoken -Value Invoke-FreeIPAAPIOtptoken_Mod -Description "Modify a OTP token."
New-alias -Name Remove-IPAOtptokenManagedby -Value Invoke-FreeIPAAPIOtptoken_Remove_Managedby -Description "Remove users that can manage this token."
New-alias -Name Show-IPAOtptoken -Value Invoke-FreeIPAAPIOtptoken_Show -Description "Display information about an OTP token."
New-alias -Name Find-IPAOutput -Value Invoke-FreeIPAAPIOutput_Find -Description "Search for command outputs."
New-alias -Name Show-IPAOutput -Value Invoke-FreeIPAAPIOutput_Show -Description "Display information about a command output."
New-alias -Name Find-IPAParam -Value Invoke-FreeIPAAPIParam_Find -Description "Search command parameters."
New-alias -Name Show-IPAParam -Value Invoke-FreeIPAAPIParam_Show -Description "Display information about a command parameter."
New-alias -Name Use-IPAPasswd -Value Invoke-FreeIPAAPIPasswd -Description "Set a user's password."
New-alias -Name Add-IPAPermission -Value Invoke-FreeIPAAPIPermission_Add -Description "Add a new permission."
New-alias -Name Add-IPAPermissionMember -Value Invoke-FreeIPAAPIPermission_Add_Member -Description "Add members to a permission."
New-alias -Name Add-IPAPermissionNoaci -Value Invoke-FreeIPAAPIPermission_Add_Noaci -Description "Add a system permission without an ACI (internal command)"
New-alias -Name Remove-IPAPermission -Value Invoke-FreeIPAAPIPermission_Del -Description "Delete a permission."
New-alias -Name Find-IPAPermission -Value Invoke-FreeIPAAPIPermission_Find -Description "Search for permissions."
New-alias -Name Set-IPAPermission -Value Invoke-FreeIPAAPIPermission_Mod -Description "Modify a permission."
New-alias -Name Remove-IPAPermissionMember -Value Invoke-FreeIPAAPIPermission_Remove_Member -Description "Remove members from a permission."
New-alias -Name Show-IPAPermission -Value Invoke-FreeIPAAPIPermission_Show -Description "Display information about a permission."
New-alias -Name Use-IPAPing -Value Invoke-FreeIPAAPIPing -Description "Ping a remote server."
New-alias -Name Get-IPAStatusPkinit -Value Invoke-FreeIPAAPIPkinit_Status -Description "Report PKINIT status on the IPA masters"
New-alias -Name Use-IPAPlugins -Value Invoke-FreeIPAAPIPlugins -Description "Show all loaded plugins."
New-alias -Name Add-IPAPrivilege -Value Invoke-FreeIPAAPIPrivilege_Add -Description "Add a new privilege."
New-alias -Name Add-IPAPrivilegeMember -Value Invoke-FreeIPAAPIPrivilege_Add_Member -Description "Add members to a privilege."
New-alias -Name Add-IPAPrivilegePermission -Value Invoke-FreeIPAAPIPrivilege_Add_Permission -Description "Add permissions to a privilege."
New-alias -Name Remove-IPAPrivilege -Value Invoke-FreeIPAAPIPrivilege_Del -Description "Delete a privilege."
New-alias -Name Find-IPAPrivilege -Value Invoke-FreeIPAAPIPrivilege_Find -Description "Search for privileges."
New-alias -Name Set-IPAPrivilege -Value Invoke-FreeIPAAPIPrivilege_Mod -Description "Modify a privilege."
New-alias -Name Remove-IPAPrivilegeMember -Value Invoke-FreeIPAAPIPrivilege_Remove_Member -Description "
    Remove members from a privilege
    "

New-alias -Name Remove-IPAPrivilegePermission -Value Invoke-FreeIPAAPIPrivilege_Remove_Permission -Description "Remove permissions from a privilege."
New-alias -Name Show-IPAPrivilege -Value Invoke-FreeIPAAPIPrivilege_Show -Description "Display information about a privilege."
New-alias -Name Add-IPAPwpolicy -Value Invoke-FreeIPAAPIPwpolicy_Add -Description "Add a new group password policy."
New-alias -Name Remove-IPAPwpolicy -Value Invoke-FreeIPAAPIPwpolicy_Del -Description "Delete a group password policy."
New-alias -Name Find-IPAPwpolicy -Value Invoke-FreeIPAAPIPwpolicy_Find -Description "Search for group password policies."
New-alias -Name Set-IPAPwpolicy -Value Invoke-FreeIPAAPIPwpolicy_Mod -Description "Modify a group password policy."
New-alias -Name Show-IPAPwpolicy -Value Invoke-FreeIPAAPIPwpolicy_Show -Description "Display information about password policy."
New-alias -Name Add-IPARadiusproxy -Value Invoke-FreeIPAAPIRadiusproxy_Add -Description "Add a new RADIUS proxy server."
New-alias -Name Remove-IPARadiusproxy -Value Invoke-FreeIPAAPIRadiusproxy_Del -Description "Delete a RADIUS proxy server."
New-alias -Name Find-IPARadiusproxy -Value Invoke-FreeIPAAPIRadiusproxy_Find -Description "Search for RADIUS proxy servers."
New-alias -Name Set-IPARadiusproxy -Value Invoke-FreeIPAAPIRadiusproxy_Mod -Description "Modify a RADIUS proxy server."
New-alias -Name Show-IPARadiusproxy -Value Invoke-FreeIPAAPIRadiusproxy_Show -Description "Display information about a RADIUS proxy server."
New-alias -Name Set-IPARealmdomains -Value Invoke-FreeIPAAPIRealmdomains_Mod -Description "
    Modify realm domains

    DNS check: When manually adding a domain to the list, a DNS check is
    performed by default. It ensures that the domain is associated with
    the IPA realm, by checking whether the domain has a _kerberos TXT record
    containing the IPA realm name. This check can be skipped by specifying
    --force option.

    Removal: when a realm domain which has a matching DNS zone managed by
    IPA is being removed, a corresponding _kerberos TXT record in the zone is
    removed automatically as well. Other records in the zone or the zone
    itself are not affected.
    "

New-alias -Name Show-IPARealmdomains -Value Invoke-FreeIPAAPIRealmdomains_Show -Description "Display the list of realm domains."
New-alias -Name Add-IPARole -Value Invoke-FreeIPAAPIRole_Add -Description "Add a new role."
New-alias -Name Add-IPARoleMember -Value Invoke-FreeIPAAPIRole_Add_Member -Description "Add members to a role."
New-alias -Name Add-IPARolePrivilege -Value Invoke-FreeIPAAPIRole_Add_Privilege -Description "Add privileges to a role."
New-alias -Name Remove-IPARole -Value Invoke-FreeIPAAPIRole_Del -Description "Delete a role."
New-alias -Name Find-IPARole -Value Invoke-FreeIPAAPIRole_Find -Description "Search for roles."
New-alias -Name Set-IPARole -Value Invoke-FreeIPAAPIRole_Mod -Description "Modify a role."
New-alias -Name Remove-IPARoleMember -Value Invoke-FreeIPAAPIRole_Remove_Member -Description "Remove members from a role."
New-alias -Name Remove-IPARolePrivilege -Value Invoke-FreeIPAAPIRole_Remove_Privilege -Description "Remove privileges from a role."
New-alias -Name Show-IPARole -Value Invoke-FreeIPAAPIRole_Show -Description "Display information about a role."
New-alias -Name Use-IPASchema -Value Invoke-FreeIPAAPISchema
New-alias -Name Add-IPASelfservice -Value Invoke-FreeIPAAPISelfservice_Add -Description "Add a new self-service permission."
New-alias -Name Remove-IPASelfservice -Value Invoke-FreeIPAAPISelfservice_Del -Description "Delete a self-service permission."
New-alias -Name Find-IPASelfservice -Value Invoke-FreeIPAAPISelfservice_Find -Description "Search for a self-service permission."
New-alias -Name Set-IPASelfservice -Value Invoke-FreeIPAAPISelfservice_Mod -Description "Modify a self-service permission."
New-alias -Name Show-IPASelfservice -Value Invoke-FreeIPAAPISelfservice_Show -Description "Display information about a self-service permission."
New-alias -Name Add-IPASelinuxusermap -Value Invoke-FreeIPAAPISelinuxusermap_Add -Description "Create a new SELinux User Map."
New-alias -Name Add-IPASelinuxusermapHost -Value Invoke-FreeIPAAPISelinuxusermap_Add_Host -Description "Add target hosts and hostgroups to an SELinux User Map rule."
New-alias -Name Add-IPASelinuxusermapUser -Value Invoke-FreeIPAAPISelinuxusermap_Add_User -Description "Add users and groups to an SELinux User Map rule."
New-alias -Name Remove-IPASelinuxusermap -Value Invoke-FreeIPAAPISelinuxusermap_Del -Description "Delete a SELinux User Map."
New-alias -Name Disable-IPASelinuxusermap -Value Invoke-FreeIPAAPISelinuxusermap_Disable -Description "Disable an SELinux User Map rule."
New-alias -Name Enable-IPASelinuxusermap -Value Invoke-FreeIPAAPISelinuxusermap_Enable -Description "Enable an SELinux User Map rule."
New-alias -Name Find-IPASelinuxusermap -Value Invoke-FreeIPAAPISelinuxusermap_Find -Description "Search for SELinux User Maps."
New-alias -Name Set-IPASelinuxusermap -Value Invoke-FreeIPAAPISelinuxusermap_Mod -Description "Modify a SELinux User Map."
New-alias -Name Remove-IPASelinuxusermapHost -Value Invoke-FreeIPAAPISelinuxusermap_Remove_Host -Description "Remove target hosts and hostgroups from an SELinux User Map rule."
New-alias -Name Remove-IPASelinuxusermapUser -Value Invoke-FreeIPAAPISelinuxusermap_Remove_User -Description "Remove users and groups from an SELinux User Map rule."
New-alias -Name Show-IPASelinuxusermap -Value Invoke-FreeIPAAPISelinuxusermap_Show -Description "Display the properties of a SELinux User Map rule."
New-alias -Name Test-IPAConnection -Value Invoke-FreeIPAAPIServer_Conncheck -Description "Check connection to remote IPA server."
New-alias -Name Remove-IPAServer -Value Invoke-FreeIPAAPIServer_Del -Description "Delete IPA server."
New-alias -Name Find-IPAServer -Value Invoke-FreeIPAAPIServer_Find -Description "Search for IPA servers."
New-alias -Name Set-IPAServer -Value Invoke-FreeIPAAPIServer_Mod -Description "Modify information about an IPA server."
New-alias -Name Find-IPAServerRole -Value Invoke-FreeIPAAPIServer_Role_Find -Description "Find a server role on a server(s)"
New-alias -Name Show-IPAServerRole -Value Invoke-FreeIPAAPIServer_Role_Show -Description "Show role status on a server"
New-alias -Name Show-IPAServer -Value Invoke-FreeIPAAPIServer_Show -Description "Show IPA server."
New-alias -Name Add-IPAServicedelegationrule -Value Invoke-FreeIPAAPIServicedelegationrule_Add -Description "Create a new service delegation rule."
New-alias -Name Add-IPAServicedelegationruleMember -Value Invoke-FreeIPAAPIServicedelegationrule_Add_Member -Description "Add member to a named service delegation rule."
New-alias -Name Add-IPAServicedelegationruleTarget -Value Invoke-FreeIPAAPIServicedelegationrule_Add_Target -Description "Add target to a named service delegation rule."
New-alias -Name Remove-IPAServicedelegationrule -Value Invoke-FreeIPAAPIServicedelegationrule_Del -Description "Delete service delegation."
New-alias -Name Find-IPAServicedelegationrule -Value Invoke-FreeIPAAPIServicedelegationrule_Find -Description "Search for service delegations rule."
New-alias -Name Remove-IPAServicedelegationruleMember -Value Invoke-FreeIPAAPIServicedelegationrule_Remove_Member -Description "Remove member from a named service delegation rule."
New-alias -Name Remove-IPAServicedelegationruleTarget -Value Invoke-FreeIPAAPIServicedelegationrule_Remove_Target -Description "Remove target from a named service delegation rule."
New-alias -Name Show-IPAServicedelegationrule -Value Invoke-FreeIPAAPIServicedelegationrule_Show -Description "Display information about a named service delegation rule."
New-alias -Name Add-IPAServicedelegationtarget -Value Invoke-FreeIPAAPIServicedelegationtarget_Add -Description "Create a new service delegation target."
New-alias -Name Add-IPAServicedelegationtargetMember -Value Invoke-FreeIPAAPIServicedelegationtarget_Add_Member -Description "Add member to a named service delegation target."
New-alias -Name Remove-IPAServicedelegationtarget -Value Invoke-FreeIPAAPIServicedelegationtarget_Del -Description "Delete service delegation target."
New-alias -Name Find-IPAServicedelegationtarget -Value Invoke-FreeIPAAPIServicedelegationtarget_Find -Description "Search for service delegation target."
New-alias -Name Remove-IPAServicedelegationtargetMember -Value Invoke-FreeIPAAPIServicedelegationtarget_Remove_Member -Description "Remove member from a named service delegation target."
New-alias -Name Show-IPAServicedelegationtarget -Value Invoke-FreeIPAAPIServicedelegationtarget_Show -Description "Display information about a named service delegation target."
New-alias -Name Add-IPAService -Value Invoke-FreeIPAAPIService_Add -Description "Add a new IPA service."
New-alias -Name Add-IPAServiceCert -Value Invoke-FreeIPAAPIService_Add_Cert -Description "Add new certificates to a service"
New-alias -Name Add-IPAServiceHost -Value Invoke-FreeIPAAPIService_Add_Host -Description "Add hosts that can manage this service."
New-alias -Name Add-IPAServicePrincipal -Value Invoke-FreeIPAAPIService_Add_Principal -Description "Add new principal alias to a service"
New-alias -Name Approve-IPAServiceCreateKeytab -Value Invoke-FreeIPAAPIService_Allow_Create_Keytab -Description "Allow users, groups, hosts or host groups to create a keytab of this service."
New-alias -Name Approve-IPAServiceRetrieveKeytab -Value Invoke-FreeIPAAPIService_Allow_Retrieve_Keytab -Description "Allow users, groups, hosts or host groups to retrieve a keytab of this service."
New-alias -Name Remove-IPAService -Value Invoke-FreeIPAAPIService_Del -Description "Delete an IPA service."
New-alias -Name Disable-IPAService -Value Invoke-FreeIPAAPIService_Disable -Description "Disable the Kerberos key and SSL certificate of a service."
New-alias -Name Deny-IPAServiceCreateKeytab -Value Invoke-FreeIPAAPIService_Disallow_Create_Keytab -Description "Disallow users, groups, hosts or host groups to create a keytab of this service."
New-alias -Name Deny-IPAServiceRetrieveKeytab -Value Invoke-FreeIPAAPIService_Disallow_Retrieve_Keytab -Description "Disallow users, groups, hosts or host groups to retrieve a keytab of this service."
New-alias -Name Find-IPAService -Value Invoke-FreeIPAAPIService_Find -Description "Search for IPA services."
New-alias -Name Set-IPAService -Value Invoke-FreeIPAAPIService_Mod -Description "Modify an existing IPA service."
New-alias -Name Remove-IPAServiceCert -Value Invoke-FreeIPAAPIService_Remove_Cert -Description "Remove certificates from a service"
New-alias -Name Remove-IPAServiceHost -Value Invoke-FreeIPAAPIService_Remove_Host -Description "Remove hosts that can manage this service."
New-alias -Name Remove-IPAServicePrincipal -Value Invoke-FreeIPAAPIService_Remove_Principal -Description "Remove principal alias from a service"
New-alias -Name Show-IPAService -Value Invoke-FreeIPAAPIService_Show -Description "Display information about an IPA service."
New-alias -Name Disconnect-IPA -Value Invoke-FreeIPAAPISession_Logout -Description "
    RPC command used to log the current user out of their session.
    "

New-alias -Name Get-IPAStatusSidgenRun -Value Invoke-FreeIPAAPISidgen_Was_Run -Description "Determine whether ipa-adtrust-install has been run with sidgen task"
New-alias -Name Enable-IPAStageuser -Value Invoke-FreeIPAAPIStageuser_Activate -Description "Activate a stage user."
New-alias -Name Add-IPAStageuser -Value Invoke-FreeIPAAPIStageuser_Add -Description "Add a new stage user."
New-alias -Name Add-IPAStageuserCert -Value Invoke-FreeIPAAPIStageuser_Add_Cert -Description "Add one or more certificates to the stageuser entry"
New-alias -Name Add-IPAStageuserCertmapdata -Value Invoke-FreeIPAAPIStageuser_Add_Certmapdata -Description "Add one or more certificate mappings to the stage user entry."
New-alias -Name Add-IPAStageuserManager -Value Invoke-FreeIPAAPIStageuser_Add_Manager -Description "Add a manager to the stage user entry"
New-alias -Name Add-IPAStageuserPrincipal -Value Invoke-FreeIPAAPIStageuser_Add_Principal -Description "Add new principal alias to the stageuser entry"
New-alias -Name Remove-IPAStageuser -Value Invoke-FreeIPAAPIStageuser_Del -Description "Delete a stage user."
New-alias -Name Find-IPAStageuser -Value Invoke-FreeIPAAPIStageuser_Find -Description "Search for stage users."
New-alias -Name Set-IPAStageuser -Value Invoke-FreeIPAAPIStageuser_Mod -Description "Modify a stage user."
New-alias -Name Remove-IPAStageuserCert -Value Invoke-FreeIPAAPIStageuser_Remove_Cert -Description "Remove one or more certificates to the stageuser entry"
New-alias -Name Remove-IPAStageuserCertmapdata -Value Invoke-FreeIPAAPIStageuser_Remove_Certmapdata -Description "Remove one or more certificate mappings from the stage user entry."
New-alias -Name Remove-IPAStageuserManager -Value Invoke-FreeIPAAPIStageuser_Remove_Manager -Description "Remove a manager to the stage user entry"
New-alias -Name Remove-IPAStageuserPrincipal -Value Invoke-FreeIPAAPIStageuser_Remove_Principal -Description "Remove principal alias from the stageuser entry"
New-alias -Name Show-IPAStageuser -Value Invoke-FreeIPAAPIStageuser_Show -Description "Display information about a stage user."
New-alias -Name Add-IPASudocmdgroup -Value Invoke-FreeIPAAPISudocmdgroup_Add -Description "Create new Sudo Command Group."
New-alias -Name Add-IPASudocmdgroupMember -Value Invoke-FreeIPAAPISudocmdgroup_Add_Member -Description "Add members to Sudo Command Group."
New-alias -Name Remove-IPASudocmdgroup -Value Invoke-FreeIPAAPISudocmdgroup_Del -Description "Delete Sudo Command Group."
New-alias -Name Find-IPASudocmdgroup -Value Invoke-FreeIPAAPISudocmdgroup_Find -Description "Search for Sudo Command Groups."
New-alias -Name Set-IPASudocmdgroup -Value Invoke-FreeIPAAPISudocmdgroup_Mod -Description "Modify Sudo Command Group."
New-alias -Name Remove-IPASudocmdgroupMember -Value Invoke-FreeIPAAPISudocmdgroup_Remove_Member -Description "Remove members from Sudo Command Group."
New-alias -Name Show-IPASudocmdgroup -Value Invoke-FreeIPAAPISudocmdgroup_Show -Description "Display Sudo Command Group."
New-alias -Name Add-IPASudocmd -Value Invoke-FreeIPAAPISudocmd_Add -Description "Create new Sudo Command."
New-alias -Name Remove-IPASudocmd -Value Invoke-FreeIPAAPISudocmd_Del -Description "Delete Sudo Command."
New-alias -Name Find-IPASudocmd -Value Invoke-FreeIPAAPISudocmd_Find -Description "Search for Sudo Commands."
New-alias -Name Set-IPASudocmd -Value Invoke-FreeIPAAPISudocmd_Mod -Description "Modify Sudo Command."
New-alias -Name Show-IPASudocmd -Value Invoke-FreeIPAAPISudocmd_Show -Description "Display Sudo Command."
New-alias -Name Add-IPASudorule -Value Invoke-FreeIPAAPISudorule_Add -Description "Create new Sudo Rule."
New-alias -Name Add-IPASudoruleAllowCommand -Value Invoke-FreeIPAAPISudorule_Add_Allow_Command -Description "Add commands and sudo command groups affected by Sudo Rule."
New-alias -Name Add-IPASudoruleDenyCommand -Value Invoke-FreeIPAAPISudorule_Add_Deny_Command -Description "Add commands and sudo command groups affected by Sudo Rule."
New-alias -Name Add-IPASudoruleHost -Value Invoke-FreeIPAAPISudorule_Add_Host -Description "Add hosts and hostgroups affected by Sudo Rule."
New-alias -Name Add-IPASudoruleOption -Value Invoke-FreeIPAAPISudorule_Add_Option -Description "Add an option to the Sudo Rule."
New-alias -Name Add-IPASudoruleRunasgroup -Value Invoke-FreeIPAAPISudorule_Add_Runasgroup -Description "Add group for Sudo to execute as."
New-alias -Name Add-IPASudoruleRunasuser -Value Invoke-FreeIPAAPISudorule_Add_Runasuser -Description "Add users and groups for Sudo to execute as."
New-alias -Name Add-IPASudoruleUser -Value Invoke-FreeIPAAPISudorule_Add_User -Description "Add users and groups affected by Sudo Rule."
New-alias -Name Remove-IPASudorule -Value Invoke-FreeIPAAPISudorule_Del -Description "Delete Sudo Rule."
New-alias -Name Disable-IPASudorule -Value Invoke-FreeIPAAPISudorule_Disable -Description "Disable a Sudo Rule."
New-alias -Name Enable-IPASudorule -Value Invoke-FreeIPAAPISudorule_Enable -Description "Enable a Sudo Rule."
New-alias -Name Find-IPASudorule -Value Invoke-FreeIPAAPISudorule_Find -Description "Search for Sudo Rule."
New-alias -Name Set-IPASudorule -Value Invoke-FreeIPAAPISudorule_Mod -Description "Modify Sudo Rule."
New-alias -Name Remove-IPASudoruleAllowCommand -Value Invoke-FreeIPAAPISudorule_Remove_Allow_Command -Description "Remove commands and sudo command groups affected by Sudo Rule."
New-alias -Name Remove-IPASudoruleDenyCommand -Value Invoke-FreeIPAAPISudorule_Remove_Deny_Command -Description "Remove commands and sudo command groups affected by Sudo Rule."
New-alias -Name Remove-IPASudoruleHost -Value Invoke-FreeIPAAPISudorule_Remove_Host -Description "Remove hosts and hostgroups affected by Sudo Rule."
New-alias -Name Remove-IPASudoruleOption -Value Invoke-FreeIPAAPISudorule_Remove_Option -Description "Remove an option from Sudo Rule."
New-alias -Name Remove-IPASudoruleRunasgroup -Value Invoke-FreeIPAAPISudorule_Remove_Runasgroup -Description "Remove group for Sudo to execute as."
New-alias -Name Remove-IPASudoruleRunasuser -Value Invoke-FreeIPAAPISudorule_Remove_Runasuser -Description "Remove users and groups for Sudo to execute as."
New-alias -Name Remove-IPASudoruleUser -Value Invoke-FreeIPAAPISudorule_Remove_User -Description "Remove users and groups affected by Sudo Rule."
New-alias -Name Show-IPASudorule -Value Invoke-FreeIPAAPISudorule_Show -Description "Display Sudo Rule."
New-alias -Name Find-IPATopic -Value Invoke-FreeIPAAPITopic_Find -Description "Search for help topics."
New-alias -Name Show-IPATopic -Value Invoke-FreeIPAAPITopic_Show -Description "Display information about a help topic."
New-alias -Name Add-IPATopologysegment -Value Invoke-FreeIPAAPITopologysegment_Add -Description "Add a new segment."
New-alias -Name Remove-IPATopologysegment -Value Invoke-FreeIPAAPITopologysegment_Del -Description "Delete a segment."
New-alias -Name Find-IPATopologysegment -Value Invoke-FreeIPAAPITopologysegment_Find -Description "Search for topology segments."
New-alias -Name Set-IPATopologysegment -Value Invoke-FreeIPAAPITopologysegment_Mod -Description "Modify a segment."
New-alias -Name Initialize-IPATopologysegment -Value Invoke-FreeIPAAPITopologysegment_Reinitialize -Description "Request a full re-initialization of the node retrieving data from the other node."
New-alias -Name Show-IPATopologysegment -Value Invoke-FreeIPAAPITopologysegment_Show -Description "Display a segment."
New-alias -Name Add-IPATopologysuffix -Value Invoke-FreeIPAAPITopologysuffix_Add -Description "Add a new topology suffix to be managed."
New-alias -Name Remove-IPATopologysuffix -Value Invoke-FreeIPAAPITopologysuffix_Del -Description "Delete a topology suffix."
New-alias -Name Find-IPATopologysuffix -Value Invoke-FreeIPAAPITopologysuffix_Find -Description "Search for topology suffixes."
New-alias -Name Set-IPATopologysuffix -Value Invoke-FreeIPAAPITopologysuffix_Mod -Description "Modify a topology suffix."
New-alias -Name Show-IPATopologysuffix -Value Invoke-FreeIPAAPITopologysuffix_Show -Description "Show managed suffix."
New-alias -Name Confirm-IPATopologysuffix -Value Invoke-FreeIPAAPITopologysuffix_Verify -Description "
Verify replication topology for suffix.

Checks done:
  1. check if a topology is not disconnected. In other words if there are
     replication paths between all servers.
  2. check if servers don't have more than the recommended number of
     replication agreements
"

New-alias -Name Set-IPATrustconfig -Value Invoke-FreeIPAAPITrustconfig_Mod -Description "Modify global trust configuration."
New-alias -Name Show-IPATrustconfig -Value Invoke-FreeIPAAPITrustconfig_Show -Description "Show global trust configuration."
New-alias -Name Add-IPATrustdomain -Value Invoke-FreeIPAAPITrustdomain_Add -Description "Allow access from the trusted domain"
New-alias -Name Remove-IPATrustdomain -Value Invoke-FreeIPAAPITrustdomain_Del -Description "Remove information about the domain associated with the trust."
New-alias -Name Disable-IPATrustdomain -Value Invoke-FreeIPAAPITrustdomain_Disable -Description "Disable use of IPA resources by the domain of the trust"
New-alias -Name Enable-IPATrustdomain -Value Invoke-FreeIPAAPITrustdomain_Enable -Description "Allow use of IPA resources by the domain of the trust"
New-alias -Name Find-IPATrustdomain -Value Invoke-FreeIPAAPITrustdomain_Find -Description "Search domains of the trust"
New-alias -Name Set-IPATrustdomain -Value Invoke-FreeIPAAPITrustdomain_Mod -Description "Modify trustdomain of the trust"
New-alias -Name Add-IPATrust -Value Invoke-FreeIPAAPITrust_Add -Description "
Add new trust to use.

This command establishes trust relationship to another domain
which becomes 'trusted'. As result, users of the trusted domain
may access resources of this domain.

Only trusts to Active Directory domains are supported right now.

The command can be safely run multiple times against the same domain,
this will cause change to trust relationship credentials on both
sides.

Note that if the command was previously run with a specific range type,
or with automatic detection of the range type, and you want to configure a
different range type, you may need to delete first the ID range using
ipa idrange-del before retrying the command with the desired range type.
    "

New-alias -Name Remove-IPATrust -Value Invoke-FreeIPAAPITrust_Del -Description "Delete a trust."
New-alias -Name Build-IPATrustDomains -Value Invoke-FreeIPAAPITrust_Fetch_Domains -Description "Refresh list of the domains associated with the trust"
New-alias -Name Find-IPATrust -Value Invoke-FreeIPAAPITrust_Find -Description "Search for trusts."
New-alias -Name Set-IPATrust -Value Invoke-FreeIPAAPITrust_Mod -Description "
    Modify a trust (for future use).

    Currently only the default option to modify the LDAP attributes is
    available. More specific options will be added in coming releases.
    "

New-alias -Name Resolve-IPATrust -Value Invoke-FreeIPAAPITrust_Resolve -Description "Resolve security identifiers of users and groups in trusted domains"
New-alias -Name Show-IPATrust -Value Invoke-FreeIPAAPITrust_Show -Description "Display information about a trust."
New-alias -Name Add-IPAUser -Value Invoke-FreeIPAAPIUser_Add -Description "Add a new user."
New-alias -Name Add-IPAUserCert -Value Invoke-FreeIPAAPIUser_Add_Cert -Description "Add one or more certificates to the user entry"
New-alias -Name Add-IPAUserCertmapdata -Value Invoke-FreeIPAAPIUser_Add_Certmapdata -Description "Add one or more certificate mappings to the user entry."
New-alias -Name Add-IPAUserManager -Value Invoke-FreeIPAAPIUser_Add_Manager -Description "Add a manager to the user entry"
New-alias -Name Add-IPAUserPrincipal -Value Invoke-FreeIPAAPIUser_Add_Principal -Description "Add new principal alias to the user entry"
New-alias -Name Remove-IPAUser -Value Invoke-FreeIPAAPIUser_Del -Description "Delete a user."
New-alias -Name Disable-IPAUser -Value Invoke-FreeIPAAPIUser_Disable -Description "Disable a user account."
New-alias -Name Enable-IPAUser -Value Invoke-FreeIPAAPIUser_Enable -Description "Enable a user account."
New-alias -Name Find-IPAUser -Value Invoke-FreeIPAAPIUser_Find -Description "Search for users."
New-alias -Name Set-IPAUser -Value Invoke-FreeIPAAPIUser_Mod -Description "Modify a user."
New-alias -Name Remove-IPAUserCert -Value Invoke-FreeIPAAPIUser_Remove_Cert -Description "Remove one or more certificates to the user entry"
New-alias -Name Remove-IPAUserCertmapdata -Value Invoke-FreeIPAAPIUser_Remove_Certmapdata -Description "Remove one or more certificate mappings from the user entry."
New-alias -Name Remove-IPAUserManager -Value Invoke-FreeIPAAPIUser_Remove_Manager -Description "Remove a manager to the user entry"
New-alias -Name Remove-IPAUserPrincipal -Value Invoke-FreeIPAAPIUser_Remove_Principal -Description "Remove principal alias from the user entry"
New-alias -Name Show-IPAUser -Value Invoke-FreeIPAAPIUser_Show -Description "Display information about a user."
New-alias -Name Move-IPADelToStageUser -Value Invoke-FreeIPAAPIUser_Stage -Description "Move deleted user into staged area"
New-alias -Name Get-IPAStatusUser -Value Invoke-FreeIPAAPIUser_Status -Description "
    Lockout status of a user account

    An account may become locked if the password is entered incorrectly too
    many times within a specific time period as controlled by password
    policy. A locked account is a temporary condition and may be unlocked by
    an administrator.

    This connects to each IPA master and displays the lockout status on
    each one.

    To determine whether an account is locked on a given server you need
    to compare the number of failed logins and the time of the last failure.
    For an account to be locked it must exceed the maxfail failures within
    the failinterval duration as specified in the password policy associated
    with the user.

    The failed login counter is modified only when a user attempts a log in
    so it is possible that an account may appear locked but the last failed
    login attempt is older than the lockouttime of the password policy. This
    means that the user may attempt a login again. "

New-alias -Name Restore-IPAUser -Value Invoke-FreeIPAAPIUser_Undel -Description "Undelete a delete user account."
New-alias -Name Unlock-IPAUser -Value Invoke-FreeIPAAPIUser_Unlock -Description "
    Unlock a user account

    An account may become locked if the password is entered incorrectly too
    many times within a specific time period as controlled by password
    policy. A locked account is a temporary condition and may be unlocked by
    an administrator."

New-alias -Name Show-IPAVaultconfig -Value Invoke-FreeIPAAPIVaultconfig_Show -Description "Show vault configuration."
New-alias -Name Add-IPAVaultcontainerOwner -Value Invoke-FreeIPAAPIVaultcontainer_Add_Owner -Description "Add owners to a vault container."
New-alias -Name Remove-IPAVaultcontainer -Value Invoke-FreeIPAAPIVaultcontainer_Del -Description "Delete a vault container."
New-alias -Name Remove-IPAVaultcontainerOwner -Value Invoke-FreeIPAAPIVaultcontainer_Remove_Owner -Description "Remove owners from a vault container."
New-alias -Name Show-IPAVaultcontainer -Value Invoke-FreeIPAAPIVaultcontainer_Show -Description "Display information about a vault container."
New-alias -Name Add-IPAVaultInternal -Value Invoke-FreeIPAAPIVault_Add_Internal
New-alias -Name Add-IPAVaultMember -Value Invoke-FreeIPAAPIVault_Add_Member -Description "Add members to a vault."
New-alias -Name Add-IPAVaultOwner -Value Invoke-FreeIPAAPIVault_Add_Owner -Description "Add owners to a vault."
New-alias -Name Move-IPAToArchiveVaultInternal -Value Invoke-FreeIPAAPIVault_Archive_Internal
New-alias -Name Remove-IPAVault -Value Invoke-FreeIPAAPIVault_Del -Description "Delete a vault."
New-alias -Name Find-IPAVault -Value Invoke-FreeIPAAPIVault_Find -Description "Search for vaults."
New-alias -Name Set-IPAVaultInternal -Value Invoke-FreeIPAAPIVault_Mod_Internal
New-alias -Name Remove-IPAVaultMember -Value Invoke-FreeIPAAPIVault_Remove_Member -Description "Remove members from a vault."
New-alias -Name Remove-IPAVaultOwner -Value Invoke-FreeIPAAPIVault_Remove_Owner -Description "Remove owners from a vault."
New-alias -Name Get-IPAVaultInternal -Value Invoke-FreeIPAAPIVault_Retrieve_Internal
New-alias -Name Show-IPAVault -Value Invoke-FreeIPAAPIVault_Show -Description "Display information about a vault."
New-alias -Name Use-IPAWhoami -Value Invoke-FreeIPAAPIWhoami -Description "Describe currently authenticated identity."
New-Alias -Name Set-IPACredentials -value Set-FreeIPAAPICredentials -Description "Set your IPA API Credential for authentication purpose if your using non Kerberos authentication"
New-Alias -Name Import-IPACrendentials -Value Import-FreeIPAAPICrendentials -Description "Import your IPA API Credential from a local file hosted in your Windows Profile"
New-Alias -Name Set-IPAServerConfig -Value Set-FreeIPAAPIServerConfig -Description "Set IPA server URL and client version"
New-Alias -Name Connect-IPA -value Get-FreeIPAAPIAuthenticationCookie -Description "Get your authentication cookie and save it to be used with all cmdlets/functions"
Export-ModuleMember -Function Invoke-FreeIPAAPIAci_Add,Invoke-FreeIPAAPIAci_Del,Invoke-FreeIPAAPIAci_Find,Invoke-FreeIPAAPIAci_Mod,Invoke-FreeIPAAPIAci_Rename,Invoke-FreeIPAAPIAci_Show,Invoke-FreeIPAAPIAdtrust_Is_Enabled,Invoke-FreeIPAAPIAutomember_Add,Invoke-FreeIPAAPIAutomember_Add_Condition,Invoke-FreeIPAAPIAutomember_Default_Group_Remove,Invoke-FreeIPAAPIAutomember_Default_Group_Set,Invoke-FreeIPAAPIAutomember_Default_Group_Show,Invoke-FreeIPAAPIAutomember_Del,Invoke-FreeIPAAPIAutomember_Find,Invoke-FreeIPAAPIAutomember_Mod,Invoke-FreeIPAAPIAutomember_Rebuild,Invoke-FreeIPAAPIAutomember_Remove_Condition,Invoke-FreeIPAAPIAutomember_Show,Invoke-FreeIPAAPIAutomountkey_Add,Invoke-FreeIPAAPIAutomountkey_Del,Invoke-FreeIPAAPIAutomountkey_Find,Invoke-FreeIPAAPIAutomountkey_Mod,Invoke-FreeIPAAPIAutomountkey_Show,Invoke-FreeIPAAPIAutomountlocation_Add,Invoke-FreeIPAAPIAutomountlocation_Del,Invoke-FreeIPAAPIAutomountlocation_Find,Invoke-FreeIPAAPIAutomountlocation_Show,Invoke-FreeIPAAPIAutomountlocation_Tofiles,Invoke-FreeIPAAPIAutomountmap_Add,Invoke-FreeIPAAPIAutomountmap_Add_Indirect,Invoke-FreeIPAAPIAutomountmap_Del,Invoke-FreeIPAAPIAutomountmap_Find,Invoke-FreeIPAAPIAutomountmap_Mod,Invoke-FreeIPAAPIAutomountmap_Show,Invoke-FreeIPAAPIBatch,Invoke-FreeIPAAPICaacl_Add,Invoke-FreeIPAAPICaacl_Add_Ca,Invoke-FreeIPAAPICaacl_Add_Host,Invoke-FreeIPAAPICaacl_Add_Profile,Invoke-FreeIPAAPICaacl_Add_Service,Invoke-FreeIPAAPICaacl_Add_User,Invoke-FreeIPAAPICaacl_Del,Invoke-FreeIPAAPICaacl_Disable,Invoke-FreeIPAAPICaacl_Enable,Invoke-FreeIPAAPICaacl_Find,Invoke-FreeIPAAPICaacl_Mod,Invoke-FreeIPAAPICaacl_Remove_Ca,Invoke-FreeIPAAPICaacl_Remove_Host,Invoke-FreeIPAAPICaacl_Remove_Profile,Invoke-FreeIPAAPICaacl_Remove_Service,Invoke-FreeIPAAPICaacl_Remove_User,Invoke-FreeIPAAPICaacl_Show,Invoke-FreeIPAAPICa_Add,Invoke-FreeIPAAPICa_Del,Invoke-FreeIPAAPICa_Disable,Invoke-FreeIPAAPICa_Enable,Invoke-FreeIPAAPICa_Find,Invoke-FreeIPAAPICa_Is_Enabled,Invoke-FreeIPAAPICa_Mod,Invoke-FreeIPAAPICa_Show,Invoke-FreeIPAAPICertmapconfig_Mod,Invoke-FreeIPAAPICertmapconfig_Show,Invoke-FreeIPAAPICertmaprule_Add,Invoke-FreeIPAAPICertmaprule_Del,Invoke-FreeIPAAPICertmaprule_Disable,Invoke-FreeIPAAPICertmaprule_Enable,Invoke-FreeIPAAPICertmaprule_Find,Invoke-FreeIPAAPICertmaprule_Mod,Invoke-FreeIPAAPICertmaprule_Show,Invoke-FreeIPAAPICertmap_Match,Invoke-FreeIPAAPICertprofile_Del,Invoke-FreeIPAAPICertprofile_Find,Invoke-FreeIPAAPICertprofile_Import,Invoke-FreeIPAAPICertprofile_Mod,Invoke-FreeIPAAPICertprofile_Show,Invoke-FreeIPAAPICert_Find,Invoke-FreeIPAAPICert_Remove_Hold,Invoke-FreeIPAAPICert_Request,Invoke-FreeIPAAPICert_Revoke,Invoke-FreeIPAAPICert_Show,Invoke-FreeIPAAPICert_Status,Invoke-FreeIPAAPIClass_Find,Invoke-FreeIPAAPIClass_Show,Invoke-FreeIPAAPICommand_Defaults,Invoke-FreeIPAAPICommand_Find,Invoke-FreeIPAAPICommand_Show,Invoke-FreeIPAAPICompat_Is_Enabled,Invoke-FreeIPAAPIConfig_Mod,Invoke-FreeIPAAPIConfig_Show,Invoke-FreeIPAAPICosentry_Add,Invoke-FreeIPAAPICosentry_Del,Invoke-FreeIPAAPICosentry_Find,Invoke-FreeIPAAPICosentry_Mod,Invoke-FreeIPAAPICosentry_Show,Invoke-FreeIPAAPIDelegation_Add,Invoke-FreeIPAAPIDelegation_Del,Invoke-FreeIPAAPIDelegation_Find,Invoke-FreeIPAAPIDelegation_Mod,Invoke-FreeIPAAPIDelegation_Show,Invoke-FreeIPAAPIDnsconfig_Mod,Invoke-FreeIPAAPIDnsconfig_Show,Invoke-FreeIPAAPIDnsforwardzone_Add,Invoke-FreeIPAAPIDnsforwardzone_Add_Permission,Invoke-FreeIPAAPIDnsforwardzone_Del,Invoke-FreeIPAAPIDnsforwardzone_Disable,Invoke-FreeIPAAPIDnsforwardzone_Enable,Invoke-FreeIPAAPIDnsforwardzone_Find,Invoke-FreeIPAAPIDnsforwardzone_Mod,Invoke-FreeIPAAPIDnsforwardzone_Remove_Permission,Invoke-FreeIPAAPIDnsforwardzone_Show,Invoke-FreeIPAAPIDnsrecord_Add,Invoke-FreeIPAAPIDnsrecord_Del,Invoke-FreeIPAAPIDnsrecord_Delentry,Invoke-FreeIPAAPIDnsrecord_Find,Invoke-FreeIPAAPIDnsrecord_Mod,Invoke-FreeIPAAPIDnsrecord_Show,Invoke-FreeIPAAPIDnsrecord_Split_Parts,Invoke-FreeIPAAPIDnsserver_Find,Invoke-FreeIPAAPIDnsserver_Mod,Invoke-FreeIPAAPIDnsserver_Show,Invoke-FreeIPAAPIDnszone_Add,Invoke-FreeIPAAPIDnszone_Add_Permission,Invoke-FreeIPAAPIDnszone_Del,Invoke-FreeIPAAPIDnszone_Disable,Invoke-FreeIPAAPIDnszone_Enable,Invoke-FreeIPAAPIDnszone_Find,Invoke-FreeIPAAPIDnszone_Mod,Invoke-FreeIPAAPIDnszone_Remove_Permission,Invoke-FreeIPAAPIDnszone_Show,Invoke-FreeIPAAPIDns_Is_Enabled,Invoke-FreeIPAAPIDns_Resolve,Invoke-FreeIPAAPIDns_Update_System_Records,Invoke-FreeIPAAPIDomainlevel_Get,Invoke-FreeIPAAPIDomainlevel_Set,Invoke-FreeIPAAPIEnv,Invoke-FreeIPAAPIGroup_Add,Invoke-FreeIPAAPIGroup_Add_Member,Invoke-FreeIPAAPIGroup_Del,Invoke-FreeIPAAPIGroup_Detach,Invoke-FreeIPAAPIGroup_Find,Invoke-FreeIPAAPIGroup_Mod,Invoke-FreeIPAAPIGroup_Remove_Member,Invoke-FreeIPAAPIGroup_Show,Invoke-FreeIPAAPIHbacrule_Add,Invoke-FreeIPAAPIHbacrule_Add_Host,Invoke-FreeIPAAPIHbacrule_Add_Service,Invoke-FreeIPAAPIHbacrule_Add_Sourcehost,Invoke-FreeIPAAPIHbacrule_Add_User,Invoke-FreeIPAAPIHbacrule_Del,Invoke-FreeIPAAPIHbacrule_Disable,Invoke-FreeIPAAPIHbacrule_Enable,Invoke-FreeIPAAPIHbacrule_Find,Invoke-FreeIPAAPIHbacrule_Mod,Invoke-FreeIPAAPIHbacrule_Remove_Host,Invoke-FreeIPAAPIHbacrule_Remove_Service,Invoke-FreeIPAAPIHbacrule_Remove_Sourcehost,Invoke-FreeIPAAPIHbacrule_Remove_User,Invoke-FreeIPAAPIHbacrule_Show,Invoke-FreeIPAAPIHbacsvcgroup_Add,Invoke-FreeIPAAPIHbacsvcgroup_Add_Member,Invoke-FreeIPAAPIHbacsvcgroup_Del,Invoke-FreeIPAAPIHbacsvcgroup_Find,Invoke-FreeIPAAPIHbacsvcgroup_Mod,Invoke-FreeIPAAPIHbacsvcgroup_Remove_Member,Invoke-FreeIPAAPIHbacsvcgroup_Show,Invoke-FreeIPAAPIHbacsvc_Add,Invoke-FreeIPAAPIHbacsvc_Del,Invoke-FreeIPAAPIHbacsvc_Find,Invoke-FreeIPAAPIHbacsvc_Mod,Invoke-FreeIPAAPIHbacsvc_Show,Invoke-FreeIPAAPIHbactest,Invoke-FreeIPAAPIHostgroup_Add,Invoke-FreeIPAAPIHostgroup_Add_Member,Invoke-FreeIPAAPIHostgroup_Del,Invoke-FreeIPAAPIHostgroup_Find,Invoke-FreeIPAAPIHostgroup_Mod,Invoke-FreeIPAAPIHostgroup_Remove_Member,Invoke-FreeIPAAPIHostgroup_Show,Invoke-FreeIPAAPIHost_Add,Invoke-FreeIPAAPIHost_Add_Cert,Invoke-FreeIPAAPIHost_Add_Managedby,Invoke-FreeIPAAPIHost_Add_Principal,Invoke-FreeIPAAPIHost_Allow_Create_Keytab,Invoke-FreeIPAAPIHost_Allow_Retrieve_Keytab,Invoke-FreeIPAAPIHost_Del,Invoke-FreeIPAAPIHost_Disable,Invoke-FreeIPAAPIHost_Disallow_Create_Keytab,Invoke-FreeIPAAPIHost_Disallow_Retrieve_Keytab,Invoke-FreeIPAAPIHost_Find,Invoke-FreeIPAAPIHost_Mod,Invoke-FreeIPAAPIHost_Remove_Cert,Invoke-FreeIPAAPIHost_Remove_Managedby,Invoke-FreeIPAAPIHost_Remove_Principal,Invoke-FreeIPAAPIHost_Show,Invoke-FreeIPAAPII18n_Messages,Invoke-FreeIPAAPIIdoverridegroup_Add,Invoke-FreeIPAAPIIdoverridegroup_Del,Invoke-FreeIPAAPIIdoverridegroup_Find,Invoke-FreeIPAAPIIdoverridegroup_Mod,Invoke-FreeIPAAPIIdoverridegroup_Show,Invoke-FreeIPAAPIIdoverrideuser_Add,Invoke-FreeIPAAPIIdoverrideuser_Add_Cert,Invoke-FreeIPAAPIIdoverrideuser_Del,Invoke-FreeIPAAPIIdoverrideuser_Find,Invoke-FreeIPAAPIIdoverrideuser_Mod,Invoke-FreeIPAAPIIdoverrideuser_Remove_Cert,Invoke-FreeIPAAPIIdoverrideuser_Show,Invoke-FreeIPAAPIIdrange_Add,Invoke-FreeIPAAPIIdrange_Del,Invoke-FreeIPAAPIIdrange_Find,Invoke-FreeIPAAPIIdrange_Mod,Invoke-FreeIPAAPIIdrange_Show,Invoke-FreeIPAAPIIdview_Add,Invoke-FreeIPAAPIIdview_Apply,Invoke-FreeIPAAPIIdview_Del,Invoke-FreeIPAAPIIdview_Find,Invoke-FreeIPAAPIIdview_Mod,Invoke-FreeIPAAPIIdview_Show,Invoke-FreeIPAAPIIdview_Unapply,Invoke-FreeIPAAPIJoin,Invoke-FreeIPAAPIJson_Metadata,Invoke-FreeIPAAPIKra_Is_Enabled,Invoke-FreeIPAAPIKrbtpolicy_Mod,Invoke-FreeIPAAPIKrbtpolicy_Reset,Invoke-FreeIPAAPIKrbtpolicy_Show,Invoke-FreeIPAAPILocation_Add,Invoke-FreeIPAAPILocation_Del,Invoke-FreeIPAAPILocation_Find,Invoke-FreeIPAAPILocation_Mod,Invoke-FreeIPAAPILocation_Show,Invoke-FreeIPAAPIMigrate_Ds,Invoke-FreeIPAAPINetgroup_Add,Invoke-FreeIPAAPINetgroup_Add_Member,Invoke-FreeIPAAPINetgroup_Del,Invoke-FreeIPAAPINetgroup_Find,Invoke-FreeIPAAPINetgroup_Mod,Invoke-FreeIPAAPINetgroup_Remove_Member,Invoke-FreeIPAAPINetgroup_Show,Invoke-FreeIPAAPIOtpconfig_Mod,Invoke-FreeIPAAPIOtpconfig_Show,Invoke-FreeIPAAPIOtptoken_Add,Invoke-FreeIPAAPIOtptoken_Add_Managedby,Invoke-FreeIPAAPIOtptoken_Del,Invoke-FreeIPAAPIOtptoken_Find,Invoke-FreeIPAAPIOtptoken_Mod,Invoke-FreeIPAAPIOtptoken_Remove_Managedby,Invoke-FreeIPAAPIOtptoken_Show,Invoke-FreeIPAAPIOutput_Find,Invoke-FreeIPAAPIOutput_Show,Invoke-FreeIPAAPIParam_Find,Invoke-FreeIPAAPIParam_Show,Invoke-FreeIPAAPIPasswd,Invoke-FreeIPAAPIPermission_Add,Invoke-FreeIPAAPIPermission_Add_Member,Invoke-FreeIPAAPIPermission_Add_Noaci,Invoke-FreeIPAAPIPermission_Del,Invoke-FreeIPAAPIPermission_Find,Invoke-FreeIPAAPIPermission_Mod,Invoke-FreeIPAAPIPermission_Remove_Member,Invoke-FreeIPAAPIPermission_Show,Invoke-FreeIPAAPIPing,Invoke-FreeIPAAPIPkinit_Status,Invoke-FreeIPAAPIPlugins,Invoke-FreeIPAAPIPrivilege_Add,Invoke-FreeIPAAPIPrivilege_Add_Member,Invoke-FreeIPAAPIPrivilege_Add_Permission,Invoke-FreeIPAAPIPrivilege_Del,Invoke-FreeIPAAPIPrivilege_Find,Invoke-FreeIPAAPIPrivilege_Mod,Invoke-FreeIPAAPIPrivilege_Remove_Member,Invoke-FreeIPAAPIPrivilege_Remove_Permission,Invoke-FreeIPAAPIPrivilege_Show,Invoke-FreeIPAAPIPwpolicy_Add,Invoke-FreeIPAAPIPwpolicy_Del,Invoke-FreeIPAAPIPwpolicy_Find,Invoke-FreeIPAAPIPwpolicy_Mod,Invoke-FreeIPAAPIPwpolicy_Show,Invoke-FreeIPAAPIRadiusproxy_Add,Invoke-FreeIPAAPIRadiusproxy_Del,Invoke-FreeIPAAPIRadiusproxy_Find,Invoke-FreeIPAAPIRadiusproxy_Mod,Invoke-FreeIPAAPIRadiusproxy_Show,Invoke-FreeIPAAPIRealmdomains_Mod,Invoke-FreeIPAAPIRealmdomains_Show,Invoke-FreeIPAAPIRole_Add,Invoke-FreeIPAAPIRole_Add_Member,Invoke-FreeIPAAPIRole_Add_Privilege,Invoke-FreeIPAAPIRole_Del,Invoke-FreeIPAAPIRole_Find,Invoke-FreeIPAAPIRole_Mod,Invoke-FreeIPAAPIRole_Remove_Member,Invoke-FreeIPAAPIRole_Remove_Privilege,Invoke-FreeIPAAPIRole_Show,Invoke-FreeIPAAPISchema,Invoke-FreeIPAAPISelfservice_Add,Invoke-FreeIPAAPISelfservice_Del,Invoke-FreeIPAAPISelfservice_Find,Invoke-FreeIPAAPISelfservice_Mod,Invoke-FreeIPAAPISelfservice_Show,Invoke-FreeIPAAPISelinuxusermap_Add,Invoke-FreeIPAAPISelinuxusermap_Add_Host,Invoke-FreeIPAAPISelinuxusermap_Add_User,Invoke-FreeIPAAPISelinuxusermap_Del,Invoke-FreeIPAAPISelinuxusermap_Disable,Invoke-FreeIPAAPISelinuxusermap_Enable,Invoke-FreeIPAAPISelinuxusermap_Find,Invoke-FreeIPAAPISelinuxusermap_Mod,Invoke-FreeIPAAPISelinuxusermap_Remove_Host,Invoke-FreeIPAAPISelinuxusermap_Remove_User,Invoke-FreeIPAAPISelinuxusermap_Show,Invoke-FreeIPAAPIServer_Conncheck,Invoke-FreeIPAAPIServer_Del,Invoke-FreeIPAAPIServer_Find,Invoke-FreeIPAAPIServer_Mod,Invoke-FreeIPAAPIServer_Role_Find,Invoke-FreeIPAAPIServer_Role_Show,Invoke-FreeIPAAPIServer_Show,Invoke-FreeIPAAPIServicedelegationrule_Add,Invoke-FreeIPAAPIServicedelegationrule_Add_Member,Invoke-FreeIPAAPIServicedelegationrule_Add_Target,Invoke-FreeIPAAPIServicedelegationrule_Del,Invoke-FreeIPAAPIServicedelegationrule_Find,Invoke-FreeIPAAPIServicedelegationrule_Remove_Member,Invoke-FreeIPAAPIServicedelegationrule_Remove_Target,Invoke-FreeIPAAPIServicedelegationrule_Show,Invoke-FreeIPAAPIServicedelegationtarget_Add,Invoke-FreeIPAAPIServicedelegationtarget_Add_Member,Invoke-FreeIPAAPIServicedelegationtarget_Del,Invoke-FreeIPAAPIServicedelegationtarget_Find,Invoke-FreeIPAAPIServicedelegationtarget_Remove_Member,Invoke-FreeIPAAPIServicedelegationtarget_Show,Invoke-FreeIPAAPIService_Add,Invoke-FreeIPAAPIService_Add_Cert,Invoke-FreeIPAAPIService_Add_Host,Invoke-FreeIPAAPIService_Add_Principal,Invoke-FreeIPAAPIService_Allow_Create_Keytab,Invoke-FreeIPAAPIService_Allow_Retrieve_Keytab,Invoke-FreeIPAAPIService_Del,Invoke-FreeIPAAPIService_Disable,Invoke-FreeIPAAPIService_Disallow_Create_Keytab,Invoke-FreeIPAAPIService_Disallow_Retrieve_Keytab,Invoke-FreeIPAAPIService_Find,Invoke-FreeIPAAPIService_Mod,Invoke-FreeIPAAPIService_Remove_Cert,Invoke-FreeIPAAPIService_Remove_Host,Invoke-FreeIPAAPIService_Remove_Principal,Invoke-FreeIPAAPIService_Show,Invoke-FreeIPAAPISession_Logout,Invoke-FreeIPAAPISidgen_Was_Run,Invoke-FreeIPAAPIStageuser_Activate,Invoke-FreeIPAAPIStageuser_Add,Invoke-FreeIPAAPIStageuser_Add_Cert,Invoke-FreeIPAAPIStageuser_Add_Certmapdata,Invoke-FreeIPAAPIStageuser_Add_Manager,Invoke-FreeIPAAPIStageuser_Add_Principal,Invoke-FreeIPAAPIStageuser_Del,Invoke-FreeIPAAPIStageuser_Find,Invoke-FreeIPAAPIStageuser_Mod,Invoke-FreeIPAAPIStageuser_Remove_Cert,Invoke-FreeIPAAPIStageuser_Remove_Certmapdata,Invoke-FreeIPAAPIStageuser_Remove_Manager,Invoke-FreeIPAAPIStageuser_Remove_Principal,Invoke-FreeIPAAPIStageuser_Show,Invoke-FreeIPAAPISudocmdgroup_Add,Invoke-FreeIPAAPISudocmdgroup_Add_Member,Invoke-FreeIPAAPISudocmdgroup_Del,Invoke-FreeIPAAPISudocmdgroup_Find,Invoke-FreeIPAAPISudocmdgroup_Mod,Invoke-FreeIPAAPISudocmdgroup_Remove_Member,Invoke-FreeIPAAPISudocmdgroup_Show,Invoke-FreeIPAAPISudocmd_Add,Invoke-FreeIPAAPISudocmd_Del,Invoke-FreeIPAAPISudocmd_Find,Invoke-FreeIPAAPISudocmd_Mod,Invoke-FreeIPAAPISudocmd_Show,Invoke-FreeIPAAPISudorule_Add,Invoke-FreeIPAAPISudorule_Add_Allow_Command,Invoke-FreeIPAAPISudorule_Add_Deny_Command,Invoke-FreeIPAAPISudorule_Add_Host,Invoke-FreeIPAAPISudorule_Add_Option,Invoke-FreeIPAAPISudorule_Add_Runasgroup,Invoke-FreeIPAAPISudorule_Add_Runasuser,Invoke-FreeIPAAPISudorule_Add_User,Invoke-FreeIPAAPISudorule_Del,Invoke-FreeIPAAPISudorule_Disable,Invoke-FreeIPAAPISudorule_Enable,Invoke-FreeIPAAPISudorule_Find,Invoke-FreeIPAAPISudorule_Mod,Invoke-FreeIPAAPISudorule_Remove_Allow_Command,Invoke-FreeIPAAPISudorule_Remove_Deny_Command,Invoke-FreeIPAAPISudorule_Remove_Host,Invoke-FreeIPAAPISudorule_Remove_Option,Invoke-FreeIPAAPISudorule_Remove_Runasgroup,Invoke-FreeIPAAPISudorule_Remove_Runasuser,Invoke-FreeIPAAPISudorule_Remove_User,Invoke-FreeIPAAPISudorule_Show,Invoke-FreeIPAAPITopic_Find,Invoke-FreeIPAAPITopic_Show,Invoke-FreeIPAAPITopologysegment_Add,Invoke-FreeIPAAPITopologysegment_Del,Invoke-FreeIPAAPITopologysegment_Find,Invoke-FreeIPAAPITopologysegment_Mod,Invoke-FreeIPAAPITopologysegment_Reinitialize,Invoke-FreeIPAAPITopologysegment_Show,Invoke-FreeIPAAPITopologysuffix_Add,Invoke-FreeIPAAPITopologysuffix_Del,Invoke-FreeIPAAPITopologysuffix_Find,Invoke-FreeIPAAPITopologysuffix_Mod,Invoke-FreeIPAAPITopologysuffix_Show,Invoke-FreeIPAAPITopologysuffix_Verify,Invoke-FreeIPAAPITrustconfig_Mod,Invoke-FreeIPAAPITrustconfig_Show,Invoke-FreeIPAAPITrustdomain_Add,Invoke-FreeIPAAPITrustdomain_Del,Invoke-FreeIPAAPITrustdomain_Disable,Invoke-FreeIPAAPITrustdomain_Enable,Invoke-FreeIPAAPITrustdomain_Find,Invoke-FreeIPAAPITrustdomain_Mod,Invoke-FreeIPAAPITrust_Add,Invoke-FreeIPAAPITrust_Del,Invoke-FreeIPAAPITrust_Fetch_Domains,Invoke-FreeIPAAPITrust_Find,Invoke-FreeIPAAPITrust_Mod,Invoke-FreeIPAAPITrust_Resolve,Invoke-FreeIPAAPITrust_Show,Invoke-FreeIPAAPIUser_Add,Invoke-FreeIPAAPIUser_Add_Cert,Invoke-FreeIPAAPIUser_Add_Certmapdata,Invoke-FreeIPAAPIUser_Add_Manager,Invoke-FreeIPAAPIUser_Add_Principal,Invoke-FreeIPAAPIUser_Del,Invoke-FreeIPAAPIUser_Disable,Invoke-FreeIPAAPIUser_Enable,Invoke-FreeIPAAPIUser_Find,Invoke-FreeIPAAPIUser_Mod,Invoke-FreeIPAAPIUser_Remove_Cert,Invoke-FreeIPAAPIUser_Remove_Certmapdata,Invoke-FreeIPAAPIUser_Remove_Manager,Invoke-FreeIPAAPIUser_Remove_Principal,Invoke-FreeIPAAPIUser_Show,Invoke-FreeIPAAPIUser_Stage,Invoke-FreeIPAAPIUser_Status,Invoke-FreeIPAAPIUser_Undel,Invoke-FreeIPAAPIUser_Unlock,Invoke-FreeIPAAPIVaultconfig_Show,Invoke-FreeIPAAPIVaultcontainer_Add_Owner,Invoke-FreeIPAAPIVaultcontainer_Del,Invoke-FreeIPAAPIVaultcontainer_Remove_Owner,Invoke-FreeIPAAPIVaultcontainer_Show,Invoke-FreeIPAAPIVault_Add_Internal,Invoke-FreeIPAAPIVault_Add_Member,Invoke-FreeIPAAPIVault_Add_Owner,Invoke-FreeIPAAPIVault_Archive_Internal,Invoke-FreeIPAAPIVault_Del,Invoke-FreeIPAAPIVault_Find,Invoke-FreeIPAAPIVault_Mod_Internal,Invoke-FreeIPAAPIVault_Remove_Member,Invoke-FreeIPAAPIVault_Remove_Owner,Invoke-FreeIPAAPIVault_Retrieve_Internal,Invoke-FreeIPAAPIVault_Show,Invoke-FreeIPAAPIWhoami,Set-FreeIPAAPICredentials,Import-FreeIPAAPICrendentials,Set-FreeIPAAPIServerConfig,Get-FreeIPAAPIAuthenticationCookie
Export-ModuleMember -Alias Add-IPAAci,Remove-IPAAci,Find-IPAAci,Set-IPAAci,Rename-IPAAci,Show-IPAAci,Test-IPAAdtrustEnabled,Add-IPAAutomember,Add-IPAAutomemberCondition,remove-IPAAutomemberDefaultGroup,set-IPAAutomemberDefaultGroup,show-IPAAutomemberDefaultGroup,Remove-IPAAutomember,Find-IPAAutomember,Set-IPAAutomember,Build-IPAAutomember,Remove-IPAAutomemberCondition,Show-IPAAutomember,Add-IPAAutomountkey,Remove-IPAAutomountkey,Find-IPAAutomountkey,Set-IPAAutomountkey,Show-IPAAutomountkey,Add-IPAAutomountlocation,Remove-IPAAutomountlocation,Find-IPAAutomountlocation,Show-IPAAutomountlocation,Build-IPAFilesAutomountlocation,Add-IPAAutomountmap,Add-IPAAutomountmapIndirect,Remove-IPAAutomountmap,Find-IPAAutomountmap,Set-IPAAutomountmap,Show-IPAAutomountmap,Use-IPABatch,Add-IPACaacl,Add-IPACaaclCa,Add-IPACaaclHost,Add-IPACaaclProfile,Add-IPACaaclService,Add-IPACaaclUser,Remove-IPACaacl,Disable-IPACaacl,Enable-IPACaacl,Find-IPACaacl,Set-IPACaacl,Remove-IPACaaclCa,Remove-IPACaaclHost,Remove-IPACaaclProfile,Remove-IPACaaclService,Remove-IPACaaclUser,Show-IPACaacl,Add-IPACa,Remove-IPACa,Disable-IPACa,Enable-IPACa,Find-IPACa,Test-IPACaEnabled,Set-IPACa,Show-IPACa,Set-IPACertmapconfig,Show-IPACertmapconfig,Add-IPACertmaprule,Remove-IPACertmaprule,Disable-IPACertmaprule,Enable-IPACertmaprule,Find-IPACertmaprule,Set-IPACertmaprule,Show-IPACertmaprule,Search-IPAMatchCertmap,Remove-IPACertprofile,Find-IPACertprofile,Import-IPACertprofile,Set-IPACertprofile,Show-IPACertprofile,Find-IPACert,Remove-IPACertHold,Request-IPACert,Revoke-IPACert,Show-IPACert,Get-IPAStatusCert,Find-IPAClass,Show-IPAClass,Get-IPADefaultsDefaults,Find-IPACommand,Show-IPACommand,Test-IPACompatEnabled,Set-IPAConfig,Show-IPAConfig,Add-IPACosentry,Remove-IPACosentry,Find-IPACosentry,Set-IPACosentry,Show-IPACosentry,Add-IPADelegation,Remove-IPADelegation,Find-IPADelegation,Set-IPADelegation,Show-IPADelegation,Set-IPADnsconfig,Show-IPADnsconfig,Add-IPADnsforwardzone,Add-IPADnsforwardzonePermission,Remove-IPADnsforwardzone,Disable-IPADnsforwardzone,Enable-IPADnsforwardzone,Find-IPADnsforwardzone,Set-IPADnsforwardzone,Remove-IPADnsforwardzonePermission,Show-IPADnsforwardzone,Add-IPADnsrecord,Remove-IPADnsrecord,Remove-IPADnsrecordEntry,Find-IPADnsrecord,Set-IPADnsrecord,Show-IPADnsrecord,Split-IPADnsrecordParts,Find-IPADnsserver,Set-IPADnsserver,Show-IPADnsserver,Add-IPADnszone,Add-IPADnszonePermission,Remove-IPADnszone,Disable-IPADnszone,Enable-IPADnszone,Find-IPADnszone,Set-IPADnszone,Remove-IPADnszonePermission,Show-IPADnszone,Test-IPADnsEnabled,Resolve-IPADns,Update-IPADnsSystemRecords,Get-IPADomainlevel,Set-IPADomainlevel,Use-IPAEnv,Add-IPAGroup,Add-IPAGroupMember,Remove-IPAGroup,Remove-IPAManagedGroup,Find-IPAGroup,Set-IPAGroup,Remove-IPAGroupMember,Show-IPAGroup,Add-IPAHbacrule,Add-IPAHbacruleHost,Add-IPAHbacruleService,Add-IPAHbacruleSourcehost,Add-IPAHbacruleUser,Remove-IPAHbacrule,Disable-IPAHbacrule,Enable-IPAHbacrule,Find-IPAHbacrule,Set-IPAHbacrule,Remove-IPAHbacruleHost,Remove-IPAHbacruleService,Remove-IPAHbacruleSourcehost,Remove-IPAHbacruleUser,Show-IPAHbacrule,Add-IPAHbacsvcgroup,Add-IPAHbacsvcgroupMember,Remove-IPAHbacsvcgroup,Find-IPAHbacsvcgroup,Set-IPAHbacsvcgroup,Remove-IPAHbacsvcgroupMember,Show-IPAHbacsvcgroup,Add-IPAHbacsvc,Remove-IPAHbacsvc,Find-IPAHbacsvc,Set-IPAHbacsvc,Show-IPAHbacsvc,Use-IPAHbactest,Add-IPAHostgroup,Add-IPAHostgroupMember,Remove-IPAHostgroup,Find-IPAHostgroup,Set-IPAHostgroup,Remove-IPAHostgroupMember,Show-IPAHostgroup,Add-IPAHost,Add-IPAHostCert,Add-IPAHostManagedby,Add-IPAHostPrincipal,Approve-IPAHostCreateKeytab,Approve-IPAHostRetrieveKeytab,Remove-IPAHost,Disable-IPAHost,Deny-IPAHostCreateKeytab,Deny-IPAHostRetrieveKeytab,Find-IPAHost,Set-IPAHost,Remove-IPAHostCert,Remove-IPAHostManagedby,Remove-IPAHostPrincipal,Show-IPAHost,Get-IPAMessagesI18n,Add-IPAIdoverridegroup,Remove-IPAIdoverridegroup,Find-IPAIdoverridegroup,Set-IPAIdoverridegroup,Show-IPAIdoverridegroup,Add-IPAIdoverrideuser,Add-IPAIdoverrideuserCert,Remove-IPAIdoverrideuser,Find-IPAIdoverrideuser,Set-IPAIdoverrideuser,Remove-IPAIdoverrideuserCert,Show-IPAIdoverrideuser,Add-IPAIdrange,Remove-IPAIdrange,Find-IPAIdrange,Set-IPAIdrange,Show-IPAIdrange,Add-IPAIdview,Publish-IPAIdview,Remove-IPAIdview,Find-IPAIdview,Set-IPAIdview,Show-IPAIdview,Undo-IPAIdview,Use-IPAJoin,Get-IPAMetadata,Test-IPAKraEnabled,Set-IPAKrbtpolicy,Reset-IPAKrbtpolicy,Show-IPAKrbtpolicy,Add-IPALocation,Remove-IPALocation,Find-IPALocation,Set-IPALocation,Show-IPALocation,Do-IPADsMigrate,Add-IPANetgroup,Add-IPANetgroupMember,Remove-IPANetgroup,Find-IPANetgroup,Set-IPANetgroup,Remove-IPANetgroupMember,Show-IPANetgroup,Set-IPAOtpconfig,Show-IPAOtpconfig,Add-IPAOtptoken,Add-IPAOtptokenManagedby,Remove-IPAOtptoken,Find-IPAOtptoken,Set-IPAOtptoken,Remove-IPAOtptokenManagedby,Show-IPAOtptoken,Find-IPAOutput,Show-IPAOutput,Find-IPAParam,Show-IPAParam,Use-IPAPasswd,Add-IPAPermission,Add-IPAPermissionMember,Add-IPAPermissionNoaci,Remove-IPAPermission,Find-IPAPermission,Set-IPAPermission,Remove-IPAPermissionMember,Show-IPAPermission,Use-IPAPing,Get-IPAStatusPkinit,Use-IPAPlugins,Add-IPAPrivilege,Add-IPAPrivilegeMember,Add-IPAPrivilegePermission,Remove-IPAPrivilege,Find-IPAPrivilege,Set-IPAPrivilege,Remove-IPAPrivilegeMember,Remove-IPAPrivilegePermission,Show-IPAPrivilege,Add-IPAPwpolicy,Remove-IPAPwpolicy,Find-IPAPwpolicy,Set-IPAPwpolicy,Show-IPAPwpolicy,Add-IPARadiusproxy,Remove-IPARadiusproxy,Find-IPARadiusproxy,Set-IPARadiusproxy,Show-IPARadiusproxy,Set-IPARealmdomains,Show-IPARealmdomains,Add-IPARole,Add-IPARoleMember,Add-IPARolePrivilege,Remove-IPARole,Find-IPARole,Set-IPARole,Remove-IPARoleMember,Remove-IPARolePrivilege,Show-IPARole,Use-IPASchema,Add-IPASelfservice,Remove-IPASelfservice,Find-IPASelfservice,Set-IPASelfservice,Show-IPASelfservice,Add-IPASelinuxusermap,Add-IPASelinuxusermapHost,Add-IPASelinuxusermapUser,Remove-IPASelinuxusermap,Disable-IPASelinuxusermap,Enable-IPASelinuxusermap,Find-IPASelinuxusermap,Set-IPASelinuxusermap,Remove-IPASelinuxusermapHost,Remove-IPASelinuxusermapUser,Show-IPASelinuxusermap,Test-IPAConnection,Remove-IPAServer,Find-IPAServer,Set-IPAServer,Find-IPAServerRole,Show-IPAServerRole,Show-IPAServer,Add-IPAServicedelegationrule,Add-IPAServicedelegationruleMember,Add-IPAServicedelegationruleTarget,Remove-IPAServicedelegationrule,Find-IPAServicedelegationrule,Remove-IPAServicedelegationruleMember,Remove-IPAServicedelegationruleTarget,Show-IPAServicedelegationrule,Add-IPAServicedelegationtarget,Add-IPAServicedelegationtargetMember,Remove-IPAServicedelegationtarget,Find-IPAServicedelegationtarget,Remove-IPAServicedelegationtargetMember,Show-IPAServicedelegationtarget,Add-IPAService,Add-IPAServiceCert,Add-IPAServiceHost,Add-IPAServicePrincipal,Approve-IPAServiceCreateKeytab,Approve-IPAServiceRetrieveKeytab,Remove-IPAService,Disable-IPAService,Deny-IPAServiceCreateKeytab,Deny-IPAServiceRetrieveKeytab,Find-IPAService,Set-IPAService,Remove-IPAServiceCert,Remove-IPAServiceHost,Remove-IPAServicePrincipal,Show-IPAService,Disconnect-IPA,Get-IPAStatusSidgenRun,Enable-IPAStageuser,Add-IPAStageuser,Add-IPAStageuserCert,Add-IPAStageuserCertmapdata,Add-IPAStageuserManager,Add-IPAStageuserPrincipal,Remove-IPAStageuser,Find-IPAStageuser,Set-IPAStageuser,Remove-IPAStageuserCert,Remove-IPAStageuserCertmapdata,Remove-IPAStageuserManager,Remove-IPAStageuserPrincipal,Show-IPAStageuser,Add-IPASudocmdgroup,Add-IPASudocmdgroupMember,Remove-IPASudocmdgroup,Find-IPASudocmdgroup,Set-IPASudocmdgroup,Remove-IPASudocmdgroupMember,Show-IPASudocmdgroup,Add-IPASudocmd,Remove-IPASudocmd,Find-IPASudocmd,Set-IPASudocmd,Show-IPASudocmd,Add-IPASudorule,Add-IPASudoruleAllowCommand,Add-IPASudoruleDenyCommand,Add-IPASudoruleHost,Add-IPASudoruleOption,Add-IPASudoruleRunasgroup,Add-IPASudoruleRunasuser,Add-IPASudoruleUser,Remove-IPASudorule,Disable-IPASudorule,Enable-IPASudorule,Find-IPASudorule,Set-IPASudorule,Remove-IPASudoruleAllowCommand,Remove-IPASudoruleDenyCommand,Remove-IPASudoruleHost,Remove-IPASudoruleOption,Remove-IPASudoruleRunasgroup,Remove-IPASudoruleRunasuser,Remove-IPASudoruleUser,Show-IPASudorule,Find-IPATopic,Show-IPATopic,Add-IPATopologysegment,Remove-IPATopologysegment,Find-IPATopologysegment,Set-IPATopologysegment,Initialize-IPATopologysegment,Show-IPATopologysegment,Add-IPATopologysuffix,Remove-IPATopologysuffix,Find-IPATopologysuffix,Set-IPATopologysuffix,Show-IPATopologysuffix,Confirm-IPATopologysuffix,Set-IPATrustconfig,Show-IPATrustconfig,Add-IPATrustdomain,Remove-IPATrustdomain,Disable-IPATrustdomain,Enable-IPATrustdomain,Find-IPATrustdomain,Set-IPATrustdomain,Add-IPATrust,Remove-IPATrust,Build-IPATrustDomains,Find-IPATrust,Set-IPATrust,Resolve-IPATrust,Show-IPATrust,Add-IPAUser,Add-IPAUserCert,Add-IPAUserCertmapdata,Add-IPAUserManager,Add-IPAUserPrincipal,Remove-IPAUser,Disable-IPAUser,Enable-IPAUser,Find-IPAUser,Set-IPAUser,Remove-IPAUserCert,Remove-IPAUserCertmapdata,Remove-IPAUserManager,Remove-IPAUserPrincipal,Show-IPAUser,Move-IPADelToStageUser,Get-IPAStatusUser,Restore-IPAUser,Unlock-IPAUser,Show-IPAVaultconfig,Add-IPAVaultcontainerOwner,Remove-IPAVaultcontainer,Remove-IPAVaultcontainerOwner,Show-IPAVaultcontainer,Add-IPAVaultInternal,Add-IPAVaultMember,Add-IPAVaultOwner,Move-IPAToArchiveVaultInternal,Remove-IPAVault,Find-IPAVault,Set-IPAVaultInternal,Remove-IPAVaultMember,Remove-IPAVaultOwner,Get-IPAVaultInternal,Show-IPAVault,Use-IPAWhoami,Set-IPACredentials,Import-IPACrendentials,Set-IPAServerConfig,Connect-IPA