|
Automatically start Automatic services |
StartAutoSvc.ps1
Description Script reads an input text file for a list of computers, examines each computer’s services, reports Automatic services not running and, optionally, starts them. Configuration Input text file lists target computers, one per line. A second input text file lists services to ignore. Path to both input files and output log file can be modified, as can the option to start the services not running. Default values:
Usage information available with -? command line argument.
ServerFile: List of target computers, one entry per line. ExcludeFile: List of services to ignore, one entry per line. LogBase: Base of log filename, optionally with date/time stamp. LogPath: Folder for log file. Date: switch, to include date in log filename. Time: switch, to include time in log filename. Start: switch, to start automatic services not running. NoStart: switch, Do not start services not running Append: Append to existing log file. Not valid with [Time] You may add a date and/or time component to the log file name with the –Date and –Time command line switches. You may append to an existing log file with the –Append command line switch, which is logically incompatible with the –Time switch. The default Start/NoStart behavior of the script can be changed by commenting/eliminating lines 584-5 within the script. Execution Run from anywhere. Target systems must have WMI enabled and remotely accessible. To start services, the account running script must have permissions to manipulate WMI on target systems. Default configuration values discussed above. Modify these with command line arguments. Include parameters with their name and value separated by a space. The Date, Time, Start, NoStart, and Append arguments are switches, entered without corresponding values.
StartAutoSvc –Time will include HH:MM.SS.ssss
StartAutoSvc – Append
StartAutoSvc –Append -Date
Arguments may be entered in any order or combination except the following combinations: Both –Start and –NoStart
Both –Append and –Time
Documentation
|