Geeks With Blogs
Michel Klomp Monitoring and Scripting
Logparser in powershell One of the few examples how to use logparser in powershell is from the Microsoft.com Operations blog. This script is a good base to create more advanced logparser scripts: $myQuery = new-object -com MSUtil.LogQuery $szQuery = “Select top 10 * from r:\ex07011210.log”; $recordSet = $myQuery.Execute($szQuery) for(; !$recordSet.atEnd(); ......

Here is a small Powershell script for creating a two-way forest trust. $localforest = [System.DirectoryServices.A... $strRemoteForest = ‘domain.local’ $strRemoteUser = ‘administrator’ $strRemotePassword = ‘P@ssw0rd’ $remoteContext = New-Object System.DirectoryServices.Ac... ......

the following snippet can be used to add more than one user to the grantsendonbehalfto property with Powershell and the Exchange Management Shell get-mailbox dummy |set-mailbox -grantsendonbehalfto “testuser3″ $a = get-mailbox testuser2 | select-object grantsendonbehalfto $b = get-mailbox dummy| select-object grantsendonbehalfto $a.grantsendonbehalfto ......

Here is a small vbscript that uses logparser to get the most used ISA rules. This can be useful if you have multiple allow or deny rules and the order of this rules is not important. In this situation you want to place the most used rule on top. There are some requirements for this script. You need to install logparser on a client or server. And you ......

If you run a MSH script you probably get an error. The reason for this is that the standard execution policy for MSH is set to restricted.This is the secure by default mode from MSH. To configure MSH to run scripts you need to change a registry key.HKEY_LOCAL_MACHINE\ SOFTWARE\Microsoft\Msh\Micr... ExecutionPolicythe default ......

Introduction. A few weeks ago I read an article from securityfocus (http://www.securityfocus.c... how you can use MRTG as an Intrusion detection tool. The theory behind the article is that most attacks create some type of anomaly in the way the system is used, high amount of traffic or a high rate of errors. And with MRTG you can make ......

If you take the security settings in a GPO, and look closer to the audit policy. You will see 2 logon events. Audit account logon event and audit logon event. What are the differences and why did Microsoft give them such a confusing name? I was looking for some resources to answer this question, when google show me this page. http://blogs.msdn.com/ericf... ......

Some command line tools ask for the UNIX time. If you’re using Jscript, this is no a problem. But VBscript doesn’t have a function that does this. So here is some nice one-liner that gives the UNIX time WScript.echo DateDiff("s", "12/31/1969 00:00:00", _ DateSerial(Year(Now), Month(Now), Day(Now)) _ + TimeSerial(Hour(Now), Minute(Now), Second(Now))) ......

This are the two must have resources for every serious vbscripter. The portable script center, this file containing most of the script samples of the “real” script center on TechNet. In a very usable CHM file. http://www.microsoft.com/do... And the Windows ......

So this is the First post of my first blog :)



Copyright © Michel Klomp | Powered by: GeeksWithBlogs.net