0

I am writing a script in PowerShell using GUI, to get the user properties which is shown in bold. i want the output to be in a LABEL control. i got the following error

*Cannot convert the "(get-Aduser $Holdaccount -properties PasswordLastSet, Pass wordExpired,PasswordNeverExpires)" value of type "System.Management.Automation.****ScriptBlock" to type "System.Int32"

1 Answers1

0

I have solved the issue, I was using +, () in the command line like shown below $var = + (get-Aduser -filter* -properties x, y,z)