Error on Set-PASUser
Describe the issue When running the Set-PASUser using the commands below, I get this error message. Command: Set-PASUser -id 1234 -UserName guest -NewPassword $securePWD -ChangePassOnNextLogon $true or Set-PASUser -id 1234 -UserName guest -NewPassword $securePWD
Error: ConvertTo-UnixTime : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input. At line:44 char:65
- ... ct['ExpiryDate'] = $UserProperties['ExpiryDate'] | ConvertTo-UnixTime
-
~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidArgument: (-62135575200:Int64) [ConvertTo-UnixTime], ParameterBindingException
- FullyQualifiedErrorId : InputObjectNotBound,ConvertTo-UnixTime
To Reproduce Steps to reproduce the behavior:
- Run the command above
Expected behavior A clear and concise description of what you expected to happen.
- ExpiryDate attribute is not being updated from the command unless it is a required field.
Screenshots & Console Output If applicable, add screenshots and/or console output to help explain your problem.
ConvertTo-UnixTime : The input object cannot be bound to any parameters for the command either because the command does not take pipeline input or the input and its properties do not match any of the parameters that take pipeline input.
At line:44 char:65
+ ... ct['ExpiryDate'] = $UserProperties['ExpiryDate'] | ConvertTo-UnixTime
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (-62135575200:Int64) [ConvertTo-UnixTime], ParameterBindingException
+ FullyQualifiedErrorId : InputObjectNotBound,ConvertTo-UnixTime
Your Environment
- PowerShell Version: 5.1.19041.4170
- psPAS Version: 6.4.80
- CyberArk Version: 12.2.4
Additional context
Sounds similar to #536 - its next on my list to take a look at
Thanks!