Author Archive

How to point a client to different domain controller


16 May

Here is a useful command that I’ve discovered.
Imagine a situation where you have a domain called domain.local with multiple domain controllers DC0, DC1 etc.
For some reason some clients are not working as expected or working slower. In my case it was when I tried to run gpresult /r on some clients it was taking ages to provide full details. To find out if any of the domain controllers is having problems I wanted quickly to change the domain controller that the affected client is using.
Back in the day when Windows NT 4 ruled the world there was a command called setprfdc (set preferred domain controller) nltest does something similar.

So first I wanted to find out what DC the client is using. Now there are many different ways but here is a command that I’ve used:
nltest /dsgetdc:domain.local
(more…)

dns.exe high memory usage in Server 2008 R2


11 May

Here is an interesting problem with DNS service. I have a new domain with domain controller running Server 2008 R2. I’ve noticed that the server is using more memory than expected. The DNS service is using 605MB of RAM which way too much.

I’ve checked on the other domain which have Server 2003 R2 domain controller and DNS service on these domain contoller are using ~20MB. (more…)

LED stair lighting based on Arduino, Part 6


01 May

This project has been frozen for some time but I’ve picked it up again, not much progress has been done mainly because I don’t have the electronic components. Buying them in Ireland is a bit expensive so I mainly use Ebay to get them form UK or Asia. The problem with Ebay is that it takes time for the components to arrive.
Anyway I’ve been playing around with shift register 74HC595 as I’ve ran out of digital PWM pins on my arduino. By using only 3 digital pins and 74HC595 I can control 8 LEDs but it is also possible to add more 74HC595 and that means more LEDs without using more digital outputs.
The problem is that  for my application 74HC595 is not suitable as it does not support PWM. It is possible to make LEDs fade using code but I did not like the results that I was getting.

The solution is to use TLC5940 which supports PWM. So back to the drawing board

HP Proliant dl160 G6 blank screen (hanging) after restart


29 Apr

Here is an interesting issue that I’ve came across while deploying a bunch of HP Proliant DL160 G6 servers.
You restart the server and the it would hang with blank screen, the fans would be running at full speed.  To make the server boot you have to remove the power to the server and plug it bak again. This is a known issue and it was can be fixed by updating the Bios firmware of the server to Version: 2011.01.25 (B). 
Resolved an issue where the system will occassionally hang early in POST with the fans at max speed with the 12LFF hard disk backplane installed.

Get it from here: DL160 G6 Bios Firmware

SSL Certificate add failed, Error: 1312


25 Mar

You are trying to bind SSL certificate ot a port number using the the following command:
netsh http add sslcert ipport=0.0.0.0:8000 certhash=0000000000003ed9cd0c315bbb6dc1c08da5e6 appid={00112233-4455-6677-8899-AABBCCDDEEFF}

The command failes with error:
SSL Certificate add failed, Error: 1312
A specified logon session does not exist. It may already have been terminated. (more…)

Change registry permissions


18 Mar

So lets say you need to change registry permissions and give all domain users full rights to a specific key HKEY_LOCAL_MACHINE\SOFTWARE\My_App.
You can use Group Policy but also you can use a batch file. Batch file can be setup to run on system startup or you could push it with SCCM if you have it installed.

To change registry permissions you can use regini.exe and it should be on every Windows host but I think there is a better and easier tool(well at least to me) and it is called SetACL. This tool can be used to manage not only registry permission but also File Permissions, Auditing etc.
First download SetACL and from the download package extract command line version as this is what will be used in the script to c:\temp. There are 2 versions 32bit and 64bit, choose the one you need. (more…)

Powershell command would not run


14 Mar

Here is my first Powershell problem. I’m not good in powershell as I don’t use it too often but ussually i find my way pretty quickly. Well except this time…
So here is my problem:
I have old Altiris Deployment server that I use for deploying server images. When I’m imaging 2008R2 servers I need to install server Roles and Features. Powershell here comes pretty handy as I only have to use Add-WindowsFeature command plus a list of Roles or Features that I want to add.
I created a file called powershell.ps1 that adds all the roles and features that I need plus does some configuration. I ran powershell -command powershell.ps1 on the test server to see if everything is installed and configured as expected. Everything went OK.
So next in Altiris I create a new job that copies a powershell.ps1 file and then runs it. (more…)

A problem occured while installing selected Windows SDK components. Unknown property.


09 Mar

Here is one of the problems that took me some time to figure out.
I had to install Microsoft Windows SDK for Windows 7 and .NET Framework 4 on Server 2008 R2. But it would not install.
There are 2 ways to install it:
Web install using winsdk_web.exe a small too that download all the files during installation.
ISO imgae that has all required files already.
I’ve tired both methods and bot of them failed almost instantly with the following error message:
A problem occured while installing selected Windows SDK components. Unknown property.

(more…)

System.Exception: No certificate was found in the cert store for user


05 Mar

Recently I’ve wrote about certificate problem in WCF applications. Here is another one:
When starting WCF application the following error is logged Event ID: 0

Internal exception occured: System.Exception: No certificate was found in the cert store for user: comp_1\WCF_AppUser

So first lets see what certificate is the application looking for. Locate the application files and open application config file with notepad.
Now search for serviceCertificate you should see the line like below:
<serviceCertificate storeLocation=”LocalMachine” storeName=”My” x509FindType=”FindBySubjectName” findValue=”*.domain.local”/>

As you can see the application is looking for * wildcard certificate called *.domain.local
Open Certificates management console and make sure that the certificate named in config file is there. If not, you need to import it.
(more…)

How to read registry value remotely in all computers in the domain


04 Mar

I had a task to find out what versions of PowerShell we have installed on the computers in the domain.
PowerShell version is stored in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\PowerShellEngine\
There is a a string called PowerShell version and the value of the string is the version of the PowerShell that is installed on the computer.
After looking around I came up with the following script:

On Error Resume Next

Dim objGroup, objFSO, strFile, objFile

Const HKEY_LOCAL_MACHINE = &H80000002
Const ForWriting = 2
Const OpenAsASCII = 0
Const CreateIfNotExist = True
Const ADS_SCOPE_SUBTREE = 2

strFile = “c:\powershell.txt”
(more…)

IT Blog

Just another blog on Kozeniauskas.com Network