Posts

Active Directory Trust Relationship

I fired up a virtual machine on my lab server today to do some tests around Citrix and I got the well know message that "The trust relationship between this workstation and the primary domain failed." I got this because my server had been offline for a long time and thus hadn't connected to any domain controller. To fix this issue you can use the powershell command  Reset-ComputerMachinePassword   that is available on Windows Server 2012 R2. To my opinion this is the faster way to fix the issue comparing to leaving the domain and joining again or the method using NETDOM. So, you have to do the following: Log in to the server using a local user with administrator  privileges Start powershell with administrator privileges (Run As Administrator) Run the above command (Reset-ComputerMachinePassword) Restart the server (Restart-Computer) That's it!

NetScaler Management Login Log

I recently visited a client and started doing some health checks on the NetScaler pair they're using. Among other messages I got a message that a user was trying to log in to the appliances using SSH. The message on the Command Center did not provide any information about the source of the attemts, only the username used. Since these attempts were about fine a day and at certain times of the day, I realized that it should be some kind of monitoring tool. But I had to get the IP of the source in order to investigate further... The first few searches did not yell any results since they were all related to the AAA servers that could be set up on the NetScaler. I then decided to search within the BSD system logs and put the NetScaler logs aside. You can find the login attempts, for the NetScaler system, by reviewing the log file located at /var/log/auth.log I found the IP of the source there and it was a monitoring tool!

Adobe Reader Disable Tools and Fill & Sign Menus

Image
Being an engineer taking part in a VDI project, I was asked today if the menus "Tools" and "Fill & Sign" could be disabled from the master image's adobe reader. After a few searches I found out that the quickest way to do this is to rename two files in the "C:\Program Files\Adobe\Reader 11.0\Reader\Services" folder, "DEXEchoSign.spi" and "DEXShare.spi". After renaming the files, open Adobe Reader, close it and open it again. The menus should have disappeared just like in the following picture.

Hyper-V Disk Resize

One of the cool features with Hyper-V 3 and Windows Server 2012 R2 is the ability to resize virtual hard disks without the need to shutdown the virtual machine, use diskpart and WinPE etc... You just have to open up Hyper-V Manager and use the edit wizard on the hard disk that needs more space. The more "cool" way to do this is to use powershell of course! You can use the following command on the parent partition (this is the Hyper-V host) to extend the hard disk: Get-VM "WindowsServer2012" | Get-VMHardDiskDrive -ControllerType SCSI | Resize-VHD -SizeBytes 100GB There are some limitations though... You won't be able to use the edit hard disk wizard when the virtual machine has snapshots. This is also supported only on VHDX virtual disks connected to SCSI adapters. I can't say I haven't resized the virtual hard disk of a snapshot with the above command but you should not do this because you will break the chain. You shouldn't have snapshots a...

Windows Server DHCP Migration

With Microsoft Windows Server 2003 End Of Live coming up in a few months, a growing number of companies start to examine the migration plans. Most times the DHCP in installed on the 2003 server and has to be migrated. In case you do not have a complicated DHCP configuration with many reservations or options it may be easier to just install the DHCP role on the new server and configure it from scratch. You should be very careful though when having both servers active because this will result in IP conflicts. To avoid conflicts I use exclusion ranges. I just exclude let's say half of the IPs from one server and the other half from the other. Even after that, there might be conflicts also because there might be clients that have already got an IP from the range that you excluded on the old server. Thus you should wait for a period of time longer than the lease time. If you want to migrate the entire DHCP configuration, there is a great article on Technet that describes the proces...

Powershell Get MAC Address

Below is a powershell function used to get a list of MAC addresses on a computer using WMI: function Get-MACAddress { <#     .SYNOPSIS       Displays the list of MAC addresses on a computer.     .DESCRIPTION      This function lists all MAC addresses on local computer or a remote one using WMI.     .EXAMPLE      Get-MACAddress      This command returns a list of all MAC addresses on the local computer.     .EXAMPLE      Get-MACAddress -ComputerName client01 -Credential $cred      This command returns a list of all MAC addresses on computer 'client01' using the $cred credentials. #>     Param     (         [string]$ComputerName = ".",         [system.management.automation.psCredential]$Credential     )     if($Credential)     {   ...

NetScaler IP Address Conflict

I opened up my Citrix Command Center today and I had hundreds of messages regarding IP conflict -on a NetScaler. In order to resolve this I had to get the MAC address of the machine that creates the conflict, and what better way from the command line. I fired up Putty and connected to the NetScaler instance facing the conflict. I switched to the linux shell using the shell command and then I run nsconmsg -K /var/nslog/newnslog -d consmsg to get the relevant messages. Be vary careful with the above command and always use capital K. An other way to get this kind of messages it using the Diagnostics page within the GUI. Another thing to note is that you should check the HA status if you have two instances and you get the conflict about a VIP. If the IP with the conflict is the NSIP then you should check the network cables or the virtual adapters and the networks you have the connected to.