Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

powershell populate a validate set from script

$
0
0

I waht to streamline a bit of a function with a validate set. Using GShell I can get each of the groups email addresses from the Google email domain as follows

Powershell
(Get-GAGroup-all).email

What I would like to do is have this code populate a validate set on the custom function below (what I have is wrong I know) so I don't have to look at my admin console to see what the group names are

Powershell
functionGet-GoogleGroupMembers{[CmdletBinding()]Param(# Param1 help description[Parameter(Mandatory=$true,ValueFromPipelineByPropertyName=$true,Position=0)][ValidateScript({(Get-GAGroup-All).email})][string]$Group="")(Get-GAGroupMember-GroupName$group).email}

Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>