wevtutil el | Foreach-Object {wevtutil cl "$_"}
Warining! Command will clear ALL events on ALL event logs!
/Geecoholic
wevtutil el | Foreach-Object {wevtutil cl "$_"}
Warining! Command will clear ALL events on ALL event logs!
$maxPasswordAge = (get-addefaultdomainpasswordpolicy).MaxPasswordAge.Days
Get-ADUser -Filter * -Properties CannotChangePassword,PasswordNeverExpires,LastLogonDate,Passwordexpired,passwordlastset | Select Name, SamAccountName ,CannotChangePassword, PasswordNeverExpires, Enabled, LastLogonDate, Passwordexpired, Passwordlastset,@{l="ExpiryDate";e={$_.PasswordLastSet.AddDays($maxPasswordAge)}} | sort -property name | export-csv users_export.csv -Encoding UTF8
Set updateSession = CreateObject("Microsoft.Update.Session")
updateSession.ClientApplicationID = "Geecoholic Script"
Set updateSearcher = updateSession.CreateUpdateSearcher()
WScript.Echo "Searching for updates..." & vbCRLF
Set searchResult = _
updateSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0")
WScript.Echo "Updates Count: " & searchResult.Updates.Count
WScript.Quit
script NeededUpadatesCount.vbs
Get-WMIObject Win32_LogicalDisk | ForEach-Object {[math]::round($_.size / 1GB)}|Measure-Object -sum | select sumGet-WMIObject Win32_LogicalDisk -ComputerName RemoteComputerName | ForEach-Object {[math]::round($_.size / 1GB)}|Measure-Object -sum | select sum
/Geecoholic