Comments (6)
hey @IronKane2 - can you post some sample code? Based on your output, it looks like you're trying to cast the results to string, which by default returns the type name of the object being cast if there's no working ToString()
method
Here's what I expect is happening by command in the below screenshot:
- Run
Get-GSUser
and store in variable$user
(defaults to the AdminEmail in the config) - Cast
$user
to string by surrounding it in quotes ("$user"
), replicating your issue - Just run
$user
and get the full object back
from psgsuite.
You can do the same thing with almost any object lacking a ToString()
method:
PS > $hash = @{}
PS > "$hash"
Output:
System.Collections.Hashtable
from psgsuite.
I figured out how to do it:
[Google.Apis.Admin.Directory.directory_v1.Data.User]$GAFE = Get-GSUser -User $Student.mail
I had to implicitly declare the variable type before loading it.
from psgsuite.
@IronKane2 shouldn't need to do that at all, you can see that not happening in my example above. An object will return the type name if you're casting it to string or implicitly declaring the variable as a string type when setting it, i.e. [string]$GAFE = Get-GSUser -User $Student.mail
.
Try running the following and let me know if it works for you:
$GAFE = Get-GSUser -User $Student.mail
$GAFE
from psgsuite.
After a reboot all was well. thanks.
from psgsuite.
@IronKane2 sweet, glad to hear you're sorted out!
from psgsuite.
Related Issues (20)
- Additional Reports Since Last Edited HOT 1
- Send-GmailMessage: Special characters not displayed as expected in HTML Body HOT 1
- Inconsistent Get-GSUser "IsEnrolledIn2Sv" field results when multiple users are returned HOT 1
- Update-GSChromeOSDevice - Wipe devices User Profile Only HOT 6
- PowerShell Constrained Language mode HOT 1
- Setup Guide Unclear / Not up to Date HOT 5
- Dynamically Generating Functions for Slide/Doc/Sheet updates
- Create Documents and Presentations
- 2.37.0 release is too big for Azure Automation
- Add option to enable conversation history HOT 1
- Licensing Data out of date HOT 4
- Still being developed?
- Add Last Known Network to Get-GSChromeOSDevice HOT 8
- Get-GSGmailSignature ... Update-GSGmailSignature HOT 1
- Update-GSUser support for unarchiving HOT 2
- Update-GSUserSecuritySettings -User User -AllowLessSecureApps -$True
- Set group labels via CloudIdentity API
- I am getting error in gsuite assement
- Initial Setup Instructions Need Updating (Here's what worked for me) HOT 1
- Implement retries with exponential backoff for long running commands like Get-GSDriveFileList
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psgsuite.