Skip to main content

Posts

AD-Powershell for Active Directory Administrators

http://social.technet.microsoft.com/wiki/contents/articles/5819.ad-powershell-for-active-directory-administrators.aspx Computer object commands List all computer accounts in a domain Get-ADComputer –Filter {Name –Like "*"} View all computers that are logged in for 90 days to the Active Directory Search-ADaccount -AccountInactive -Timespan 90 -ComputersOnly OR $lastLogon = (get-date).adddays(-90).ToFileTime() Get-ADComputer -filter {lastLogonTimestamp -gt $lastLogon}  Find and delete all disabled Computer accounts in Active Directory Search-ADAccount -AccountDisabled -ComputersOnly | Sort-Object | Remove-ADComputer Find and delete disabled computer accounts from a specific OU Search-ADAccount -AccountDisabled -Searchbase "OU=IT,DC=Contoso,DC=Com" -ComputersOnly | Sort-Object | Remove-ADComputer Find and delete all computer accounts that no longer have signed up since 11/20/2011 to the Active Directory Search-ADAccount -AccountInactive -DateTime "20.11.2011...
Recent posts

How to add EBS volume to Linux machine in AWS

1.      Login to AWS console 2.      Create 50 GB volume 3.      Attach to the Linux instance 4.      Login to the Linux server 5.      After completing above step, now new volume will list your system. You can check this using ‘ fdisk -l ‘ command 6.      Create a File system to newly added EBS volume with below command (In my case new disk      is:/xvdj) mkfs /dev/xvdj 7.      Make a directory with below command (In my case directory name is "mountdriveE") mkdir /mountdriveE 8.      Mount this disk to mount point with below command mount /dev/xvdj /mountdriveE 9.      Add below entry at the end of file  /etc/fstab  for permanent /dev/xvdj    /mountdriveE  ext4    defaults        1 1

Seizing An Operations Master with NTDSUTIL in Windows Server 2008 R2

http://www.msserverpro.com/seizing-an-operations-master-with-ntdsutil-in-windows-server-2008-r2/ In real network, when operations master server fails due to hardware issues or some other problems, we need to move the operation master role to another domain controller as soon as possible. This move process is called seizing. Therefore, Seizing an operations master role means forcing an operations master role onto another domain controller. Before we seize operations master roles, we must permanently disconnect the domain controller that holds the operations master roles  from the network. Here, all Operation Master Roles are on  KTM-DC01-2K8  domain controller. In this scenario, currently this server is  Offline due to hardware problems . So we get an error when we open Operations Masters roles on other domain controller  KTM-DC02-2K8 . To solve this problem, we have to  seize Operations Masters roles and reassign it to KTM-DC02-2K8  domain con...

CONFIGURING TRUSTS – PART 4

http://www.rebeladmin.com/2015/02/configuring-trusts-part-4/ This is the last part of the series which explain about “Trusts” between infrastructures. If you not checked the other 3 parts yet you can find them in here. Configuring Trusts – Part 1 Configuring Trusts – Part 2 Configuring Trusts – Part 3 This article will explain how to configure trusts between infrastructures. Demo Setup For the demonstration I will be using following setup. Organization Domain Primary DC Contoso Ltd. Contoso.com Microsoft Windows Server 2012 R2 XYZ Ltd. Xyz.com Microsoft Windows Server 2012 R2 I am going to initiate a “Forest Trust” between the 2 organizations. It will be Two-Way trust which allows each forest, domains and users to access “allowed” resources in each organization infrastructure. Before start the process the initial step is to make sure following ports are open in firewalls in both organizations to initiate the trusts. UDP Port 88 – Kerbero...