Giter Club home page Giter Club logo

backupdhcplogs's Introduction

backupDhcpLogs

Description

A PowerShell module that provides an easy way to backup and manage DHCP logs and configuration.

Features

  • Backs DHCP logs from previous days.
  • Ability to backup the DHCP server configuration.

To Do

  • Add full backup of all logs.
  • Remote backup.
  • Add check for the DHCP Server Windows feature.
  • Back up the configuration using something like Backup-DhcpServer or Export-DhcpServer instead of netsh.

Setting Up

This module requires PowerShell v3 from Microsoft. If you are running Windows Server 2012 - congratulations, it's already installed!

By default, PowerShell will not let you run unsigned modules and scripts and will only work in interactive mode. In order to run this module from a local drive, you will need to alter this behaviour. To do this, run PowerShell as an Administrator, then run the following command:

Set-ExecutionPolicy RemoteSigned

Copy the module files (BackupDhcpLogs.psm1, BackupDhcpLogs.psd1) into the following directory:

%HOMEPATH%\Documents\WindowsPowerShell\Modules\BackupDhcpLogs\

Usage

Example 1

C:\PS>Backup-DhcpLogs -Destination "C:\Destination\Folder"

Backs up the DHCP logs to 'C:\Destination\Folder'.

Example 2

C:\PS>Backup-DhcpLogs -Destination "C:\Destination\Folder" -RetentionDays 180

Backs up the DHCP logs to 'C:\Destination\Folder' and will delete old logs of the form 'DhcpSrvLog*' or 'DhcpV6SrvLog*' when they are older than 180 days.

If you are running this using the task scheduler, this can be done easily using the following command as the action:

powershell.exe -command &{Backup-DhcpLogs -Destination 'C:\Destination\Folder\DHCP' -RetentionDays 180}

Contact

For help, feedback, suggestions or bugfixes please check out http://tookitaway.co.uk/ or contact [email protected].

backupdhcplogs's People

Contributors

davegreen 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.