Powershell function call changing passed string into int
问题 So I am using the kind of buggy Sapien powershell studio to make a powershell driven GUI application, and I am attempting to perform an ADSI query. $nameOfDeviceInput is a System.Windows.Forms.TextBox On one form, I have the following function: $buttonPerformAction_Click={ if (FindInAD($nameOfDeviceInput.Text).Count -gt 0) { $buttonPerformAction.BackColor = 'Red' $buttonPerformAction.Text = "System already exists in AD with that name. Try another name" return } ..... } On the "main" form, I