Tuesday, December 15, 2015

Why you should NOT remove .NET Framework 4.5 in Windows 2012 R2

Dear All,

I am writing this post after lot of struggling to find out the root cause of Issue which I faced when we removed .NET Framework 4.5 from Windows Server 2012 R2.

Action taken before issue : Uninstalled .NET Framework 4.5


http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-59-75-metablogapi/image_5F00_79583822.png

http://blogs.technet.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-00-59-75-metablogapi/clip_5F00_image005_5F00_5ABE4779.jpg
Issue reported : 
- GUI got uninstalled. MSTSC / Remote was loading only command prompt.
No any GUI options were available. 
- Powershell was not available



Resolution : 

Thankfully there is a revert back process for this.
Run below command ONE BY ONE (It will take lot of time. Dont worry event if it dosent show any progress on Screen. Grab some Coffee and have 10 Min break). 

DISM.exe /online /enable-feature /all /featurename:NetFx4
 

DISM.exe /online /enable-feature /all /featurename:MicrosoftWindowsPowerShell

Goto Powershell by Typing "PowerShell" at Command Prompt.

Install-WindowsFeature Server-Gui-Shell, Server-Gui-Mgmt-Infra

Restart-Computer 



Finally you got your beautiful GUI Back. Congrats!

Do comment if it helped you. Cheers!!!

Thursday, October 1, 2015

Windows / Sharepoint / User Temp files Auto deletion PowerShell Script

Windows / Sharepoint / User Temp files Auto deletion PowerShell Script

+++++++++++++++++++++++++++++++++++++++++
$tempfolders = @("C:\Windows\Temp\*", "C:\Users\*\Appdata\Local\Temp\*", "C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\*", "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\PETGeneral\DMSTemp\*" ,"C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\PETV2\DMSTemp\*")

Remove-Item $tempfolders -force -recurse

+++++++++++++++++++++++++++++++++++++++++

Copy above text in PS1 file. e.g. TempFileDeletion.ps1

Schedule it with Windows Task Scheduler :



Run the below command in PowerShell for changing Execution Policy.



Its Done.

Friday, August 21, 2015

How to get the list of connected Tape Drives in EMC VNX Unified Storage | NAS (CIFS)

Question : How to get the list of connected Tape Drives in VNX Unified Storage | NAS (CIFS)

Solution :

1) Open Putty/Kitty


2) Login to VNX / NAS

3) Run following commands :
server_devconfig server_2 -l -scsi -nondisks

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...