2 de dezembro de 2015

How to fix RDS 2012r2 error: “Licensing mode for the Remote Desktop Session Host is not configured.”

Remote Desktop Session Host (RD Session Host) enables a server to host RemoteApp programs or session-based desktops. Users can connect to RD Session Host servers in a session collection to run programs, save files, and use resources on those servers.
We recently solved a known issue related to the licenses required to connect to a Remote Desktop Session Host server or a virtual desktop. The error description reads: “Licensing mode for the Remote Desktop Session Host is not configured.”
Licensing mode for RDS Host server is not configured resized 600
We developed a fix for the licensing issue with RDS on server 2012r2. We found some solutions for this known bug but none that actually worked. Incidentally, deleting the GracePeriod key like many forums said didn’t fix the problem.

To fix the problem, run the following commands in powershell to set the licensing server properly on the rd session host using the WMI CIM provider:
$obj = gwmi -namespace "Root/CIMV2/TerminalServices" Win32_TerminalServiceSetting
$obj. SetSpecifiedLicenseServerList("licserver.domain.local")

Then, go into the registry and manually set the licensing mode:

HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\RCM\Licensing Core\LicensingMode

You need to change the DWORD to 2 for Per Device or 4 for Per User.
Licensing Mode in Registry Editor
Next, reboot the system. The changes made previously will report everything properly and the RDS host will now recognize the licensing configuration.


Source: http://www.tbngconsulting.com/blog/bid/404182/Licensing-mode-for-the-Remote-Desktop-Session-Host-is-not-configured

22 de setembro de 2015

