I would make that a function.
In the param you specify which parameter accepts pipeline input.
param ( [CmdletBinding()] [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string]$Cluster)
I would make that a function.
In the param you specify which parameter accepts pipeline input.
param ( [CmdletBinding()] [Parameter(Mandatory=$true,ValueFromPipeline=$true)] [string]$Cluster)