Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Viewing all articles
Browse latest Browse all 8411

PowerShell Script to Run Before Certain Service

$
0
0

Q: I need a PowerShell script to run every time my server starts, but I need it to start before a certain service; how can I do this?

A: I recently had someone ask this question because they wanted to run some PowerShell code to check and set permissions before the SQL Server service started. A typical way to run something when the machine starts up is to use the machine's policy and configure a startup script; for example:

Read More


Viewing all articles
Browse latest Browse all 8411

Trending Articles