Forum Discussion

Matt_P_Standing's avatar
Matt_P_Standing
Brass Contributor
Feb 22, 2024
Solved

Extracting the value from a pipeline variable

HELP! I am going mad with this!   I am trying to enumerate a SharePoint group name using PowerShell. I'm using this: $SiteMembersGroup = get-pnpsitegroup | where {$_.Title -like "*members"} |...
  • LainRobertson's avatar
    Feb 22, 2024

    Matt_P_Standing 

     

    Hi, Matt.

     

    If you don't want it presented as an object, use this format instead, as this will give you just a flattened string value - or a collection of strings if more than one site matches your wildcard specification.

     

     

    $SiteMembersGroup = (get-pnpsitegroup | where {$_.Title -like "*members"}).Title;

     

     

    Cheers,

    Lain

Resources