Hello again, not sure if I should make a new thread on this or not, but since I'm still working on the same script I figured I'd just tag on this thread where it was last left off.

All functions of this script are working perfectly for me . .except for the logging. About the only thing I'm able to get working properly with the logging is the creation of the TXT file that is to be the log.

Nothing actually gets logged in the TXT file, and in running through the script in Debug I recieve no errors / failures. Just nothing is written.

I specifically want to capture only 2 things in the logs:

- The original path and name of the PST file.
- The changed path and name of the PST file.

As we have cases where multiple PST's will be processed per user I am trying to make sure that if 3 PST's are processed by the script, that the before and after data of those three PST's is logged.

I toy'd around with writeprofilestring for a while, and was able to write data, but was having issues with the log data of the 1st PST processed being over-written when a 2nd PST was being processed.

So I've changed to a writeline format, which isn't doing anything :(.

I've pulled out just the logging components of the script to try and get them working . .here's that snipit. Please someone help me figure out what I'm missing . . I don't have much hair left that can be pulled out:

 Code:

$PSTPath = "\\server\share\"
$PSTName = "Bob.pst"
$OLDPST = $PSTpath + $PSTName
$NewPSTPath = "\\Newserver\share\"
$NewPSTName = "@USERID + '.pst'"
$NewPST = $NewPSTPath + $NewPSTName
$Logpath = "\\NewServer\share\logs"
$Log = $Logpath + '\' + @WKSTA + @userid + '.txt'
$Log2 = $OLDPST + @CRLF

open (1,$Log,1)
WriteLine (1,$Log2)	
Close (1)



I should also point out that RedirectOutput which was used for logging in the original script didn't seem to be working for me either, hence the change.

Thanks in advance for assistance on this.

Lan