Friday, July 31, 2015

Convert Server 2012 Standard to Datacenter with a Simple Command (Evaluation to Retail)

Before you attempt to convert from evaluation to retail, verify that your server is actually running an evaluation version. To do this, do either of the following:
  • From an elevated command prompt, run slmgr.vbs /dlv; evaluation versions will include “EVAL” in the output.
  • From the Start screen, open Control Panel. Open System and Security, and then System. View Windows activation status in the Windows activation area of the System page. Click View details in Windows activation for more information about your Windows activation status.




DISM /online /Get-CurrentEdition.

DISM /online /Set-Edition:ServerDatacenter /ProductKey:XXXX-XXXXX-XXXXX-XXXXX-XXXXX/AcceptEula




Converting a current volume-licensed version to a current retail version

At any time after installing Windows Server 2012, you can freely convert it between a volume-licensed version, a retail version, or an OEM version. The edition remains the same during this conversion.
To do this, from an elevated command prompt, run:
slmgr /ipk <key>
Where <key> is the appropriate volume-license, retail, or OEM product key.

Windows Server Installation and Upgrade



Upgrading to Windows Server 2012 R2

For details, including important caveats and limitations on upgrade, license conversion between editions of Windows Server 2012 R2, and conversion of evaluation editions to retail, see Upgrade Options for Windows Server 2012 R2.
Quick reference table of supported upgrade paths from older Windows Server retail editions to Windows Server 2012 R2 retail editions:
If you are running:You can upgrade to these editions:
Windows Server 2008 R2 Datacenter with SP1Windows Server 2012 R2 Datacenter
Windows Server 2008 R2 Enterprise with SP1Windows Server 2012 R2 Standard or Windows Server 2012 R2 Datacenter
Windows Server 2008 R2 Standard with SP1Windows Server 2012 R2 Standard or Windows Server 2012 R2 Datacenter
Windows Web Server 2008 R2 with SP1Windows Server 2012 R2 Standard
Windows Server 2012 DatacenterWindows Server 2012 R2 Datacenter
Windows Server 2012 StandardWindows Server 2012 R2 Standard or Windows Server 2012 R2 Datacenter
Hyper-V Server 2012Hyper-V Server 2012 R2

License conversion

You can convert Windows Server 2012 Standard (retail) to Windows Server 2012 Datacenter (retail).
You can convert Windows Server 2012 Essentials (retail) to Windows Server 2012 Standard (retail).
You can convert the evaluation version of Windows Server 2012 Standard to either Windows Server 2012 Standard (retail) or Datacenter (retail).

Upgrading to Windows Server 2012

For details, including important caveats and limitations on upgrade, and conversion of evaluation editions to retail, seeEvaluation Versions and Upgrade Options for Windows Server 2012
Quick reference table of supported upgrade paths from older Windows Server retail editions to Windows Server 2012 retail editions:
If you are running:You can upgrade to these editions:
Windows Server 2008 Standard with SP2 or Windows Server 2008 Enterprise with SP2Windows Server 2012 Standard, Windows Server 2012 Datacenter
Windows Server 2008 Datacenter with SP2Windows Server 2012 Datacenter
Windows Web Server 2008Windows Server 2012 Standard
Windows Server 2008 R2 Standard with SP1 or Windows Server 2008 R2 Enterprise with SP1Windows Server 2012 Standard, Windows Server 2012 Datacenter
Windows Server 2008 R2 Datacenter with SP1Windows Server 2012 Datacenter
Windows Web Server 2008 R2Windows Server 2012 Standard

License conversion

You can convert Windows Server 2012 Standard (retail) to Windows Server 2012 Datacenter (retail).
You can convert Windows Server 2012 Essentials (retail) to Windows Server 2012 Standard (retail).
You can convert the evaluation version of Windows Server 2012 Standard to either Windows Server 2012 Standard (retail) or Datacenter (retail).

Upgrading to Windows Server 2008 R2

For details, including important caveats and limitations, see Windows Server 2008 R2 Upgrade Paths.
Quick reference table of supported upgrade paths from older Windows Server retail editions to Windows Server 2008 R2 retail editions:
From Windows Server 2003 (SP2, R2)Upgrade to Windows Server 2008 R2
DatacenterDatacenter
EnterpriseEnterprise, Datacenter
StandardStandard, Enterprise

