Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Can a Param VALIDATESET include a command?

$
0
0

Hi Everyone,

I was wondering, can i include a command instead of an array of strings? so that i can generate the the array automatically.

I was thinking something like the example below to generate the Exchange site list.

[ValidateSet((Get-ExchangeServer).site.name | Group-Object | select name))]

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles