Friday, November 23, 2012

The trust relationship between this workstation and the primary domain failed

At times, domain computer might lost it's trust relationship with the domain controllers.  What it means is that the secure channel between the domain computer and the domain controller is broken.  It could be due to computer has past the time it requires to reset the password with the domain controller (> 30 days), the local security authority is out of sync with the DC etc.

DO NOT disjoint it from the domain and re-join it back to the domain (before you reset the computer account) as it will get a new SID and loose all the group membership.

You should do one of this:  (Off course, my preference is No.3)

1. Use Active Directory Users and Computer, Reset the computer account.  Logon to the computer and rejoin it back to the domain.

2.  Use DSMOD computer "cn=win7-1,ou=......" -reset.  Logon to the computer and rejoin it back to the domain.

3.  On the computer:   nltest /server:win7client /sc_reset:domain\dc01   (The server: actually meant the workstation...  No reboot or rejoin)

4.  On the computer, powershell : Test-ComputerSecureChannel -repair






Wednesday, November 21, 2012

Recovering SRV records from DNS

If you happen to find that the SRV records are gone in your DNS for whatever reason, the quick and easy way to restore the SRV records are from the following command:

nltest.exe /dsregdns

Please note:
netdiag.exe /fix is deprecated and should not be used
dcdiag.exe /fix does not fix your SRV records.

Working with Windows Server 2012 Server Core

Some of my notes for working with Windows Server Core.

To enable Remote Desktop Connection on Windows Server 2012 Server Core
- Navigate to c:\windows\system32
- cscript.exe scregedit.wsf /AR /v
- If the fDenyTSConnection is "1" then RDP is not allowed.
- Run the following command and change the value to zero
- cscript.exe scregedit.wsf /AR 0

To enable GUI on Server Core
- powershell
- Import-module ServerManager
- Install-WindowsFeature Server-Gui-Mgmt-Infra, Server-Gui-Shell -Restart

To change from full GUI to minimal GUI
- Go to Manage
- Remove Roles and Features
- Select local server
- Skip the role section and next
- Leave the "Graphical Management Tools and Infrastructure"
Powershell : Uninstall-WindowsFeature Server-Gui-Shell -whatif

To change from server core to minimal UI
- install-WindowsFeature server-Gui-Shell

Configuring Server Core
- PowerShell  (-computername < >)
- Other command and alias (cmd, dsim, netsh...)
- Remote Admin
- Sconfig (cool)

Setting network configuration
- netsh interface ipv4  show interfaces
- netsh interface ipv4 set address name="ethernet" source=static address=192.168.1.20 mask=255.255.255.0 gateway=192.168.1.254
- netsh int ipv4 add dnsserver name=ethernet address=192.168.1.2 index=1

Setting computer name, join the computer to the domain and add user
- netdom renamecomputer %computername% /newname:Win2012Core /userd:administrator /passwordd /reboot:0  (To rename the computer name)
- netdom join %computername% /domain:crf.com /userd:administrator /passwordd: /reboot:5  (to join the computer to the domain)
- net user JaneUser /add *  (to add a user)
- net localgroup Administrators /add JaneUser

Use SConfig to do the configurations

Making changes to firewall
- netsh advfirewall firewall set rule group="remote administration" new enable yes
- netsh advfirewall set allprofiles state off
- netsh advfirewall reset


Installing Directory Services
- Install-WindowsFeature -name AD-Domain-Services
- Install-ADDSForest -domainname "abc.com"
http://technet.microsoft.com/en-us/library/hh472162.aspx#BKMK_PS


Tuesday, November 6, 2012

Publishing and Content Deployment with SharePoint 2010

There are a lot of build-in nice features with SharePoint 2010.  One of the them which I love most is the ability to author content, get approval and publish the content from a staging farm to publishing site.

Denis Stadler has an excellent post here which I am not going to repeat.  Kudos to the trainer.