I have a script that loops through a CSV file and create an AD user for each line in the file. I want to have a first transcript for the entire master job and also a separate second transcript for each loop that creates a user.
It could look something like this:
start transcript MASTER
import CSV file
foreach line in CSV file
start transcript UserX
create the user
stop transcript userX
stop transcript MASTER
Is this behavior ("nest" a transcript within a transcript) even possible in Powershell? The Start-Transcript
command allows you to save the file to a specific -Path
but the Stop-Transcript
doesn't have a switch that allows you to stop a specific one.
Maybe there is a different approach to this?