We're trying to create a Powershell script that copies the Skype database file from multiple PCs to a backup location and then outputs the results to a text file. We're using PDQ Deploy to push the Powershell script to multiple PCs. The copy procedure and output to text file works fine, however, we'd like the text file to be formatted differently. I've attached 3 text files - log.txt shows the current output, log2.txt shows the desired output and backup_database.txt is the script. Could you advise how we can change the script to get this to format correctly?
Also, for some reason, the first letter of the username is sometimes removed as you can see with 'ewis' which should be 'Lewis' and we're not sure why?