-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get-GSUser with first and last name #10
Comments
Hey Cooper, With the current released version, Get-GSUser is limited to what Google Here's an example that I just tested with: Get-GSUserList -Query "name='Nate Ferrell'" That all being said, v2.0.0 of PSGSuite allows you to leverage Get-GSUser as a one-stop-shop to provide a level of parity with Get-GSUser -Filter "name -eq 'Nate Ferrell'" Cheers!
|
Great, thanks for the info. |
In your example, for Get-GSUserList, how can I query a user by a variable first and last name that might contain apostrophes/single quotes? |
As Google requires string search values to be wrapped in single quotes/apostrophes, you need to escape any apostrophes in your search string with a backslash. You would need to do string replacement in line if you're doing it programmatically to account for this
If you're just running commands on the fly and not storing the name in a variable:
|
Thank you for that. I decided it was faster to download the entire user list at the start of the script and use something like: $GSAccount = $googleAccounts | Where-Object { $_.name.fullName -eq $stud.Display } |
Is it possible to call Get-GSUser to fetch info for a user based on first and last name rather than username?
The text was updated successfully, but these errors were encountered: