Tag Archives: Windows Server

The option for activating Server 2012 by phone is kinda hidden, so I have to write this down before I forget it: Win+R – SLUI 4

Today I was presented with a task that sounded pretty boring and repetitive: Install the Windows Search service on all our citrix servers. Now, I could just log on each and every one of our citrix servers, open Server Manager and then install the role service but where’s the fun in that? As always Powershell is a lot more fun: First I had to find the name of all our citrix servers. Luckily we have a strict naming convention so I could just poll Active Directory and store the names in an array: $servers = Get-ADComputer -Filter ‘Name -like “ctx_srv*”‘ | select name Next I only had to create a foreach loop that enters a PSSession on each of the servers and install the role service: $servers | ForEach-Object { Enter-PSSession -ComputerName $_.name import-module servermanager Add-WindowsFeature FS-Search-Service Exit-PSSession } It is worth mentioning that you can’t connect to remote servers using…

Read more

OpenService FAILED 5: Access is denied. — “Oh crap!” If you ever see this error and need to reset the DACL on a Windows service, let’s say in case you (or someone else) accidentally deletes it, or configure it to something that prevents you from reading it’s security settings, this might do the trick: First of all, get a cup of coffee. Download PsExec (a tool in PsTools), which among other things allow you  to run commands as the “local system” account. Find out what the real name of the service is by looking in the following registry key: HKLMSYSTEMCurrentControlSetServices The real name (not the display name) of the service is the name of the key itself. Start a Command Prompt (cmd) window as administrator. Start a new cmd session as the system account: PsExec.exe /s cmd Now it’s time to set a new DACL, this is done by using the command “sc sdset”…

Read more

3/3