mirror of
https://github.com/stylersnico/abyssproject-wiki.git
synced 2026-06-15 08:01:21 +02:00
docs: create powershell/export-reservations-dhcp
This commit is contained in:
committed by
stylersnico
parent
53c1b661d2
commit
6a2429b410
@@ -0,0 +1,24 @@
|
||||
---
|
||||
title: Export des réservations DHCP de WIndows Serveur
|
||||
description: Export des réservations DHCP de Wnndows Serveur en Powershell
|
||||
published: true
|
||||
date: 2023-08-10T12:00:43.919Z
|
||||
tags: powershell, dhcp
|
||||
editor: markdown
|
||||
dateCreated: 2023-08-10T12:00:43.919Z
|
||||
---
|
||||
|
||||
# Introduction
|
||||
|
||||
Le but de ce script est de récupérer les réservations DHCP au format CSV.
|
||||
|
||||
|
||||
# Script
|
||||
|
||||
```powershell
|
||||
Get-DHCPServerV4Scope | ForEach {
|
||||
|
||||
Get-DHCPServerv4Lease -ScopeID $_.ScopeID | where {$_.AddressState -like '*Reservation'}
|
||||
|
||||
} | Select-Object HostName,ClientID,AddressState | Export-Csv ".\$($env:COMPUTERNAME)-Reservations.csv" -NoTypeInformation
|
||||
```
|
||||
Reference in New Issue
Block a user