Questions tagged [windows-administration]

47 questions
99
votes
9 answers

Check if the current user is administrator

My application needs to run some scripts, and I must be sure that the user running them is an administrator... What is the best way of doing this using C#?
Fliskov
  • 1,025
  • 1
  • 8
  • 7
26
votes
2 answers

Enable Windows 10 Developer Mode programmatically

I know you can enable Windows 10 Developer mode interactively by going to Settings | For developers, selecting 'Developer mode' and then rebooting. Is there a way to enable this programmatically? (eg. via PowerShell or similar so that I can include…
David Gardiner
  • 16,892
  • 20
  • 80
  • 117
6
votes
0 answers

postgresql: pg_ctl status shows no server running when the server is running as a windows service

I have PostgreSQL 9.4(not installed, rather self configured) which is also installed as a Windows service. Now I am trying to check the status of the server using pg_ctl.exe status -D data_dir_path, but it only shows the status when I start the…
ShaDooW
  • 483
  • 6
  • 18
2
votes
0 answers

What needs to be enable for remote WUApiLib

What needs to be enabled on the remote PC so that I could use WUApiLib remotely? I have this code that returns me the error 80070005 Type t = Type.GetTypeFromProgID("Microsoft.Update.Session", "192.168.1.14"); UpdateSession uSession =…
Michal
  • 803
  • 2
  • 9
  • 26
2
votes
0 answers

Property changes log for Windows Server service

How can I define who/what made changes on Windows Service property? Are there any log files for such activties? Problem's birth: - Environment: - OS: Windows Server 2008R2(Front end) - App: Sharepoint Foundation 2010. Problem: service "Net…
2
votes
1 answer

Getting mail on windows logon with username of logged-in user

I am trying to create action task that will send mail when anyone logs in to a particular system with username of a logged in user. I am very new to this task since I never worked as a system admin anytime. What I think I should do is to specify a…
1
vote
1 answer

Administering IIS with ruby

Ill keep this short and simple. I need to find out the steps that I would have to take in order to administer IIS on a windows box using Ruby. The main thing I am trying to achieve is setting an existing websites home directory to a different…
Owen
  • 6,992
  • 7
  • 44
  • 77
1
vote
1 answer

Windows 2008 RC2 doesn't start scheduled tasks

We have problem with scheduled tasks on Windows Server 2008 RC2. Lets say that I want to open Firefox browser, everyday at same time, using batch file(we actually want to run Selenium tests, but I simplified problem). I set it, and it run fine,…
1
vote
0 answers

When executing PowerShell-Script to install software over jenkins, admin user on node lacks permissions to install

We have a setup to test software that uses a central Jenkins Master and four nodes (vSphere Win10 VMs). Recently, the pipeline that runs the tests has been failing because it can't install software components necessary for testing on the nodes. The…
fesieg
  • 467
  • 1
  • 4
  • 14
1
vote
0 answers

Windows Server 2019 MYSQL Connection Slow with intermittent problems

I have a very basic Python script running on a Windows VPS. This script is connecting to a Linux private server. This script is for testing purposes: import mysql.connector mydb = mysql.connector.connect( host="***", user="***", …
1
vote
1 answer

How to change filtering in Powershell script to create dynamic start menu with .url and .website?

Update: I am now attempting to use a Get-StartApps command instead of recursively going through the files with a filter. Now I am in need of help re-writing the logic behind the insert sections noted in #3 below. Any suggestions would be amazing! I…
1
vote
2 answers

No access to Program Files in Windows 7

I'm totally new to windows 7 and have just installed Apache server. I want to change httpd file... But when opening file with notepad and saving it, I get a message that I have no rights... My user is a member of Administrators group. What else can…
dragonfly
  • 17,407
  • 30
  • 110
  • 219
1
vote
1 answer

MSMQ creation from CLI on Windows

Is there an easy way to create a private MSMQ from command line on Windows Workstation/Server flavors? Appreciate
BreakPhreak
  • 10,940
  • 26
  • 72
  • 108
1
vote
0 answers

Powershell SendPingAsync sporadically missing live IPs

(1..254) | % { $ping = New-Object System.Net.Networkinformation.Ping [Void](Register-ObjectEvent $ping PingCompleted -Action { param($s, $e); if($e.Reply.Status -ne "TimedOut") { Write-Host $e.Reply.Address,…
1
vote
1 answer

How to keep track of number of times an exe is executed

I would like to track number of times a particular exe is executed. WIth my research so far I didn't find much of a programatic way to get the data. I found some applications like windows prefetch which could help but in my organisation I'm not…
RMu
  • 817
  • 2
  • 17
  • 41
1
2 3 4