All Questions
Tagged with services powershell
19
questions
16
votes
3
answers
66k
views
How to check whether a specific service exists using Powershell?
Introduction
According to this documentation it is possible to check which services have been stopped on Windows by executing the following command:
Get-Service | Where-Object {$_.status -eq "...
8
votes
1
answer
16k
views
How to Create Local Windows Desktop Service Accounts?
Question:
In Windows Home / Professional, (Windows 10), what is the recommended way to create a Local Service Account?
Is there any documentation for this? (Powershell, GUI, etc).
Clarification: ...
7
votes
3
answers
48k
views
Powershell Get-AppxPackage not working
This is the error:
Get-AppxPackage -AllUsers
Get-AppxPackage : The service cannot be started, either because it is disabled or because it has no enabled devices
associated with it.
The service cannot ...
5
votes
2
answers
5k
views
Only return state of a service when using sc.exe query
When using the following command to return information about a service to a file :
sc.exe query MyService >> MyFileLocation\MyFile.txt
I get the following information in the file :
SERVICE_NAME:...
3
votes
3
answers
4k
views
Synchronously stop a remote service with Powershell
I have a custom deployment script written in Powershell. This script needs to update a service on a remote machine, and as such, it first needs to stop it to be able to modify the executable files.
...
1
vote
1
answer
551
views
How do I detect the presence of a new service on a windows server via PowerShell script
We have a need to detect installation of new services on our application servers. These are Windows 2016 & 2019 servers. I decided to write and schedule a PS script that will run twice a day. This ...
1
vote
1
answer
2k
views
Cannot enable or restart Windows Firewall
I am trying to fix some problems related to Windows Calculator, Clock, etc., but I encounter an error while trying to run the PowerShell command:
Get-AppxPackage -allusers *windowscalculator* | ...
1
vote
0
answers
83
views
Get-Service returns service from source machine, not remote machine
I have:
My local machine
Remote machine one (foo1.bin.com)
Remote machine two (foo2.bin.com)
I have the following piece of code:
Get-Service -ComputerName foo2.bin.com
When I run this code from my ...
1
vote
0
answers
632
views
Windows Time Service is Missing
I have Windows 10 Pro installed on my PC. After the last update I have a problem with the time as it changes continuously either after startup or while using the PC. Searching online, I noticed that ...
0
votes
2
answers
4k
views
Start and stop Windows services using PowerShell
I'm running both Apache (as a Windows service) and IIS 10, and would like to be able to toggle each of these services on or off, as they both grab port 80, and I don't wish to configure either to use ...
0
votes
1
answer
4k
views
Powershell Get-Service : how do I filter out the services that are disabled?
I'm trying to start multiple services using :
Get-Service SERVICE* | Start-Service
When Get-Service returns services that are disabled, I run into the following error :
+ CategoryInfo : ...
0
votes
1
answer
79
views
Exercising clean code
I have a script that if kept on the same line, it'll be quite annoying to edit. But at the point at where I want to break line, I get the error when running,
-ApplicationParameter : The term '-...
0
votes
0
answers
145
views
How to check what is controlling/restarting a Windows Service or view its errors?
There are services which can be found in services.msc
As example, WlanSvc the WLAN AutoConfig.
How can I check which "thing" initiated a Stop or a Restart on a service?
With "thing"...
0
votes
0
answers
618
views
Disable a device's service from powershell or command line
Just read the bold text for the basic rundown!
I have a bluetooth headset that I use for gaming, however because it has a mic I have to disable the "handsfree telephony" service every time I pair the ...
0
votes
1
answer
3k
views
Windows service : how to run a program with administrator privileges?
I would like to create a windows service that launches a Powershell script with administrator privileges. To do so, I used PowerGUI to transform my script into an exe file and I also used PowerGUI to ...