Tuesday, October 21, 2014

Unable to access Admin Shares (e.g. D$, E$, F$, G$) remotely in Windows Server 2012

Problem : 
Not able to access windows Admin shares  (e.g. D$, E$, F$, G$) from remote location on Windows Server 2012 Virtual Machine hosted on VMware ESXi 5.1 Infrastructure.

Observations : 
You get access denied error (I dont have screenshot of it) when you try accessing the drive from remote location.

Even if you add permissions for required ID, it behaves in same manner.

In event Viewer, you will get the event as below :


It was the Virtual Machine created on VMware ESXi 5.1 Visualization platform

Solution : 

This behavior of windows is because of the Group policy applied on the server is restricting Removable storage access from remote location.

Solution can be either from Windows side(Editing Group Policy) or VMware side(Disable Hotplug / HotAdd).
I prefer VMware side solution as we done have to compromise on the security of Windows System.

Steps :

To disable HotPlug capability using the vSphere Client:
    - Connect to the ESXi/ESX host or vCenter Server using the vSphere Client.
    - Power off the virtual machine.
    - Right-click the virtual machine and click Edit Settings.
    - Click the Options tab.
    - Click General > Configuration Parameters > Add Row.
    - Insert a new row with the name devices.hotplug and a value of false.


    - Power on the virtual machine.
Reference : http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012225

And you have done it!

Enjoy accessing your favorite drives from Remote locations!!!

Please feel free to comment.

Monday, August 11, 2014

Script / Batch file to Delete the Pending.xml from multiple servers

Hey,

Many windows servers generates Pending.xml file due to inconsistent windows updates. Due to this file, future windows updates does not get installed.

Manually deleting Pending.xml is a huge task as it has multiple steps, e.g. taking ownership of file. Adding full permissions to particulate user on that file, etc. So I thought to create a batch file which will reduce the time of administrator for this activity.

IMP : Make sure that you run this batch file with "Run As Administrator" and with the user who is having administrative permissions on the server.
Note1 : Change DOMAIN\User with the domain user with which you will delete the pending.xml file.
Note2 : Change SERVER1NAME, SERVER2NAME, etc  with the server name where the pending.xml file is present.

Copy below text and save it in PENDINGXMLDELETE.BAT file.

Have a Great Day Ahead!!!


REM Batch File Start
SET PSNO=DOMAIN\User

SET SERVER1=SERVER1NAME
SET SERVER2=SERVER2NAME
SET SERVER3=SERVER3NAME
SET SERVER4=SERVER4NAME
SET SERVER5=SERVER5NAME
SET SERVER6=SERVER6NAME


takeown /f \\%SERVER1%\c$\Windows\WinSxS\pending.xml
cacls \\%SERVER1%\c$\Windows\WinSxS\pending.xml /G %PSNO%:F
del \\%SERVER1%\c$\Windows\WinSxS\pending.xml

takeown /f \\%SERVER2%\c$\Windows\WinSxS\pending.xml
cacls \\%SERVER2%\c$\Windows\WinSxS\pending.xml /G %PSNO%:F
del \\%SERVER2%\c$\Windows\WinSxS\pending.xml

takeown /f \\%SERVER3%\c$\Windows\WinSxS\pending.xml
cacls \\%SERVER3%\c$\Windows\WinSxS\pending.xml /G %PSNO%:F
del \\%SERVER3%\c$\Windows\WinSxS\pending.xml

takeown /f \\%SERVER4%\c$\Windows\WinSxS\pending.xml
cacls \\%SERVER4%\c$\Windows\WinSxS\pending.xml /G %PSNO%:F
del \\%SERVER4%\c$\Windows\WinSxS\pending.xml

takeown /f \\%SERVER5%\c$\Windows\WinSxS\pending.xml
cacls \\%SERVER5%\c$\Windows\WinSxS\pending.xml /G %PSNO%:F
del \\%SERVER5%\c$\Windows\WinSxS\pending.xml

takeown /f \\%SERVER6%\c$\Windows\WinSxS\pending.xml
cacls \\%SERVER6%\c$\Windows\WinSxS\pending.xml /G %PSNO%:F
del \\%SERVER6%\c$\Windows\WinSxS\pending.xml


REM Batch File End

Friday, August 8, 2014

Step by step process to extend the disk in Windows Server 2003 cluster

Hi,

Recently I was trying to increase the space in one of the share drive of Windows Server 2003 Cluster.
By default Disk management console does not allow to directly extend the drive.

After Googling I found the below solution for the same. Hope that it will help you too.
*) Backup the Drive which you want to extend
1) Extend the LUN from storage side.
2) Login to node which is having specified drive ownership and make sure that the free space is visible.
3) Open a command prompt, type diskpart, and then press ENTER.
4) At the DISKPART prompt, type list volume , and then press ENTER to display the existing volumes on the computer.
5) At the DISKPART prompt, type select volume <volume number>, and then press ENTER. Here volume number is the number of the volume that you want to extend. The volume has the unique name that you created in step 6. The volume is listed in the output of the list volume command.
6) At the DISKPART prompt, type extend, and then press ENTER to extend the partition into all of the available disk space to the end of the drive. Or, type extend size=<size> to extends the selected volume by size megabytes (MB).
7) Type exit, and then press ENTER to exit the command prompt.




And if still you are facing issue in extending the LUN then follow below procedure.
 Process for Extension :
1) Backup the Drive which you want to extend
2) Extend the disk from SAN Storage
3) Shutdown one node in cluster.
4) Login to another node.
5) Open the Disk Management snap-in, verify that the new free space is added to the end of the proper drive.
6) Open a command prompt, type diskpart, and then press ENTER.
At the DISKPART prompt, type list volume , and then press ENTER to display the existing volumes on the computer.
At the DISKPART prompt, type select volume <volume number>, and then press ENTER. Here volume number is the number of the volume that you want to extend. The volume has the unique name that you created in step 6. The volume is listed in the output of the list volume command.
At the DISKPART prompt, type extend, and then press ENTER to extend the partition into all of the available disk space to the end of the drive. Or, type extend size=<size> to extends the selected volume by size megabytes (MB).
Type exit, and then press ENTER to exit the command prompt.




Hope this helps you.

Solved : The user profile failed to attach. The process cannot access the file becase it is being used by another process

Issue :  The user profile failed to attach. Please contact Support. Status : 0x0000000B, Message: Cannot open virtual disk Error Code: 0x000...