Get Status of Antivirus using SecurityCenter WMI
Get-WmiObject -NameSpace root/SecurityCenter -Class AntiVirusProduct | ft displayname, versionNumber,onAccessScanningEnabled, ProductUptodate
View ArticleUsing WMI Eventsinks
This example will monitor state transitions for a specific service (Wireless Zero Configuration) and speak the result Register-WmiEvent -Query “select * from __InstanceModificationEvent within 1 where...
View ArticleEventlog XML XPath filtering example
<QueryList> <Query Id=”0″ Path=”Security”> <Select Path=”Security”> *[EventData[(Data[@Name="TargetUserName"])=”uname”]] </Select> </Query> </QueryList>
View ArticleCisco icmp route-map failover
ip route 1.1.1.1 255.255.255.255 192.168.0.2 ip route 2.2.2.2 255.255.255.255 192.168.0.3 track 101 rtr 1 reachability track 102 rtr 2 reachability interface vlan1 ip address 192.168.0.1 255.255.255.0...
View ArticleRenew IP Addresses using Powershell WMI
([wmiclass]“Win32_NetworkAdapterConfiguration”).RenewDHCPLeaseAll()
View ArticlePowerShell WMI Eventsink example
To clear all currently registered eventhandlers: Get-EventSubscriber | % {Unregister-Event $_.SubscriptionID} Capture Service Status changes (Example uses Wireless Zero Configuration):...
View ArticleDisable IIS Socketpooling
By default, IIS will bind a certain port to all IPs sharing NIC. To disable this behaviour you need to disable socket pooling. You do this providing a list of ip:port pairs to listen to, with socket...
View ArticlePrevent W2k8+ from registering all adapter IPs in DNS
Normal behaviour for Windows 2008 onwards is to register all IPs for a certain adapter in DNS if dynamic dns registration is enabled. To prevent this behaviour you need to install below mentioned...
View ArticleType performance counters to console using typeperf
Typeperf is a command to echo performance counter data out to console (can also output to file or sql) typeperf “Processor(_Total)% Processor Time” -si 0:0:5 -sc 5
View ArticleHow to capture packets in a Cisco ASA
Start capture of everything on interface outside: #capture CAPFILE interface outside packet-length 1500 buffer 8192 Start capture on interface outside using access-list (define access-list first):...
View ArticleA very nice Powershell packet capture script written by Robbie Foust.
Find it here: http://blog.robbiefoust.com/?p=68
View ArticleDisk Space Dictator ™
Use this script to remind users logging on to Mgmt or TS machines to keep their profile and recycle bin size down. # Disk Space Dictator (tm) # (c) 2011 / jbjorkman $PSWarning=199 $RSWarning=99...
View ArticleMicrosoft iSCSI Software Target 3.3 released for download
Download from the following link, note that it’s only supported on W2k8R2 http://www.microsoft.com/downloads/en/details.aspx?FamilyID=45105d7f-8c6c-4666-a305-c8189062a0d0
View ArticlePowershell DFS Replication Check
Run this script on a dfsr-member to check status of all dfs replications. $RGroups = Get-WmiObject -Namespace "root\MicrosoftDFS" -Query "SELECT * FROM DfsrReplicationGroupConfig"...
View ArticleCisco – Show interfaces with errors
show int counters errors | exclude ^[a-zA-Z]+([0-9]|/)+(\ |0)*$
View Article