Posts

Active Directory NTP

Due to the fact that most Windows authentication operations rely heavily on Kerberos and the significant part that time plays, you should always configure time sources for your active directory forests and domains. In active directory all computers update their time settings from the domains controllers and they in turn update using the domain controller holding the PDC Emulation FSMO role. So you should always verify that your PDC is able to access the extrnal time source. The command I use to check this is  w32tm /stripchart /computer:time.nist.gov.  If you do not get any errors from this command then you're probably set. Another way to check this is to check your firewall's logs after configuring the time settings on PDC. Since a different department may be responsible for the networking, the first way may be the best way to go. One last thing I use do is to run the command on some clients that may have firewalls between them and the domain controllers or to verify N...

Skydrive Crashing

For quite some time now, the Skydrive application on my computer was crushing. I was getting errors in the Application log stating: "Faulting application name: skydrive.exe, version: 6.3.9600.17278". I could also see a lot of Skydrive icons in the tray but they disappeared when I hovered the mouse over them. After some online searched I runned across a post suggesting to use the Onedrive Troubleshooter (you can get it from  here ) to search for problems and reset Onedrive if needed. I ended up resetting and everything is working fine now after an initial sync. There are also some command line switches you can use on skydrive.exe to stop and reset but I haven't used them.

How to get Microsoft Windows system info using Powershell

There are many times that I have to get the system information like Windows Edition, Version, Architecture etc, in order to create support case or post to a forum. Since I use Powershell for almost everything, I have a script with the following commands to get that info: Windows Edition (Get-WmiObject -class Win32_OperatingSystem).Caption Windows Version (Get-WmiObject -class Win32_OperatingSystem).Version Processor Info (Get-WmiObject -Class Win32_OperatingSystem).OSArchitecture I'm using WMI cause I want to be able to get the above info from remote systems as well. If you want more information about a system take a look at the Win32_OperatingSystem class  here . If you want to act based on the above info, it may be better to use some environmental variables and get the exact values.

Windows Username to SID mapping

I needed to map the sids of some users to their usernames the other day so I though that I should be able to use WMI to do it. Indeed, you can use the command wmic useraccount get name,sid  that will output a list of usernames and their sids. If you try to run this on Powershell you'll get an error message about invalid GET expression, that is because of the comma. You can use the Start-Process cmdlet and start the command with the necessary arguments.

Citrix Access Gateway 4.5 Certificate Renew

I had a request recently to update the certificates on two Citrix Access Gateways v4.5. I had the certificates for the URLs in .pfx format and the Root CA certificates also cause these had also expired. The Citrix Access Gateway Administration Tool was installed at one of the Web Interface servers so the only thing I had to do was to convert the certificates and install them. I installed the OpenSSL libraries to a Windows 7 vm, copied the certificates over and converted them with the command:  openssl pkcs12 -in c:\certs\ yourcert .pfx -out c:\certs\cag.pem –nodes I also converted the Root CA certificates to Base64 format. I logged into the devices using the Administration tool, switched to the "Administration" tab and updated the Root CA certificate and then the certificate for the URL. These certificates had a different private key from the previous ones so I selected the option to upload the private key too. After that, I restarted the devices  and eve...

Powershell Error Handling

Writing powershell scripts often; If yes, I believe that you have to be checking for errors for every command. A quick way that I use if to check the variable $error. I get the value $error.Count before a command and then compare that value to the value after the command. If it's increased, something went wrong. You may also want to get the error that occurred. Good news, you can use the variable $error[0]. For any other stuff, take a look at the other members and properties of the $error variable..

Java Update Group Policy

For quite some time now I have users that complain about the Java update notifications and want me to log in and update with my credentials. Since there is not need to have the latest Java version available as soon as possible, I decided to create a group policy object and disable the update notifications and process for all client computers. I will of course continue to update Java on those computers manually. There are two ways to do this, either create a ADM file with the settings or just add the changes as registry settings. I decided to create a new group policy object with just the registry settings. The keys you have to change are different for every combination of processor architecture and java architecture. Thus, you have three cases: x64 Windows and x86 Java Set REG_DWORD with name EnableJavaUpdat e located at HKLM\Software\Wow6432Node\JavaSoft\Java Update\Policy to 0 x86 Windows and x86 Java or x64 Windows and x64 Java Set REG_DWORD with name EnableJavaUpdate lo...