From Windows Server 2008 (RTM-SP1, SP2)Upgrade to Windows Server 2008 R2
DatacenterDatacenter
Datacenter CoreDatacenter Core
EnterpriseEnterprise, Datacenter
Enterprise CoreEnterprise Core, Datacenter Core
Foundation (SP2 only)Standard
StandardStandard, Enterprise
Standard CoreStandard Core, Enterprise Core
WebStandard, Web
Web CoreStandard Core, Web Core

From Windows Server 2008 (RC, IDS, RTM)Upgrade to Windows Server 2008 R2
DatacenterDatacenter
Datacenter CoreDatacenter Core
EnterpriseEnterprise, Datacenter
Enterprise CoreEnterprise Core, Datacenter Core
FoundationStandard, Foundation
StandardStandard, Enterprise
Standard CoreStandard Core, Enterprise Core
WebStandard, Web
Web CoreStandard Core, Web Core

Wednesday, July 29, 2015

Troubleshooting Common VPN Related Errors

Hello Friends,
Today I was just doing some NPS,Remote Access Labs(VPN,Direct Access and WebApplicationProxy) and i got some errors (that i did my troubleshooting on my own and this link was not worked for me  :) ) so while i was searching solution on Technet then i found this very good article so i just copied here 
If you are seeing errors while establishing VPN connection using Windows in-built VPN client,  you have reached the right place. This article will help you to easily troubleshoot some of the common VPN related errors.
1) Error Code: 800
Error Description: The remote connection was not made because the attempted VPN tunnels failed. The VPN server might be unreachable. If this connection is attempting to use an L2TP/IPsec tunnel, the security parameters required for IPsec negotiation might not be configured properly.
Possible Cause: This error comes when the VPN tunnel type is ‘Automatic’ and the connection establishment fails for all the VPN tunnels.
Possible Solutions:
a> If you know which tunnel should actually be used for your deployment, try to set the ‘Type of VPN’ to that particular tunnel type on the VPN client side. [This can be set by clicking the ‘Network Connections’ icon on the bottom right of the task bar, Select your Connection, Right Click -> Properties -> Securities Tab -> Under ‘Type of VPN’ select the interested VPN tunnel type ]
By making VPN connection with a particular tunnel type, your connection will still fail but it will give a more tunnel specific error (for example: GRE blocked for PPTP, Certificate error for L2TP, SSL negotiation errors for SSTP, etc.)
b> This error usually comes when the VPN server is not reachable or the tunnel establishment fails.
i. Make sure the VPN server is reachable (try to PING the server).
ii. If interested in PPTP, make sure PPTP port (TCP 1723) or GRE Port (47) is not blocked on in between firewalls.
iii. If interested in L2TP, make sure
1. Correct pre-shared key or machine certificate are present both on client and server.
2. L2TP port (UDP 1701) is not blocked on any of the firewalls.
iv. If interested in IKEv2 based VPN tunnel, make sure
1. IKE port (UDP port 500, UDP port 4500) is not blocked.
2. Correct machine certificate for IKE are present both on client and server.
v. If interested in SSTP, make sure correct machine certificate is installed on the server and correct trusted root certificate is installed on the client machine.
2) Error Code: 609, 633
Error Description:
609: A device type was specified that does not exist.
633: The modem (or other connecting device) is already in use or is not configured properly.
Possible Cause: This error usually comes when the connecting VPN device (aka miniport) is not configured properly.
To confirm the issue: From the elevated command prompt, type the following command to confirm the presence of miniport: -
netcfg.exe –q <miniport name>
Following is the Miniport Device name for different tunnels:
PPTP Tunnel: MS_PPTP
L2TP Tunnel: MS_L2TP
SSTP Tunnel: MS_SSTP
VPN Reconnect (IKEv2) Tunnel: MS_AGILEVPN
Possible Solution:
1. In Windows 7, a built-in diagnostic with repair is provided for the ‘miniport missing’ issue for locally created VPN connections. A ‘Diagnostic’ button is shown on the Error page of the VPN connection. By clicking this button, it will give a ‘repair’ option if it finds the issue to be miniport missing which if clicked will automatically try to fix the issue.

clip_image002


2. On Vista or below OS, if the miniport device is missing, you can run the following command from ‘elevated’ command prompt:
a> netcfg.exe -e -c p -i <miniport name>
Details of the <miniport name> is given above.
b> Stop and Start ‘rasman’ (‘Remote Access Connection Manager’) service.
3) Error Code: 732, 734, 812
Error Description:
732: Your computer and the remote computer could not agree on PPP control protocols.
734: The PPP link control protocol was terminated.
812: The connection was prevented because of a policy configured on your RAS/VPN server. Specifically, the authentication method used by the server to verify your username and password may not match the authentication method configured in your connection profile. Please contact the Administrator of the RAS server and notify them of this error.
Possible Causes: One of the prime causes for the above error  is: when the *only* allowed authentication protocol configured on VPN server (or Radius server) is MS-CHAP and the VPN client is Vista or above OS platform (like Windows7). Note: due to security reasons MS-CHAP was removed from Vista and above OS platform and hence the connection fails.
Error 812 comes when Authentication protocol is set via NPS (Network Policy and Access Services) otherwise Error 732/734.
Event log 20276 is logged to the event viewer when RRAS based VPN server authentication protocol setting mismatches which that of the VPN client machine.
Possible Solution: Configure a more secured authentication protocol like MS-CHAPv2 or EAP based authentication on the server – which matches the settings on the client side.
4) Error Code: 806
Error Description:  806: The VPN connection between your computer and the VPN server could not be completed. The most common cause for this failure is that at least one Internet device (for example, a firewall or a router) between your computer and the VPN server is not configured to allow Generic Routing Encapsulation (GRE) protocol packets. If the problem persists, contact your network administrator or Internet Service Provider.
Possible Cause: PPTP uses GRE (Generic Route Encapsulation) protocol to encapsulate the VPN payload in a secure manner.This error generally comes when some firewall in path between client and server blocks GRE Protocol (i.e. IP protocol number 47).
Possible Solution: Allow both outgoing and incoming Protocol 47 (GRE) on any in between firewalls. If that is not possible, deploy SSTP based VPN tunnel on both VPN server and VPN client – that allows VPN connection across firewalls, web proxies and NAT.
5) Error Code: 789, 835
Error Description:
789: The L2TP connection attempt failed because the security layer encountered a processing error during initial negotiations with the remote computer.
835: The L2TP connection attempt failed because the security layer could not authenticate the remote computer. This could be because one or more fields of the certificate presented by the remote server could not be validated as belonging to the target destination.
Possible Causes: This is a generic error which is thrown when the IPSec negotiation fails for L2TP/IPSec connections.
Possible causes for this issue could be:
a> L2TP based VPN client (or VPN server) is behind NAT.
b> Wrong certificate or pre-shared key is set on the VPN server or client
c> Machine certificate or trusted root machine certificate is not present on the VPN server.
d> Machine Certificate on VPN Server does not have 'Server Authentication' as the EKU
Possible Solution: Make sure correct certificate is used both on client and server side – for further details refer to thisblog. In case Pre Shared Key (PSK) is used, make sure the same PSK is configured on the client and the VPN server machine.
6) Error Code: 766
Error Description:  766: A certificate could not be found. Connections that use the L2TP protocol over IPSec require the installation of a machine certificate, also known as a computer certificate.
Possible Cause: This error usually comes when their is no valid machine certificate on your client machine.
Possible Solution: Make sure the correct machine certificate for L2TP validation is installed on your client machine - for further details refer to this blog.
7) Error Code: 691
Error Description: 691: The remote connection was denied because the user name and password combination you provided is not recognized, or the selected authentication protocol is not permitted on the remote access server.
Possible Cause: This error is given when the authentication phase erred out because of wrong credentials being passed.
Possible Solution:
a> Make sure correct username and password is typed.
b> Make sure ‘Caps Lock’ is not turned ON while typing credentials.
c> Make sure the authentication protocol as selected on the client is permitted on the server.
8) Error Code: 809
Error Description: 809: The network connection between your computer and the VPN server could not be established because the remote server is not responding. This could be because one of the network devices (e.g, firewalls, NAT, routers, etc) between your computer and the remote server is not configured to allow VPN connections. Please contact your Administrator or your service provider to determine which device may be causing the problem.
Possible Cause: This error usually comes when some firewall between client and server is blocking the ports used by VPN tunnel
a> PPTP port (TCP port 1723) is blocked by a firewall/router. [Applicable to tunnel type = PPTP]
b> L2TP or IKEv2 port (UDP port 500, UDP port 4500) is blocked by a firewall/router. [Applicable to tunnel type = L2TP or IKEv2]
Possible Solution: Enable the port (as mentioned above) on firewall/router. If that is not possible, deploy SSTP based VPN tunnel on both VPN server and VPN client – that allows VPN connection across firewalls, web proxies and NAT.
9) Error Code: 13806
Error Description: 13806: IKE failed to find valid machine certificate. Contact your Network Security Administrator about installing a valid certificate in the appropriate Certificate Store.
Possible Cause: This usually happens when there is no machine certificate or no root machine certificate present on the VPN Server.
Possible Solution: Please contact your VPN server administrator to verify and fix the issue - for further details refer tothis blog.
10) Error Code: 13801
Error Description: 13801: IKE authentication credentials are unacceptable.
Possible Causes: This error usually comes in one of the following cases:
  1. The machine certificate used for IKEv2 validation on RAS Server does not have 'Server Authentication' as the EKU (Enhanced Key Usage).
  2. The machine certificate on RAS server has expired.
  3. The root certificate to validate the RAS server certificate is not present on the client.
  4. VPN Server Name as given on client doesn’t match with the subjectName of the server certificate.
Possible Solution: Please contact your VPN server administrator to verify and fix the above issue - for further details refer to this blog.
11) Error Code: 0x800704C9
Error Description:
Possible Cause: This issue may occur if no SSTP ports are available on the server.
Possible Solution: To troubleshoot this issue, verify that the RAS server has sufficient ports configured for remote access. To do this, follow these steps:
  1. Start the Routing and Remote Access MMC snap-in.
  2. Expand the server, right-click Ports, and then click Properties.
  3. In the Name list, click WAN Miniport (SSTP), and then click Configure.
  4. Modify the number that appears in the Maximum ports list, as appropriate for your requirements, and then click OK.
    Note By default, 128 ports are available for this device.
  5. In the Port Properties dialog box, click OK
12) Error Code: 0x80070040
Error Description:
Possible Cause: This issue may occur if a server authentication certificate is not installed on the RAS server.
Possible Solution: Make sure the machine certificate used by RAS server for SSL has ‘Server Authentication’ as one of the certificate usage entries. For further details refer to this blog. For changing the SSTP machine certificate, please refer to this blog if on VPN server is running Windows server 2008 R2, else refer to this blog
13) Error Code: 0x800B0101
Error Description: 0x800B0101: A required certificate is not within its validity period when verifying against the current system clock or the timestamp in the signed file.
Possible Cause: This issue may occur if a server authentication certificate is not installed on the Routing and Remote Access server.
Possible Solution: Make sure the machine certificate used by RAS server for SSL has ‘Server Authentication’ as one of the certificate usage entries and the certificate is not expired. For further details refer to this blog. For changing the SSTP machine certificate, please refer to this blog if on VPN server is running Windows server 2008 R2, else refer to thisblog
14) Error Code: 0x800B0109
Error Description: 0x800B0109: A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
Possible Cause: This issue may occur if the appropriate trusted root certification authority (CA) certificate is not installed in the Trusted Root Certification Authorities store on the client computer.
Note: Generally the VPN client machine is joined to the active directory based domain and if you use domain credentials to log on to the VPN server, the certificate is automatically installed in the Trusted Root Certification Authorities store. However, if the computer is not joined to the domain or if you use an alternative certificate chain, you may experience this issue.
Possible Solution: Make sure root certificate is installed on the client machine in the Trusted Root Certification Authorities store.
15) Error Code: 0x800B010F
Error Description: 0x800B010F: The certificate's CN name does not match the passed value.
Possible Cause: This issue may occur if the host name of the server that is specified in the VPN connection does not match the subject name that is specified on the SSL certificate that the server submits to the client computer.
Possible Solution: Verify that the certificate which RAS server uses for SSL has the correct subject name. For example, if the VPN client is configured to use FQDN name to connect to the VPN server, the certificate used by VPN server must have FQDN in the subject name. Same thing if the client is configured to use IP address (IPv4 or IPv6) of VPN server.  If the appropriately-named certificate is not present on the RAS server, you must obtain a new certificate for the RAS server.
For changing the SSTP machine certificate, please refer to this blog if on VPN server is running Windows server 2008 R2, else refer to this blog
16) Error Code: 0x80092013
Error Description: 0x80092013: The revocation function was unable to check revocation because the revocation server was offline.
Possible Cause: This issue may occur if the client computer fails the certificate revocation check for the SSL certificate that the client computer obtained from the VPN server.
Possible Solution: To troubleshoot this issue, verify that the server that hosts the Certificate Revocation List (CRL) is available to the client – before VPN tunnel is established. This means that the CRL server is available to the client over the Internet because the client computer runs the CRL check during the establishment of the SSL connection and the CRL check query is sent directly to the CRL server.
17) Error Code: 0x800704D4
Error Description: 0x800704D4: The network connection was aborted by the local system
Possible Cause: This error comes when the hostname of the VPN server is not resolved by the forward proxy in-front of the VPN client.
Possible Solution: Check your proxy settings inside the Internet explorer. If the settings are correct, please ensure you are able to access other web sites (e.g. www.microsoft.com) using the browser. If that also works through, try accessing the URI which SSTP uses internally i.e. https://vpn_server_name/sra_{BA195980-CD49-458b-9E23-C84EE0ADCD75}/  -  please replace vpn_server_name with actual VPN server name. If you see error “the website cannot be found” inside your browser, that validates the hostname resolution failure. If you know the IP address of VPN server, try connecting with that. Else contact your network administrator (who is responsible for managing the web proxy – most probably your ISP) – giving them the details of the problem (i.e. hostname resolution is failing for that particular hostname).
18) Error Code: 0x80072746
Error Description: 0x80072746: An existing connection was forcibly closed by the remote host.
Possible Cause: This error comes when the server machine certificate binding to HTTPS is not done on the VPN server OR the server machine certificate is not installed on the VPN server.
Possible Solution: Please contact your VPN server administrator – to check whether relevant machine certificate is installed  on the VPN server. If installed correctly, check the HTTPS binding by running following command at the VPN server command prompt - “netsh http show ssl”. For further details, please refer to this blog.

Monday, July 27, 2015

Display Last Interactive Logon Information in Windows Server 2008/2012

Imagine that your network security was compromised and you have a good reason to believe that someone attacked and compromised your domain environment. Or maybe you need to track the number of unsuccessful logon attempts to the domain. Or perhaps the security officer at your organization as asked you for a report. In this article I will show you how to display the last interactive logon information in Windows Server 2008 and Windows Server 2012.




Activate Last Interactive Logon

One of the great features that Windows Server 2008/R2/2012 has to offer is the last interactive logon information. In order to activate last interactive logon, the functional level of the domain must be set at minimum to Windows Server 2008. I will perform these steps and take screenshots on a Windows Server 2008 R2 machine, but it all works the same on Windows Server 2012.
When last interactive logon is activated for the Active Directory domain, the following AD attributes of the user’s object store the relevant information. These attributes are already a part of the AD schema and do not require any modification to AD.
  • msDS-FailedInteractiveLogonCount – The number of failed logon attempts since the last interactive logon setting was enabled
  • msDS-FailedInteractiveLogonCountAtLastSuccessfulLogon – The total number of failed interactive logons until the last successful logon
  • msDS-LastFailedInteractiveLogonTime – The time when the last failed logon attempt occurred
  • msDS-LastSuccessfulInteractiveLogonTime – The time of the last successful logon attempt to a workstation




  • In the Group Policy Editor window, browse to: Computer Configuration > Policies > Administrative Templates > Windows Components > Windows Logon Options
