Giter Club home page Giter Club logo

windows-audit's Introduction

Windows-Audit

Scripts for auditing Windows Server 2003+ servers.

These scripts will gather a vast array of information about one or many targeted Windows servers and serialise the information to disk. The scripts will then compile the data into an Excel spreadsheet for review using a filter to report on only the desired data. More information on Filters can be found in the dedicated readme file located at .\Filters\Filters.md.

The serialised data for servers will remain cached until another gathering operation is run, at which point the data will be refreshed. This allows you to run a single gathering, and reparse the same data into a variety of different views.

Prerequisites

Calling Client

PowerShell v3 is the minimum client requirement. For machines which do not have WinRM installed/enabled, you can use PSExec which you can download here.

Target Server

Connections over WinRM will require the Windows Management Framework v2 as a minimum with TCP port 5985 allowed from the calling client. Alternatively if using PSExec you can view a list of requirements here. Powershell v2 and above have been verified, v1 has not been tested.

Usage

There are a variety of sub scripts and modules however for simplicity the execution has been consolodated into a single script; Invoke-WindowsAudit.ps1.

Mandatory Parameters
  • InputFile - The path to a text file which contains the computer list you wish to audit, one per line. An example of this file can be found here .\Examples\Computer-List-Example.txt. Mutually exclusive with the Computers parameter.

  • Computers - String array of computers to audit. Mutually exclusive with the InputFile parameter.

  • PSCredential - PSCredential that will be used to connect to the target machines. More information on how to use PSCredentials can be found here.

Optional Parameters
  • Compile - This switch when present tells the script to do a compilation of the just-gathered data to an Excel spreadsheet. If this is supplied; the Filter parameter must also be supplied.

  • CompileOnly - This switch when present tells the script to do a compilation of the cached data to an Excel spreadsheet. If this is supplied; the Filter parameter must also be supplied.

  • Filter - The name of the filter you wish to apply to the dataset. Must exist in the .\Filters directory with a .ps1 file extension. An example filter has been supplied with this solution with the name of Example.

Examples

This example will invoke an audit data gathering on the computers specified in the ExampleComputerList.txt file using the $MyPSCredential credential, and will then compile the data into an Excel spreadsheet using the Example filter.

.\Invoke-WindowsAudit.ps1 `
    -InputFile ".\ExampleComputerList.txt" `
    -PSCredential $MyPSCredential `
    -Compile `
    -Filter "Example";

This example will invoke an audit data gathering on the computers specified in the Computers parameter. Because the Compile switch has not been specified, no further processing will take place after the data has been gathered.

.\Invoke-WindowsAudit.ps1 -Computers "dev-test-01","dev-test-02";

This example will invoke a compilation against existing cached data using the Example filter.

.\Invoke-WindowsAudit.ps1 -CompileOnly -Filter "Example";

Output Example

See the Output-Example.xlsx file in the Examples folder.

Future Development

  • Further expand upon Apache/Tomcat sections
  • Write a proper PS type adapter for the WebAdministration module types and use this to expand on IIS properties
  • Drill down into all roles and features and gather status/configuration
  • Test for PowerShell v1 compatibility
  • Write bottom-line script to execute locally (for airgapped machines), output CLI XML file for manual move and compilation

windows-audit's People

Contributors

jojojgeorge avatar liamjbennett avatar

Watchers

 avatar

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.