Windows simple nice cleaner script

Hi I've made some research cleaning Old windows vmware disks enjoying "old style of 90's" Here are a nice script , it  cleans Explorer cache & makes automatic cleanup < Begin Code > cleanmgr /sagerun:11 @echo off Set "RegKey=HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" set "regkey2=HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\shell folders" call:getspecialfolders "Cache, History, Cookies" For /f "tokens=*" %%? in ( 'Reg.exe QUERY "%RegKey%" … Continue reading Windows simple nice cleaner script

The Powershell pocket Active directory CMDLets

Computer object commands List all computer accounts in a domain Get-ADComputer –Filter {Name –Like "*"} View all computers that are logged in for 90 days to the Active Directory Search-ADaccount -AccountInactive -Timespan 90 -ComputersOnly OR $lastLogon = (get-date).adddays(-90).ToFileTime() Get-ADComputer -filter {lastLogonTimestamp -gt $lastLogon} Find and delete all disabled Computer accounts in Active Directory Search-ADAccount -AccountDisabled … Continue reading The Powershell pocket Active directory CMDLets