Code Monkey home page Code Monkey logo

xdhcpserver's Introduction

Build status codecov.io codecov.io

xDhcpServer

The xDhcpServer DSC resources are used for configuring and managing a DHCP server. They include xDhcpServerScope, xDhcpServerReservation, and xDhcpServerOptions.

Contributing

Please check out common DSC Resources contributing guidelines.

Resources

  • xDhcpServerScope sets a scope for consecutive range of possible IP addresses that the DHCP server can lease to clients on a subnet.
  • xDhcpServerReservation sets lease assignments used to ensure that a specified client on a subnet can always use the same IP address.
  • xDhcpServerOptions currently supports setting DNS domain and DNS Server IP Address options at a DHCP server scope level.

xDhcpServerScope

  • IPStartRange: Starting address to set for this scope
  • IPEndRange: Ending address to set for this scope
  • Name: Name of this DHCP Scope
  • SubnetMask: Subnet mask for the scope specified in IP address format
  • LeaseDuration: Time interval for which an IP address should be leased
  • State: Whether scope should be active or inactive.
  • Ensure: Whether DHCP scope should be present or removed
  • ScopeID: Scope Identifier. This is a read-only property for this resource.

xDhcpServerReservation

  • ScopeID: ScopeId for which reservations are set
  • IPAddress: IP address of the reservation for which the properties are modified
  • ClientMACAddress: Client MAC Address to set on the reservation
  • Name: Reservation name
  • AddressFamily: Address family type. Note: at this time, only IPv4 is supported.
  • Ensure: Whether option should be set or removed

xDhcpServerOption

  • ScopeID: ScopeID for which options are set
  • DnsServerIPAddress: IP address of DNS Servers
  • DnsDomain: Domain name of DNS Server
  • AddressFamily: Address family type
  • Ensure: Whether option should be set or removed

Versions

1.1

  • Bug fix, enables creating more than 1 DHCP server scope.

1.0

  • Initial release with the following resources
    • xDhcpServerScope
    • xDhcpServerReservation
    • xDhcpServerOptions

Examples

Creating a DHCP Server Scope

configuration Sample_xDhcpsServerScope_NewScope
{
    Import-DscResource -module xDHCpServer
    xDhcpServerScope Scope
    {
        Ensure = 'Present'
        IPEndRange = '192.168.1.254'
        IPStartRange = '192.168.1.1'
        Name = 'PowerShellScope'
        SubnetMask = '255.255.255.0'
        LeaseDuration = '00:08:00'
        State = 'Active'
        AddressFamily = 'IPv4'
    }
}

Reserving an IP address within a DHCP server

configuration Sample_xDhcpServerReservation_IPReservation
{
    Import-DscResource -module xDHCpServer
    xDhcpServerReservation PullServerIP
    {
        Ensure = 'Present'
        ScopeID = '192.168.1.0'
        ClientMACAddress = '00155D8A54A1'
        IPAddress = '192.168.1.2'
        Name = 'DSCPullServer'
        AddressFamily = 'IPv4'
    }
}

Setting the domain name for a DNS Server

configuration Sample_xDhcpServerOption_SetScopeOption
{
    Import-DscResource -module xDHCpServer
    xDhcpServerOption Option
    {
        Ensure = 'Present'
        ScopeID = '192.168.1.0'
        DnsDomain = 'contoso.com'
        DnsServerIPAddress = '192.168.1.22','192.168.1.1'
        AddressFamily = 'IPv4'
        Router = '192.168.1.1'
    }
}

xdhcpserver's People

Contributors

travisez13 avatar joeyaiello avatar powershellteam avatar vors avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  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.