Remote Desktop license error


1. Start>Run> regedit
2. In the regedit console, browse for or navigate to the key HKLM\SOFTWARE\Microsoft\MSLicensing
4. Right click on the key name “MSLicensing” and select DELETE.
5. Close Regedit
6. Do NOT open any shortcuts for Remote Connections at this point.  Instead, you need to open the Remote Desktop Connection Manager.  It’s VERY important that you do this by RIGHT clicking on the program and selecting “Run as administrator”. If you don’t do this properly, the registry key you deleted in step 4 will not be recreated.  The Remote Desktop Connection Manager can be found at: START>All Programs>Accessories>Remote Desktop Connection.
7. Select the remote connection you want to use and click “Connect.”  If you have done this properly, a new registry key will be added that will have updated licensing information.

MS reference :http://technet.microsoft.com/en-us/library/cc756826(v=ws.10).aspx

FIX Volume Shadow Copy Service writers issue.

“VSS FIX” (tested) only for 2008 and 2008R2 servers.
* Copy the below commands in the same format to a notepad and save it as .bat file. Run this bat file to fix VSS writer issues. Requires elevation.
* This bat file re-register all the VSS dlls.
* Will work on Windows 2008 and Windows 2008 R2 servers.
* After this, Run command VSSADMIN LIST WRITERS
* Check if System writer is listed. If System writer is not listed run the next set of commands.
net stop “System Event Notification Service”
net stop “Background Intelligent Transfer Service”
net stop “COM+ Event System”
net stop “Microsoft Software Shadow Copy Provider”
net stop “Volume Shadow Copy”
cd /d %windir%\system32
net stop vss
net stop swprv
regsvr32 /s ATL.DLL
regsvr32 /s comsvcs.DLL
regsvr32 /s credui.DLL
regsvr32 /s CRYPTNET.DLL
regsvr32 /s CRYPTUI.DLL
regsvr32 /s dhcpqec.DLL
regsvr32 /s dssenh.DLL
regsvr32 /s eapqec.DLL
regsvr32 /s esscli.DLL
regsvr32 /s FastProx.DLL
regsvr32 /s FirewallAPI.DLL
regsvr32 /s kmsvc.DLL
regsvr32 /s lsmproxy.DLL
regsvr32 /s MSCTF.DLL
regsvr32 /s msi.DLL
regsvr32 /s msxml3.DLL
regsvr32 /s ncprov.DLL
regsvr32 /s ole32.DLL
regsvr32 /s OLEACC.DLL
regsvr32 /s OLEAUT32.DLL
regsvr32 /s PROPSYS.DLL
regsvr32 /s QAgent.DLL
regsvr32 /s qagentrt.DLL
regsvr32 /s QUtil.DLL
regsvr32 /s raschap.DLL
regsvr32 /s RASQEC.DLL
regsvr32 /s rastls.DLL
regsvr32 /s repdrvfs.DLL
regsvr32 /s RPCRT4.DLL
regsvr32 /s rsaenh.DLL
regsvr32 /s SHELL32.DLL
regsvr32 /s shsvcs.DLL
regsvr32 /s /i swprv.DLL
regsvr32 /s tschannel.DLL
regsvr32 /s USERENV.DLL
regsvr32 /s vss_ps.DLL
regsvr32 /s wbemcons.DLL
regsvr32 /s wbemcore.DLL
regsvr32 /s wbemess.DLL
regsvr32 /s wbemsvc.DLL
regsvr32 /s WINHTTP.DLL
regsvr32 /s WINTRUST.DLL
regsvr32 /s wmiprvsd.DLL
regsvr32 /s wmisvc.DLL
regsvr32 /s wmiutils.DLL
regsvr32 /s wuaueng.DLL
sfc /SCANFILE=%windir%\system32\catsrv.DLL
sfc /SCANFILE=%windir%\system32\catsrvut.DLL
sfc /SCANFILE=%windir%\system32\CLBCatQ.DLL
net start “COM+ Event System”
———————————————————————————————–
 If System writer is not listed when you check for the writers, run the below commands with elevated command prompt or can be created as a bat file :-
Takeown /f %windir%\winsxs\temp\PendingRenames /a
icacls %windir%\winsxs\temp\PendingRenames /grant “NT AUTHORITY\SYSTEM:(RX)”
icacls %windir%\winsxs\temp\PendingRenames /grant “NT Service\trustedinstaller:(F)”
icacls %windir%\winsxs\temp\PendingRenames /grant BUILTIN\Users:(RX)
Takeown /f %windir%\winsxs\filemaps\* /a
icacls %windir%\winsxs\filemaps\*.* /grant “NT AUTHORITY\SYSTEM:(RX)”
icacls %windir%\winsxs\filemaps\*.* /grant “NT Service\trustedinstaller:(F)”
icacls %windir%\winsxs\filemaps\*.* /grant BUILTIN\Users:(RX)
net stop cryptsvc
net start cryptsvc
For Windows 2012, if system writer missing, refer: http://support.microsoft.com/KB/2807849
Found a handy reference linking VSS Writers to Services.
VSS Writer
Service Name
Service Display Name
ASR Writer
VSS
Volume Shadow Copy
BITS Writer
BITS
Background Intelligent Transfer Service
COM+ REGDB Writer
VSS
Volume Shadow Copy
IIS Config Writer
AppHostSvc
Application Host Helper Service
IIS Metabase Writer
IISADMIN
IIS Admin Service
Microsoft Exchange Writer
MSExchangeIS
Microsoft Exchange Information Store
Microsoft Hyper-V VSS Writer
vmms
Hyper-V Virtual Machine Management
Registry Writer
VSS
Volume Shadow Copy
Shadow Copy Optimization Writer
VSS
Volume Shadow Copy
System Writer
CryptSvc
Cryptographic Services
WMI Writer
Winmgmt
Windows Management Instrumentation

NATO PHONETIC Alphabets

Standard alphabets for Voice communication

Server Unexpected Shutdown/BSOD/Dump file analysis

Generally event ID 6008 generating in server for unexpected shutdown.The below steps we have to follow to know the root cause of server shutdown.
  • Configure you server to track shutdown/reboot. If not please “Configure Shutdown Event Tracker on the Local Computer”http://technet.microsoft.com/en-us/library/cc732119.aspx
  • First check the server whether it is configured for dump file or not. If it is configured check the path %systemroot%\mindump\ folder and find is there any *.dmp file located in there.
  • The below snap-shot helps you to configure server for dump file. Also to set mini dump file path & disable automatically restart option as shown in screen shot.
 
 
 
 
 
Sometimes server restart automatically to stop automatic restart of server please un-check the marked option in below snap shot. Also try to boot server in safe mode and check for the similar kind of issue? Another useful step is go to run and type msconfig|startup|uncheck startup items which are not required.
Based on the dump file analysis, we can find either system process/file name/ hardware failures along with the  respective bug check string codes.
Here is the link for various bug check codes and troubleshooting steps
Some times dump file partially corrupt and which is not allowed to analyse the file to find the root cause of server shutdown.

Configure Folder share and working with NTFS permissions.

Query
I have a scenario where I have to create share with individual folders for three different groups.
· Userabelongs to Group1 supposed to access group1_share.
· Userbbelongs to Group2 supposed to access group2_share.
· Usercbelongs to Group3 supposed to access group3_share.
Test details are.
Domain name: win2k12.com
Share name:Testshare created inside C drive.
Folder details inside share: Group1_share, Group2_share and Group3_share
Solution:
Server side steps:
1.   Open AD console in domain controller then create usera, userb and userc and make them member of user group group1, group2 and group3 respectively.
2.   Create 3 different folder inside a share in either C drive or D drive (Better user non system drive for file share) and follow default steps of share wizard. By default access based enumeration (ABE) option set automatically while creating a share.
 
3. Now set NTFS permissions to folder Group1_share, Group2_share and Group3_share to usera, userb and usercrespectively.
4. Right-click Group1_share>Properties>security> select Group1 group and give them modify permissions.
Follow same step while setting up NTFS permissions to other two folders as well.
Workstation side steps:
5. Logon into workstation with usera login and access a share (using direct link instead of browsing all shares) \\win2k2\testshare\group1_share\

6.Others group users cannot access group1_share why because we have not set any NTFS permissions to group2 & 3 users. Similarly group1 users cannot access other two shares.


Useful links for better understanding in setting up folder share.

Make USB/Pen drive Bootable using DISKPART.EXE

 

Make USB bootable using diskpart.exe
Run command prompt with elevated rights
Start>type cmd> Right-click cmd (top of menu)> Run as Administrator
C:\>diskpart
Microsoft DiskPart version 6.1.7600
Copyright (C) 1999-2008 Microsoft Corporation.
On computer: MYPC
DISKPART> list disk
  Disk ###  Status         Size     Free     Dyn  Gpt
  ——–  ————-  ——-  ——-  —  —
  Disk 0    Online          931 GB   132 GB            —– –HDD
  Disk 1    Online         7633 MB      0 B              —– —USB Pen Drive
DISKPART> select disk 1 ——Disk 1 is an USB Pen drive of 8GB
 Disk 1 is now the selected disk.
 
DISKPART> Clean
DISKPART> Create partition primary
DISKPART> List partition
  Partition ###  Type              Size     Offset
  ————-  —————-  ——-  ——-
  Partition 1    Primary           7632 MB  1024 KB
DISKPART> select partition 1 —— Select the partition of USB Pen drive
Partition 1 is now the selected partition.
DISKPART> active—— Make the partition active
DiskPart marked the current partition as active.
DISKPART> list partition
  Partition ###  Type              Size     Offset
  ————-  —————-  ——-  ——-
* Partition 1    Primary           7632 MB  1024 KB  —— * Symbol denotes that the partition active
DISKPART> FORMAT FS=NTFS LABEL=”My USB” QUICK COMPRESS—— format pen drive and label it.
  100 percent completed
DiskPart successfully formatted the volume.
DISKPART> ASSIGN Letter=F —–Assign the drive letter to your pen drive, here drive letter is F.
DISKPART> Exit ——-Exit from Diskpart utility
Now browse OS DVD/ISO and extract files to your USB pen drive then reboot a server to install OS from pen drive.
Or
xcopy D:\*.* F:\ /E /H /F —Copy and paste all the content of D drive (DVD/CD) to F drive (USB) at one go. 

 

Working with Task Scheduler

1.How best we can define a task using task scheduler in windows server.
Before getting into actual topic we must know the task types.Generally we can see two types of tasks in scheduler, one is Basic task and another one is Task.Basic task is one which we can create using scheduler wizard with minimal options where as Task is the one which have lot of options to be customized and will created in desired manner.
Also we can see the difference between task scheduler console based on OS versions.  Here we take Windows 2003 and Windows 2008 R2 as an examples.
To open a console, go to 

Control panel>Scheduled Tasks —in windows 2003
Control Panel\All Control Panel Items\Administrative Tools\Task Scheduler –in windows 2008 R2 

Windows 2003 Console view

Create Basic task:-  Follow the steps based on the schedule task wizard. Useful snap-shot.
Create Task:
Control panel>Scheduled Tasks>File>New>Scheduled Task






Properties window will be like below and have less options, tasks to be run from command/script.Time to run a task followed by the settings. Security settings to run a task in general (local/domain) user/admin or local system authentication.
When we see windows 2008 R2 console,we can have lot of options to define a schedule task and window will like below.
 I personally observed many times, defined task in task scheduler not giving the results as user/administrator expected.
Possible errors are
Improper security options. In general we have two options 
Run only when user is logged on —Tasks runs only when user session is active.
Run whether user is logged on or not—Tasks runs irrespective of user session is active/in-active. But when choose this option we have to enter user credentials info, server caching this info and will  be used when its needed. But this is not a reliable option why because according to IT security policy user passwords  will change for every 45 days. 
So, schedule tasks will be used for long run may fail to run. To avoid failures we have to use local system account for authentication purpose.Also many of script based/program based tasks can be configured using local system account.










When you are working with windows 2008/2008 R2 task scheduler, tasks can be configured based on the version. If we miss this there will be a chance failures. So we must be keen in setting up proper configuration option.


2. Sample illustration to reboot a server on schedule basis. 
So we have to create a task with the help task scheduler and reboot the server once in a week.

  • Creating a task to restart server on every Sunday at 23:35 

  • Enabling Triggers: Configure the task how often or when it can be planned to run.

  • Actions: Create batch file using command “shutdown /r /f“and save it in root of C partition.Then configure script path settings and follow the wizard.

  • Conditions:Follow the default settings if you don’t to do any customization.

  • Settings:Configure settings based on your task requirement.

  • History: This help us monitoring the schedule task how is running and moreover it will help us in troubleshooting when we have issue with particular task

Note:The above illustration is applicable to Windows Server 2008 & 2008 R2

3.Schedule task completed with error code 0X1:
Generally some task which are defined in task scheduler completed with error.It may be because of improper settings of task configuration.

Open a Task Scheduler console from Control Panel\All Control Panel Items\Administrative Tools\
Choose Create new task/create basic task and follow task wizard steps.
General settings and choose the options as per the below snap-shot.
Trigger>Choose the specific time/date when the task should be run.
Actions>This tab is heart of the task and use particular program or script to run. Better use C:\ or C:\tasks folders for script path instead of desktop and other places.
Conditions and Settings>These tabs are the options we can use to define a task more precise manner.
History>This tab gives us more info that when the task has been started, how it is running details like process, services info and when it is completed successfully.Also gives us info that the task might be completed with warnings/errors.

Reference links:
Technet link: http://technet.microsoft.com/en-us/library/cc766428.aspx