Archive - January 2013

"Mastering others is strength.  Mastering yourself is true power." - Lao Tzu
 
 
  

Index
bar1
Archive and Delete Event Logs after 80MB
Auto-Fill Computer Description
Check to see if account is disabled
Cleanup Logs on Multiple Servers
Disable Flash Update
Enumerate Admins to File
List Disabled Accounts in AD
List Disabled Accounts in AD - PowerShell
Uninstall All Versions of Java Except Current
Send e-Mail When USB Gets Plugged In
Rename Script to e-Mail
Return Last Logged On User


bar1




Δ Useful Script of the Month
bar1


How to move multiple files, from many folders, into one folder


rem converge - copy files from many folders...to one folder
@echo off
title Converge Files
color 0a
set DirFrom=C:\Users\testuser\Desktop\powershell\ManyFolders\
set DirTo=C:\Users\testuser\Desktop\powershell\SingleFolder\
set FileExt=ps1
for /R "%DirFrom%" %%f in (*.%FileExt%) do copy "%%f" "%DirTo%"

pause

bar1






Δ Thursday, January 31st, 2013
bar1


Δ Archive and Delete Event Logs after 80MB

How to archive and delete computer logs

[download resource files]

Demo
demo

 

Have you ever needed to monitor event log size...and then do cleanup once a storage
threshold has been reached?  This script will basically monitor the event size, archive
the log to a specified folder, and then clear the event log automatically.  Note, you can
change the threshold size to anything you want.



Δ  [email me]

bar1





Δ Tuesday, January 29th, 2013
bar1


Δ Auto-Fill Computer Description

How to populate computer description

[download resource files]


This script could be used in your deployment script to auto-populate the computer description field.




Δ  [email me]

bar1





Δ Friday, January 25th, 2013
bar1


Δ Check to see if account is disabled

How to check if user account is disabled or enabled

[download resource files]

Demo
demo

 

This script uses the user account properties to check whether the account is enabled or disabled.



Δ  [email me]

bar1






Δ Monday, January 21st, 2013
bar1


Δ Cleanup Logs on Multiple Servers

How to cleanup logs on servers

[download resource files]


You can list servers in the script that you would like to archive log files to a compressed folder.



Δ  [email me]

bar1






Δ Friday, January 18th, 2013
bar1


Δ Disable Flash Update

How to stop the flash player from updating

[download resource files]

Demo
demo

 

This is one way to disable the flash player from auto updating.  The settings are located in
the mms.cfg which gets copied to the Flash folder.



Δ  [email me]

bar1






Δ Thursday, January 17th, 2013
bar1


Δ Enumerate Admins to File

How to return admins

[download resource files]

Demo
demo

 

Enumerates admins to a file...including nested groups.



Δ  [email me]

bar1






Δ Thursday, January 10th, 2013
bar1


Δ List Disabled Accounts in AD

How to list disabled accounts

[download resource files]


This will list the disabled accounts to a text file named report.txt.



Δ  [email me]

bar1







Δ Wednesday, January 9th, 2013
bar1


Δ List Disabled Accounts in AD - PowerShell

How to list disabled accounts using powershell

[download resource files]


List disabled accounts using PowerShell.



Δ  [email me]

bar1






Δ Monday, January 7th, 2013
bar1


Δ Uninstall All Versions of Java Except Current

How to uninstall java versions

[download resource files]

Demo
demo

 

This will collect the list of installed java versions to be uninstalled.  There is an input field
for the workstation name.



Δ  [email me]

bar1






Δ Friday, January 4th, 2013
bar1


Δ Send e-Mail When USB Gets Plugged In

How to send emails in your scripts

[download resource files]

 
If you haven't sent alerts or notifications via your scripts, you really have to try this one out. 
Basically, when you plug in a USB drive, the user gets and alert, and you receive an email. 
It uses an open smtp server to send the email.  Note, this has been tested under Windows XP
only.  When I test it under Windows 7/8, I'll post it again.



Δ  [email me]

bar1






Δ Wednesday, January 2nd, 2013
bar1


Δ Rename Script to e-Mail

How to send your scripts in emails

[download resource files]

Demo
demo

 
Have you ever tried sending a batch file, or vbscript via email?  You can't do it...that's not
without renaming it first, or zipping it.  This script strips the extension to allow for easy email
attachment.



Δ  [email me]

bar1






Δ Tuesday, January 1st, 2013
bar1


Δ Return Last Logged On User

How to get the last logged on user

[download resource files]


This just a simple script to return the last logged on user.



Δ  [email me]

bar1






 
 










  About

   I'm a Computer
   Systems Engineer

   Living and Loving Life

 

  Author