You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PSGSuite already supports pipeline, but parts of it can be somewhat non-intuitive to use (i.e. piping Get-GSUser -Filter "IsAdmin -eq '$false'" | Update-GSUser -Suspended:$false would not actually unsuspend all the admins, as it would attempt to pass the entire User object and not just the PrimaryEmail)
Also, this will simultaneously remove the Select-Object calls after each object, instead using Add-Member to not break the object type.
All in all, here's what's planned:
Replace Select-Object with Add-Member:
# From this...$userObj|Select-Object@{N="User";E= {$User}},*# To this...$userObj|Add-Member-MemberType NoteProperty -Name 'User'-Value $User-PassThru
Override the built-in ToString() method on the object:
…ck function
#### 2.6.0
* Added: `Compare-ModuleVersion` function to get latest installed version and compare against the latest version on the PSGallery ([Issue #44](#44))
* Fixed: Pipeline support, so you can do things like the following and get group, group member and user details (as an example) easily ([Issue #45](#45)):
```powershell
#much pipe
$users = Get-GSGroup $groupEmail -Verbose -OutVariable group | Get-GSGroupMember -Verbose -OutVariable members | Get-GSUser -Verbose
#contains the group's info
$group
#contains the group members' info
$members
#contains the group members' full user info
$users
```
PSGSuite already supports pipeline, but parts of it can be somewhat non-intuitive to use (i.e. piping
Get-GSUser -Filter "IsAdmin -eq '$false'" | Update-GSUser -Suspended:$false
would not actually unsuspend all the admins, as it would attempt to pass the entire User object and not just the PrimaryEmail)Also, this will simultaneously remove the Select-Object calls after each object, instead using Add-Member to not break the object type.
All in all, here's what's planned:
ToString()
method on the object:The text was updated successfully, but these errors were encountered: