I have 2 scripts that run, the first Pulls Several attributes from AD IE Name, Displayname, email, enabled (and several others) I have this writing to a CVS file.
The Second one Checks Membersof to find a specific Group and comes back with a true/false response, what I need to be able to is Append a new column in to the current CSV with the true false response.
The Import file is a text file with UserID's.
Get-Content .\users.txt | ForEach-Object { Get-ADUser -Filter {Name -eq $_} -Property Name,displayName,Enabled,LockedOut,PasswordExpired,EmailAddress,msExchHideFromAddressLists,msRTCSIP-Userenabled,PasswordLastSet,homeDirectory,DistinguishedName,UID | Select-Object Name,displayName,Enabled,LockedOut,PasswordExpired,PasswordLastSet,EmailAddress,msExchHideFromAddressLists,msRTCSIP-Userenabled,homeDirectory,DistinguishedName,@{name=UID;expression={$_.UID -join ;}}}| Export-CSV "ADinfo.csv" -NoTypeInformation 2nd Script Get-Content C:\DRV\users.txt | ForEach-Object { {if ((Get-ADUser $User -Properties memberof).memberof -like "CN=Securitygroup*"){$true}Else {$false}} <create csv code> }}I know you can append to created a running Log but can you append to a new column?