Category Archives: Scripting

Powershell, VBS

Powershell – IP Assigned de DHCP

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 [...]

  • Share/Bookmark
Posted in Scripting | Tagged | Leave a comment

Powershell si bradul :)

Cine vrea acest bradutz in Powershell il poate downloda de Aici. Codul este foarte simplu:     $varf = “^”     $frunze = “/|\”     write-host -foregroundcolor ‘Red’ ($varf.PadLeft(16))     $tree = “/|\”   1..15 | ForEach-Object  {     $a=$_      write-host -fore ‘green’ (” “*(15-$a)+$frunze)     $frunze=”/”+$frunze+”\”     }     write-host -foregroundcolor ‘green’ (“|||”.PadLeft(17))     write-host -foregroundcolor ‘green’ (“|||”.PadLeft(17)) [...]

  • Share/Bookmark
Posted in Scripting | Tagged | Leave a comment

Powershell

Toata lumea povesteste despre PowerShell. Incerc sa scriu si eu un post care sa explice ce este cu acest limbaj de scripting. PowerShell este un limbaj care sa ii ajute pe administratorii de sistem sa realizeze taskurile zilnice pe care le au. El este mai mult mai complex decat Command Prompt si mai puternic decat [...]

  • Share/Bookmark
Posted in Scripting | Tagged | Leave a comment