A setting called “Display information about previous logons during user logon” is not configured by default .


Since we linked the GPO to the Domain Controllers OU, I will restart my demo Domain Controller in order to apply the GPO settings. Of course you can simply use the gpupdate /force command, and you may not need to reboot.
After the machine boots up, when I press Alt+Ctrl+Del to login, after entering the username and password, the following screen is displayed.



Active Directory Domain Services Port Requirements

In a domain that consists of Windows Server® 2003–based domain controllers, the default dynamic port range is 1025 through 5000. Windows Server 2008 R2 and Windows Server 2008, in compliance with Internet Assigned Numbers Authority (IANA) recommendations, increased the dynamic port range for connections. The new default start port is 49152, and the new default end port is 65535. Therefore, you must increase the remote procedure call (RPC) port range in your firewalls. If you have a mixed domain environment that includes a Windows Server 2008 R2 and Windows Server 2008 server and Windows Server 2003, allow traffic through ports 1025 through 5000 and 49152 through 65535.
When you see “TCP Dynamic” in the Protocol and Port column in the following table, it refers to ports 1025 through 5000, the default port range for Windows Server 2003, and ports 49152 through 65535, the default port range beginning with Windows Server 2008.
noteNote
For more information about the change in the dynamic port range beginning in Windows Server 2008, see article 929851 in the Microsoft Knowledge Base (http://go.microsoft.com/fwlink/?LinkId=153117).
You can find additional information about this change on the Ask the Directory Services Team blog. See the blog entry Dynamic Client Ports in Windows Server 2008 and Windows Vista(http://go.microsoft.com/fwlink/?LinkId=153113).

Restricting RPC to a specific port

RPC traffic is used over a dynamic port range as described in the previous section, “Default dynamic port range.” To restrict RPC traffic to a specific port, see article 224196 in the Microsoft Knowledge Base (http://go.microsoft.com/fwlink/?LinkID=133489).
The following table lists the port requirements for establishing DC to DC communication in all versions of Windows Sever beginning with Windows Server 2003.

 

Protocol and PortAD and AD DS UsageType of traffic
TCP and UDP 389
Directory, Replication, User and Computer Authentication, Group Policy, Trusts
LDAP
TCP 636
Directory, Replication, User and Computer Authentication, Group Policy, Trusts
LDAP SSL
TCP 3268
Directory, Replication, User and Computer Authentication, Group Policy, Trusts
LDAP GC
TCP 3269
Directory, Replication, User and Computer Authentication, Group Policy, Trusts
LDAP GC SSL
TCP and UDP 88
User and Computer Authentication, Forest Level Trusts
Kerberos
TCP and UDP 53
User and Computer Authentication, Name Resolution, Trusts
DNS
TCP and UDP 445
Replication, User and Computer Authentication, Group Policy, Trusts
SMB,CIFS,SMB2, DFSN, LSARPC, NbtSS, NetLogonR, SamR, SrvSvc
TCP 25
Replication
SMTP
TCP 135
Replication
RPC, EPM
TCP Dynamic
Replication, User and Computer Authentication, Group Policy, Trusts
RPC, DCOM, EPM, DRSUAPI, NetLogonR, SamR, FRS
TCP 5722
File Replication
RPC, DFSR (SYSVOL)
UDP 123
Windows Time, Trusts
Windows Time
TCP and UDP 464
Replication, User and Computer Authentication, Trusts
Kerberos change/set password
UDP Dynamic
Group Policy
DCOM, RPC, EPM
UDP 138
DFS, Group Policy
DFSN, NetLogon, NetBIOS Datagram Service
TCP 9389
AD DS Web Services
SOAP
UDP 67 and UDP 2535
DHCP
noteNote
DHCP is not a core AD DS service but it is often present in many AD DS deployments.
DHCP, MADCAP
UDP 137
User and Computer Authentication,
NetLogon, NetBIOS Name Resolution
TCP 139
User and Computer Authentication, Replication
DFSN, NetBIOS Session Service, NetLogon