In a comment to my response to this question , cop1152 said he loved WMI scripts. Well, so do I!
What are your favourite, best, most useful scripts you'd like to share with the community?
thanks.
In a comment to my response to this question , cop1152 said he loved WMI scripts. Well, so do I!
What are your favourite, best, most useful scripts you'd like to share with the community?
thanks.
One I wrote to help a colleague, who RDPd to a server, opened Event Viewer, looked through it for errors. Then repeated for the other 3 servers... every day.
I've corralled a bunch of WMIC snippets here.
Everything in Microsoft's (free) tool Scriptomatic2!
One of my favs (because it was my first) that gave me the most trouble...that I wrote over and over and over until it worked correctly....was a script that remotely 'disabled' our homemade web-filter.
We use a 'customized' (by me) version of Squid with some freely available blacklists to content filter and block ports on our public machines (I work for a med-sized, 3-branch public library system).
The WMI script runs on a staff machine. Once a staff member executes it he/she is prompted to select which machine to disable the filter. When the script executes, essentially it removes the check mark from the proxy setting opions in Internet Explorer, at the registry level.
The filter is enabled by a batch file that fires off when the patrons session is up and the computer auto logs off and back on.
We ended up using my WMI only on a few test machines, but I really enjoyed learning how almost anything can be accomplished with WMI.
Script is useful and iam able to execute this. But the file is only showing the information like
========================================== Data: InsertionStrings:
More over ("EventView_" & today & ".log") this file is just creating the file with EventView_00.log not with actual date. As per the syntax it should give data instead off )00 .
From WSH JScript: