Quantcast
Channel: PowerShell General
Viewing all articles
Browse latest Browse all 10624

Create a log file?

$
0
0

I have a Powershell script I've written that "builds" a Windows 7 PC with all the accounts, apps, users, etc that we need.  Is there a simple way to create a log that lets you know all went okay?  For example, we have various batch scripts we run where all the commands go to various log files, such as "cp C:\temp\*.* C:\Support > C:\logs\update.log". That way we can see either "3 files copied" or see errors if there were any to pinpoint where an error might be occurring.

Is there something similar I can do with Powershell after each command?


Viewing all articles
Browse latest Browse all 10624

Trending Articles