I am having issues where I am unable to assign the value of the variable $Folder_Access_Check.Identity to an array.
Outside of Powershell Studio 2023 (in ISE) I have the same code working without issue and I'm trying to move it to a GUI but can't seem to work around this issue. Any advice would be appreciated
$Folder_Access_Checks=Get-Acl$FolderPath|ForEach-Object{$_.Access }|Select-Object-Property@{ n ="Identity"; e ={$_.IdentityReference.ToString().Split("\")[1]}}
$Valid_Folder_Groups += $Folder_Access_Check.Identity - this is the line that fails as it's not adding the information to the $Valid_Folder_Groups variable.