title: powershell variable not printing value as expected
body: <pre><code>$FShares = "\\server\share"
  
  ForEach ($f in $FShares)
  
  {
  
      $Access = Get-Acl $f | select-object -ExpandProperty Access | Select-Object IdentityReference,FileSystemRights | Where-Object {$_.IdentityReference -like "XXXXXXXXX*"} 
      Write-Output "------- Share ------------------------------"
      Write-Output ""
      Write-Output $f
      Write-Output ""
      ForEach ($a in $Access)
      {
          Write-Output "------- Groups, Permission and Users -------"
          Write-Output ""
          Write-Output $a
          Write-Output ""
          $strGroup = $a.IdentityReference.ToString()
          $Members = $strGroup.split('\')[1] | foreach {Get-ADGroupMember -Recursive $_} | select-object Name
          Write-Output $Members
          Write-Output ""
          Write-Output ""
      }
  }
  </code></pre>
  
  <p>When I run this script, the line (Write-Output $Members) does not print to screen. After I run the script I can run it manually (either doing a write-output or just the variable name) and it prints fine so I know that the variable has a value. not sure what's wrong here</p>