How can User Manager Pro be used to validate my service configuration or even restart services?
User Manager Pro can be used to obtain a list of services on your Windows 2000 or later based workstation or server using Windows Management Instrumentation (WMI). This report will gather information pertaining to service configuration such as run as account, startup type, and current running status.
To obtain this information, simply open the reporting dialog in User Manager Pro (Get Info) and select WMI | Advanced System Information Report Configuration. In the “Available WMI Objects” area, select WIN32_Service. You may either right-click on WIN32_Service and choose to add all properties, or choose the specific properties from the “Properties for Currently Selected WMI Object” area. Typically, you will only need the following properties:
- Display Name – the name of the service in the services snap-in
- Service Start Mode – automatic, manual, disabled
- Service State – running, not running
- Start name – the name of the account running the service
If you see a service that is stopped or started that should not be stopped or started. You can use User Manager Pro to start or stop the service. This makes use of a simple batch file created by you and the Push/Run feature of User Manager Pro.
The batch file is simple and consists generally of one line per service. In the following examples, %service% is meant to represent the abbreviated name of the service as noted in the “Instance” column of the report.
- Create a file called service.cmd.
- Edit the file using a text editor such as notepad. If you are trying to start a service, the command is “net start %service%” without the quotes. If you are trying to stop a service, the command is “net stop %service%”. If you are trying to restart a service, you can either stop and start on two different lines in the command file or use the following command “net stop %service% && net start %service%”.
- Save the file.
- In User Manager Pro, select the systems you wish to manage from the systems list.
- Select Push/Run Application from the MANAGE menu.
- Go to the “Copy Files to Machines” tab.
- Click the ADD button in the lower right corner of the dialog to add the file you just created to the file copy list
- In the “Path of file on Local Machine”, specify a local path to the file you just created.
- In the “Path of file on Remote Machine(s)” field, type in the network path to the target system using %system% as a variable to represent the target system’s name. User Manager Pro will replace the name automatically. In the example, we will copy the service.cmd file to the scripts directory at the root of the C drive of the target system. The network path becomes “\\%system%\c$\scripts\service.cmd”.
- Now go to the “Application to Run” tab.
- In the application to run field, type in the path to the script file on the target system as a local path. For example, if you copied the file from your host [UMP] system to “\\%system%\c$\scripts\service.cmd” then the local path would be represented as “C:\scripts\service.cmd”.
- Click OK to begin the process. User Manager Pro will copy the script file to the target systems to the specified directory. User Manager Pro will then configure an AT task on the target system which will run at the nearest minute and then delete itself upon completion.
- As a final step you could re-run the services report as noted in step NN to validate that the service had started or stopped. Be sure to wait a minute or two for the task to initiate and complete.