Coder Social home page Coder Social logo

activedirectoryfever's Introduction

PowerShell Gallery - ActiveDirectoryFever GitHub - Release AppVeyor - master

ActiveDirectoryFever PowerShell Module

PowerShell Module with custom functions and cmdlets for Windows Active Directory.

Introduction

This is a personal PowerShell Module by Claudio Spizzi. It is used to manage Windows Active Directory, e.g. testing the diagnostics (dcdiag) and replication (replsum) health or monitor the Active Directory changes.

Features

Health Test

  • Test-ADDomainControllerDiagnostic
    Health test of Active Directory Domain Controllers by using the built-in and trusted "dcdiag.exe" command line tool.

  • Test-ADDomainControllerReplication
    Replication test of Active Directory Domain Controllers by using the build-in and trusted "repadmin.exe" command line tool.

Change Report

  • Get-ADDirSyncChange
    Use the DirSync function of Active Directory to monitor the changes.

  • Get-ADUsnNumberUpdate
    Uses the USN property of Active Directory to monitor the updates.

Examples

Use the following commands to test the health of the Domain Controllers and their replication.

# Test the Domain Controller health with dcdiag
Test-ADDomainControllerDiagnostic -ComputerName 'LON-DC1.contoso.com', 'LON-DC2.contoso.com'

# Test the Partition Replication health with repadmin
Test-ADDomainControllerReplication -ComputerName 'LON-DC1.contoso.com', 'LON-DC2.contoso.com'

With the following short script, the changes inside an Active Directory Domain can be monitored with the update sequence number (USN).

# Definition
$Partition = 'DC=adds,DC=contoso,DC=com'
$Server    = 'DC21.adds.contoso.com'
$Filter    = '*OU=Test,DC=adds,DC=contoso,DC=com'
$Cookie    = 'usnnumberupdate.xml'

# Create Cookie File
Get-ADUsnNumberUpdate -Partition $Partition -ComputerName $Server -FilterWildcard $Filter -CookieFile $Cookie -Once

# Get Difference Since Cookie File
Get-ADUsnNumberUpdate -Partition $Partition -ComputerName $Server -FilterWildcard $Filter -CookieFile $Cookie -CookieReadOnly -Once |
    Select-Object 'Timestamp', 'ObjectClass', 'ObjectGuid', 'ObjectSid', 'Identity', 'Account', 'Action', 'Field', 'Value' | Out-GridView

The DirSync API can be used to log detailed change information inside an Active Directory Domain.

# Definition
$Partition = 'DC=adds,DC=contoso,DC=com'
$Server    = 'DC21.adds.contoso.com'
$Filter    = '*OU=Test,DC=adds,DC=contoso,DC=com'
$Cookie    = 'dirsyncchange.xml'

# Create Cookie File
Get-ADDirSyncChange -Partition $Partition -ComputerName $Server -FilterWildcard $Filter -CookieFile $Cookie -Once

# Get Difference Since Cookie File
Get-ADDirSyncChange -Partition $Partition -ComputerName $Server -FilterWildcard $Filter -CookieFile $Cookie -CookieReadOnly -Once |
    Select-Object 'Timestamp', 'ObjectClass', 'ObjectGuid', 'ObjectSid', 'Identity', 'Account', 'Action', 'Field', 'Value' | Out-GridView

Versions

Please find all versions in the GitHub Releases section and the release notes in the CHANGELOG.md file.

Installation

Use the following command to install the module from the PowerShell Gallery, if the PackageManagement and PowerShellGet modules are available:

# Download and install the module
Install-Module -Name 'ActiveDirectoryFever'

Alternatively, download the latest release from GitHub and install the module manually on your local system:

  1. Download the latest release from GitHub as a ZIP file: GitHub Releases
  2. Extract the module and install it: Installing a PowerShell Module

Requirements

The following minimum requirements are necessary to use this module, or in other words are used to test this module:

  • Windows PowerShell 3.0
  • Windows Server 2008 R2 / Windows 7

Contribute

Please feel free to contribute by opening new issues or providing pull requests. For the best development experience, open this project as a folder in Visual Studio Code and ensure that the PowerShell extension is installed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.