Configuring external time source on your Primary Domain Controller

  1. Find out what your primary domain controller (PDC) is for your domain by executing the following powershell commands from any machine in the domain
    1. [System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest().RootDomain.PdcRoleOwner.Name
      PowerShell - PdcRoleOwner
  2. Login to your primary domain controller
  3. Open up a command prompt/powershell window with administrative privilegesServer 2012 - PowerShell - Run as Administrator
  4. Execute the following command to configure the domain controller to look at an external time source
    1. w32tm.exe /config /manualpeerlist:”0.us.pool.ntp.org 1.us.pool.ntp.org 2.us.pool.ntp.org 3.us.pool.ntp.org” /syncfromflags:manual /reliable:YES /update
      w32tm config manualpeerlist syncfromflags manual ntp
      1. Notes: You can find the closest time server near you by browsing the following page and clicking on the nearest zone: http://www.pool.ntp.org/zone/@
  5. Execute the following command to actually perform a time synchronization with the external source
    1. w32tm.exe /config /update
      w32tm config update
  6. Execute the following command for the changes to take effect
    1. Restart-Service w32time
      Restart-Service w32time

Source: jackstromberg

Outlook Archive Problems

Outlook 2010

For Outlook 2010, the ArchiveIgnoreLastModifiedTime registry setting was introduced with the Microsoft Outlook 2010 hotfix package dated April 26, 2011 (KB2516474).
2516474 Description of the Outlook 2010 hotfix package (outlook-x-none): April 26, 2011

To create the ArchiveIgnoreLastModifiedTime registry value, follow these steps:
  1. Click Start, click Run, type regedit in the Open box, and then click OK.
  2. Locate and then click the following registry subkey:

    HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Preferences
  3. On the Edit menu, point to New, click DWORD Value, type ArchiveIgnoreLastModifiedTime, and then press ENTER.
  4. Right-click ArchiveIgnoreLastModifiedTime, and then click Modify.
  5. In the Value data box, type 1, and then click OK.
  6. Exit Registry Editor.

Outlook 2013

To create the ArchiveIgnoreLastModifiedTime registry value, follow these steps:
  1. Click Start, click Run, type regedit in the Open box, and then click OK.
  2. Locate and then click the following registry subkey:

    HKEY_CURRENT_USER\Software\Microsoft\Office\15.0\Outlook\Preferences
  3. On the Edit menu, point to New, click DWORD Value, type ArchiveIgnoreLastModifiedTime, and then press ENTER.
  4. Right-click ArchiveIgnoreLastModifiedTime, and then click Modify.
  5. In the Value data box, type 1, and then click OK.
  6. Exit Registry Editor.

Restart requirement

You must restart Outlook after you add the ArchiveIgnoreLastModifiedTime registry.

View Startup programs

Start > Run

shell:startup
shell:common startup

10 de setembro de 2015

How to solve Windows cannot read the setting from unattended answer file

When it appears the command prompt digit notepad c:\autounattend.xml
You have to search the string <ProductKey> and below this insert a new line that contains the string
<Key></Key>
You don't have to insert a code, only the tags.
Save the file and relaunch manually the command X:\Windows\Hpssbem.exe again
The installation will end fine.

6 de agosto de 2015

Migrate 2003 DHCP Server

Export the DHCP database from Windows 2003:

1.                   On the Windows 2003 DHCP server, navigate to a command prompt

2.                   Type the following Command: netsh

3.                   Type the following Command: DHCP

4.                   Type the following Command: server <\\Name or IP Address>

5.                   Type the following Command: export c:\w2k3DHCPdb all

Note You must have local administrator permissions to export the data.

Import the DHCP database

1.       Copy the exported DHCP database file to the local hard disk of the Windows Server 2008-based computer.

2.       Install the DHCP Role on the server.

3.       Stop the DHCP server service on the server.  To do this, follow these steps:

a.       Log on to the target DHCP server by using an account that is a member of the local Administrators group.

b.      Click Start, click Run, type cmd in the Open box, and then click OK.

c.       At the command prompt, type net stop DHCPserver , and then press ENTER. You receive a "The Microsoft DHCP Server service is stopping. The Microsoft DHCP Server service was stopped successfully" message.

d.      Type exit, and then press ENTER.

4.       Delete the DHCP.mdb file under c:\windows\system32\DHCP folder.

5.       Start the DHCP server service.

6.       Right-click on the Command Prompt (cmd) and select run as administrator, to open the cmd prompt using elevated privileges.

Note You must have local administrator permissions to import the data.

7.       Type the following Command: netsh

8.       Type the following Command: DHCP

9.       Type the following Command: server <\\Name or IP Address>

10.   Type the following Command: import c:\w2k3DHCPdb

11.   Restart DHCP and verify the database has moved over properly.

Source: https://support.microsoft.com/en-us/kb/962355

Veeam Endpoint Backup > Send Email Notification

1. Criar c:\veeamscript.ps1 com o seguinte conteudo:

###########################################################
# Edit this part:
$youremailserver=    "0.0.0.0"
$sender      =   "origem"
$recipient   =   "destino"
###########################################################

# Put most info into the body of the email:
$TimeGenerated   =    get-eventlog "Veeam Endpoint Backup" -newest 1 -entrytype Information, Warning, Error -source "Veeam Endpoint Backup" | Format-List -property TimeGenerated | out-string
$Source      =   get-eventlog "Veeam Endpoint Backup" -newest 1 -entrytype Information, Warning, Error -source "Veeam Endpoint Backup" | Format-List -property Source | out-string
$EntryType   =   get-eventlog "Veeam Endpoint Backup" -newest 1 -entrytype Information, Warning, Error -source "Veeam Endpoint Backup" | Format-List -property EntryType | out-string
$Message   =   get-eventlog "Veeam Endpoint Backup" -newest 1 -entrytype Information, Warning, Error -source "Veeam Endpoint Backup" | Format-List -property Message | out-string
$InstanceID   =   get-eventlog "Veeam Endpoint Backup" -newest 1 -entrytype Information, Warning, Error -source "Veeam Endpoint Backup" | Format-List -property InstanceID| out-string
$Body      =   " $TimeGenerated Instance-ID: $InstanceID $Message "


# Determine the subject according to the result of the backup:
$hostname = hostname
if ($Message.contains("Success")) {
   $subject = "[Success] Endpoint Backup $hostname"
} elseif ($InstanceID.contains("110")) {
   $subject = "[Started] Endpoint Backup $hostname"
} else {  
   $subject = "[Failed] Endpoint Backup $hostname failed"
}


# Send the email using the powershell object (replace with e.g. blat.exe for older powershell-Versions)
if ($InstanceID.contains("110") -Or  $InstanceID.contains("190")) {
   Send-MailMessage -To $recipient -Subject $subject -From $sender -Body $body -SmtpServer $Youremailserver
} else {
   write-host "I don't want messages on 10010 and 10050 Restorepoint-creation or -remove Emails, skip those"
}


write-host "Script finished with -$instanceID- as the last event-ID"



2. Set the PowerShell Execution Policy to RemoteSigned (run as admin);

3.  Criar tarefa windows para enviar email quando o backup terminar:

In General :
Run whether user is logged on or not
Run with highest privileges
Password stored

Trigger
On an event
Basic
Log : Veeam Endpoint Backup
Source : Veeam Endpoint Backup
Enabled

Action :
Start a program c:\veeamscript.ps1

Settings and conditions by default


Add possible Owner to a Cluster Shared Volume

Operation has failed.

The action ‘Move to node <nodename>’ did not complete

Error code: 0×80071398. The operation failed because either the specified cluster node is not the owner of the group, or the node is not a possible owner of the group



Uh OH.. I have had enough problems with this cluster/SAN/CSV’s (that’s anther story put is this way one of the CSV’s ‘lost’ it’s partition information). I surmised that because the CSV’s were not presented to the server when it joined the cluster it may not had updated the “Possible Owners list” and sure enough this server was missing a few command laster and were are back in business.

note command needs to run from a Admin commpand prmpt



To tell who are the possible owners run:

Cluster res <resource name> /listowners



To to add a server to the list

Cluster res <resource name> /addowner :<servername>

source: https://robbieroberts.wordpress.com/2012/04/11/add-possible-owner-to-a-cluster-shared-volume/

5 de agosto de 2015

How to Disable Loopback Check


To set the DisableLoopbackCheck registry key, follow these steps:
1 .     Set the DisableStrictNameChecking registry entry to 1. For more information about how to do this, click the following article number to view the article in the Microsoft Knowledge Base:
281308 Connecting to SMB share on a Windows 2000-based computer or a Windows Server 2003-based computer may not work with an alias name
2 .     Click Start, click Run, type regedit, and then click OK.
3 .     In Registry Editor, locate and then click the following registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
4 .     Right-click Lsa, point to New, and then click DWORD Value.
5 .     Type DisableLoopbackCheck, and then press ENTER.
6 .     Right-click DisableLoopbackCheck, and then click Modify.
7 .     In the Value data box, type 1, and then click OK.
8 .     Quit Registry Editor, and then restart your computer


Source: https://support.microsoft.com/en-us/kb/896861