I am trying to use LastName and Firstname parameters to pull SamAccountName for users. I have created a csv file with all the names and imported to powershell. The import works ok, but following command doesn’t yield any results. No errors either.
The $(...) is called subexpression operator and here you can read more about:
In general:
Please do not post images of code or console output. Instead post the plain text and format it as code.
And I’d recommend to format your code nicely. It makes it easier to read and easier to understand.
Thanks in advance
And BTW:
If you want to use first AND last name the code should look like this: