This script use WMI to ping a list of computers. Only specific OS are pinged. Script (with Microsoft Active Directory module loaded : import-module activedirectory) : $ping = new-object System.Net.NetworkInformation.Ping $list = Get-ADComputer -LDAPFilter “(|(operatingsystem=Windows XP*)(operatingsystem=Windows 7*)(operatingsystem=Windows Vista*))” ForEach ($b
Get users that not belong to similar group names
Get service pack level on Windows 2008 servers
Get server network configuration using WMI
Get inactive users (>6 months)
WSUS server cleanup task
The best way to schedule an automatic cleanup of expired/superseeded update is to use the following Powershell script (source : http://www.peetersonline.nl/index.php/powershell/wsus-cleanup-with-powershell/) Script : #Region VARIABLES # WSUS Connection Parameters: [String]$updateServer = “myWSUSServer.domain.local” [Boolean]$useSecureConnection = $False [Int32]$portNumber = 80 # Cleanup
Testing for Schema Extension Conflicts
Source : http://technet.microsoft.com/en-us/library/testing-for-active-directory-schema-extension-conflicts%28WS.10%29.aspx You can use ADSchemaExtensionConflictAnalyzer.ps1 (http://go.microsoft.com/fwlink/?LinkId=191133), a Windows PowerShell script, to analyze application schema extension .ldf files against a production schema and generate a report on errors, conflicts, and other warnings. For example, if an application schema extension is
Set possible owners on core cluster resources
This script will set possible owners on core cluster resources (IP Address and Name) Script : Get-Cluster -Name ClusterName | Get-ClusterResource -Name “IP Address”,”Name” | Set-ClusterOwnerNode -Owners ClusterNode01,ClusterNode02 References Get-Cluster Get information about one or more failover clusters in a
Set a cluster resource dependency
This script set a cluster resource dependency on a file server clustered resource Script : Get-Cluster -Name ClusterName |` Get-ClusterResource -Name “FileServer-(FileserverResourceHostname)(Cluster Disk 10)” |` Set-ClusterResourceDependency -Dependency [“FileserverResourceHostname”][and [“Cluster Disk 10”]] Reference (http://technet.microsoft.com/en-us/library/ee461029.aspx) Set-ClusterResourceDependency Specify the resources that a particular