Write a Powershell script. iterate over a windows filesystem. Collect fullnames. Iterate…
Private research annotation
Sign in to add a private research label or note.
- User
Write a Powershell script. iterate over a windows filesystem. Collect fullnames. Iterate over the SIDs for each folder. Write Fullname and SID to a CSV.
- Assistant
Here's a PowerShell script that should accomplish what you're looking for. This script will iterate over a specified directory, collect the full names of each folder, retrieve the owner SID for each folder, and write the full name and SID to a CSV file.
Please replace
C:\Your\Directory\Pathwith the actual directory path you want to iterate over.powershell
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.