$DataFolder = “c:\scandocs”
$2Days = (get-Date).adddays(-2)
Get-Childitem $DataFolder -recurse | ?{!$_.PSIsContainer -and ($_.LastWriteTime -lt (get-Date).adddays(-2))} | remove-item -whatif -force
$DataFolder = “c:\scandocs”
$2Days = (get-Date).adddays(-2)
Get-Childitem $DataFolder -recurse | ?{!$_.PSIsContainer -and ($_.LastWriteTime -lt (get-Date).adddays(-2))} | remove-item -whatif -force
I started looking around and found this script to email via vbscript. Later I’ll include different things you can email yourself if you’re an system administrator.
This script will connect to a computer remotely and get the updates installed along with date and domain info. I haven’t formatted the script correctly for display on the web so you might have to do some editing. The script will put the info in a csv file. This script was written with help from others on the net along with MS documentation. I know it needs more commenting but I’m really lazy, Sorry.
This script will connect remotely to computers listed in a text file and inventory the computer processor, memory, IP, and Hard drive space. The portion that inventorys the hard drive space was written by some else and the rest I got it from MS website along with other sites. This script will dump the info to a csv file which can then be imported into a database if you want. Being new to scripting I haven’t touched databases yet but see its importance. Again, not much commenting on the script but it works really well.
I began scripting a couple of months ago and wrote this script to inventory the version of norton installed on client computers. In my enviroment I simply export the computer accounts to a text file and run this script. As I get better with vbscript I’ll be able to connect directly to AD. It could use some comments which I’ll add later. Hope this helps someone.