TechShizz | Tech Guides for everything in IT

Auditpol

List of users being Audited

AuditPol /List /User

 

To see how a user is being audited

AuditPol /Get /User:UserName / Category:*

 

To see the users SID

AuditPol /List /User /V

 

List all audit categories

AuditPol /List / Category

Restore AD Objects

  • To enable Active Directory Recycle Bin using the Enable-ADOptionalFeature cmdlet
    Click Start, click Administrative Tools, right-click Active Directory Module for Windows PowerShell, and then click Run as administrator.
    Below is a sample for enabling it for domain.com:
    Enable-ADOptionalFeature –Identity "CN=Recycle Bin Feature,CN=Optional Features,CN=Directory Service,CN=Windows NT,CN=Services,CN=Configuration,DC=domain,DC=com" –Scope ForestOrConfigurationSet –Target domain.com
     
    Once you have the Recycling Bin for Active Directory you will have to use LDP.exe to restore. By default the container with the deleted objects is not displayed. The following steps will allow you to see the container with the deleted objects.

        
    To display the Deleted Objects container
    1. To open Ldp.exe, click Start, click Run, and then type ldp.exe.
    2. On the Options menu, click Controls.
    3. In the Controls dialog box, expand the Load Predefined pull-down menu, click Return deleted objects, and then click OK.
    4. To verify that the Deleted Objects container is displayed:
      1. To connect and bind to the server that hosts the forest root domain of your AD DS environment, under Connections, click Connect, and then Bind
      2. Click View, click Tree, and in BaseDN, type DC=<mydomain>,DC=<com>, where <mydomain> and <com> represent the appropriate forest root domain name of your AD DS environment.
      3. In the console tree, double-click the root distinguished name (also known as DN) and locate the CN=Deleted Objects, DC=<mydomain>,DC=<com>container, where <mydomain> and <com> represent the appropriate forest root domain name of your AD DS environment.
         
         
        Once you have enabled the container to be displayed, you can now restore deleted objects from Active Directory. Below are the steps to recover a single item from the recycle bin using LDP.exe.
        To restore a deleted Active Directory object using Ldp.exe
    1. Open Ldp.exe from an elevated command prompt. Open a command prompt (Cmd.exe) as an administrator. To open a command prompt as an administrator, click Start. In Start Search, type Command Prompt. At the top of the Start menu, right-click Command Prompt, and then click Run as administrator. If the User Account Control dialog box appears, enter the appropriate credentials (if requested), confirm that the action it displays is what you want, and then click Continue.
    2. To connect and bind to the server that hosts the forest root domain of your AD DS environment, under Connections, click Connect, and then click Bind.
    3. On the Options menu, click Controls.
    4. In the Controls dialog box, expand the Load Predefined drop-down list, click Return Deleted Objects, and then click OK.
    5. In the console tree, navigate to the CN=Deleted Objects container.
    6. Locate and right-click the deleted Active Directory object that you want to restore, and then click Modify.
    7. In the Modify dialog box:
      1. In Edit Entry Attribute, type isDeleted.
      2. Leave the Values box empty.
      3. Under Operation, click Delete, and then click Enter.
      4. In Edit Entry Attribute, type distinguishedName.
      5. In Values, type the original distinguished name (also known as DN) of this Active Directory object.
      6. Under Operation, click Replace.
      7. Make sure that the Extended check box is selected, click Enter, and then click Run

Get list of User account expiration dates


Get-ADUser -filter {Enabled -eq $True -and PasswordNeverExpires -eq $False} –Properties "SamAccountName","msDS-UserPasswordExpiryTimeComputed" | Select-Object -Property "SamAccountName", @{Name="Password Expiry Date"; Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}

Data Cable Terminations

Category 5 / Cat 5E Patch Cable

Before you begin, you should know which wiring scheme you will be using. The only difference between 568A and 568B wiring is that pairs 2 and 3 (orange and green) are swapped. If you are unsure which one to use then you should go with the 568B diagram. It is the 568B diagram that we demonstrate in this tutorial and the 568A wiring is shown in the diagrams below mainly for illustration. In our estimation the 568B connection is used in over 99% of all straight through applications. Know that using either the A or B standard will produce a "straight through" connection that should work for any Ethernet or POE (power over Ethernet) application. Therefore do not sweat over the choice.

Always go B, not A (although it doesn’t matter anymore)


Application Note: To make a crossover patch cable, you should wire one end 568B and the other end 568A