Hello all,
I cannot get this cmdlet to log any output. In the help file it does say the following:
PassThru
Returns the new or modified object. By default (i.e. if -PassThru is not specified), this cmdlet does not generate any output.
I'm not exactly sure what I'm doing wrong as I've specified this option and I still cannot log any output. I've tried all the following variations:
Move-ADObject -Identity $ADObject.dn -TargetPath $OU -PassThru >> $logfile Move-ADObject -Identity $ADObject.dn -TargetPath $OU -PassThru | Tee-Object -file $logfile -append
I've also tried these without the -passthru parameter. Move-ADObject does display output on screen but I want to log this output. I was able to log it with Start-Transcription, however, the output from this command is ugly. It put all output on one line... very unreadable. Does anyone have any advice?
Thanks!