Skip to content

New-AtwsClientPortalUser gives a validation error #127

@knific

Description

@knific

I am trying to add new client portal user:

New-AtwsClientPortalUser -ContactID 12345678 -UserName "user@foo.bar" "Einfach" -DateFormat "dd.MM.yyyy" -TimeFormat "HH:mm" -NumberFormat "X.XXX,XX" -ClientPortalActive $true`

I get a vaildation error:

WARNING: dd.MM.yyyy is not one of dd.MM.yyyy2
New-AtwsClientPortalUser: Cannot validate argument on parameter 'DateFormat'. The "
      $set = (Get-AtwsPicklistValue -Entity ClientPortalUser -FieldName DateFormat -Label) + (Get-AtwsPicklistValue -Entity ClientPortalUser -FieldName DateFormat -Value)
      if ($_ -in $set) { return $true}
      else {
        Write-Warning ('{0} is not one of {1}' -f $_, ($set -join ', '))
        Return $false
      }
    " validation script for the argument with value "dd.MM.yyyy" did not return a result of True. Determine why the validation script failed, and then try the command again.

The picklist seems fine to me:

PS C:\Windows\System32> Get-AtwsPicklistValue -Entity ClientPortalUser -FieldName DateFormat -Label
dd.MM.yyyy

I have tried Powershell v5 and v7 with the same result.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions