PowerShell Lab
Build, find and save PowerShell
Reviewed templates and commands with requirements, permissions and risk spelled out. Nothing here runs anything — you copy, review and run it yourself.
Search pages, tools, PowerShell commands and ports
1#Requires -Modules DhcpServer2$mac = 'AA-BB-CC-DD-EE-FF'3Get-DhcpServerv4Scope -ComputerName 'DHCP01' |4 Get-DhcpServerv4Lease -ComputerName 'DHCP01' |5 Where-Object ClientId -eq $mac |6 Select-Object IPAddress, ClientId, HostName, AddressState, LeaseExpiryTimeClientId uses dashes: AA-BB-CC-DD-EE-FF.