Monday, 9 September 2013

The trust relationship between this workstation and the primary domain failed(resolved)




The "the trust relationship between this workstation and the primary domain failed" occurs

(1) If you are trying to login with any computer that has not connected to your domain since long time

(2) You have multiple domain controllers and have replication issues between them.

(3) one of your domain controllers is down currently which has the password of this computer object.

 If you resolve the replication issue, then you should not face this error anymore.
How to resolve?
First run the following command on effected computer facing above error.
nltest /dsgetdc:domain.local

it will show you that on which domain controller your system is trying to be authenticated at the moment, as you have multiple domain controllers.
 Now go to that Domain controller and check the password reset date of this effected computer

As below:

(Go to AD user and computer and from view select Advance feature and search the effected system object and note its path/location where it is placed and then go on that path/location and right click on the effected computer object and go to its properties and then attribute editor tab and there you will find the pwdLastSet attribute).
it will show you that when the password of this computer object was set.
most probably it will be an old date.

now you have to reset the password of this computer object through the following command, should be run from that effected computer.(if you can not login with domain user then can login with any local users)

netdom resetpwd /s:DomainControler1 /ud:domain\user1 /pd:*

 

The above command will reset the password of the effected computer and will replicate to the domain controller.

Note:- on client OS (Windows 7 etc) you have to install remote server administration tools, otherwise you will receive an error while running the above command.

Now restart this affected computer and try to login with domain user it should login now without any error.

Monday, 26 August 2013

Enable user for Lync through Lync power shell command



Some time you trying to enable an account for lync that have ever admin rights and you receive the following error in lync control panel.

Active directory operation failed on "Domai.controler". you cannot retry this operation: "insufficient access rights to perform the operation 00002098: secErr: DSID-0315bb9. problem 4003 (INSUFF ACCESS RIGHTS). data 0)"

To resolve this issue you have to enable this account through lync power shell using the following command.

C:\users\administrator> Enable-CsUser "user1" -SipAddressType EmailAddress -SipDomain domainname.com -RegistrarPool "lync.com.local"
 

Wednesday, 21 August 2013

How to show last password reset date of users in an OU in active directory 2008 R2


How to show last password reset date of users in an OU in active directory 2008 R2.

get-aduser -searchbase "OU=ouname,OU=ouname,DC=domainnaem,DC=domainname" -Filter * -Properties passwordlastset | FT passwordlastset,UserPrincipalName >C:\store\MT.csv

Monday, 17 June 2013

How to export the value of specific fieled of user property in active directory 2008 r2


How to export the value of specific field in of a user property in active directory 2008 r2

get-aduser -searchbase "OU=ouname,OU=ouname,DC=domainname,DC=net" -Filter * -Properties thumbnailPhoto | FT thumbnailph

oto,UserPrincipalName >C:\store\abc.csv

Saturday, 18 May 2013

How to export member list of destribution group in exchange 2007


Use the following command in exchange management shell.



[PS] C:\Windows\system32>Get-DistributionGroupMember -identity "distributiongroupname" | Export-C
sv > "c:\pic\zeesh.csv"
cmdlet Export-Csv at command pipeline position 2
Supply values for the following parameters:
Path: c:\pic\zzzz.csv

Wednesday, 15 May 2013

How to show the current unique connections with mailbox servers in Microsoft exchange 2007

Use the following command in exchange management shell.

(get-logonstatistics -server mailboxservername |% {$_.username} | sort -unique).count
 
Note:
if you have mailbox cluster then you have to use mailbox cluster name.

Monday, 18 March 2013

Can not RDP/access/login to a VM in hyper-v, heartbeat: no contact

If you can not login to a VM in hyper-v and also can not RDP to a VM. shows HeartBeat: no contact.

use the following procedure to resolve.

1)Restart the effected VM.
2)Press F8 to enter/log in safe mode.
3)Login to the VM with local admin Or try any other user if possible.
4)From the effected VM window Go to Action-->insert integration services setup disk.
5) Now Double click on CD/DVD icon in effected VM.
6) Open root folder, here you will see, the setup file. double click on it.
it will install the HAL on your VM.
7)Restart the VM.
that's it. now should be able to access/RD it..