Un mic script care citeste ce IP a fost Assignat de serveru de DHCP in ziua respectiva. Tot ce trebuie sa faceti este sa schimbati _Server DHCP_ cu numele serverului
$datae=Get-Date
$ziua=$datae.DayOfWeek
$zistring=$ziua.ToString()
$fisname=$zistring.Substring(0,3)
$fispath = “\\_Server DHCP_\c$\WINDOWS\system32\dhcp\DhcpSrvLog-”+$fisname+”.log”
$a = Get-Content $fispath
“Computers added in DHCP”
“———————–”
ForEach($linie in $a ){
$b=$linie.split(“,”)
if ($b[0] -eq 10) {
“The computer “+$b[5]+” with the MAC address “+$b[6]+” and the IP “+$b[3]+” Was added to DHCP”
}
}
Categories
-
Ultimele articole
- Mentenanta SQL asupra bazelor de date SCOM
- Disk to Vhd
- Internet Explorer 9
- Concurs: Create Management Pack Extensions
- Rapoarte customizate SCOM 2007 R2
- Health Service Modules Event ID 11903
- The Web Site is Down
- Documentatie SCOM 2007 R2
- SCOM 2007 R2 Cumulative Update 1 Release
- MOF Reliability Guides – Workbooks part2
YouTube SCOM