This script will help you to enumerate all cluster resources and their possible owners on the cluster name “ClusterVirtualNode00”. Get-Cluster -Name ClusterVirtualNode00 | Get-ClusterResource | Get-ClusterOwnerNode References Get-ClusterOwnerNode Syntax Get-ClusterOwnerNode [-InputObject ] [-Cluster ] [-Group ] [-Resource ] [-ResourceType ]
Get all cluster resources and their dependencies
This script uses the cmdlet Get-Cluster to get all cluster resources and their dependencies Command : Get-Cluster -Name ClusterName | Get-ClusterResource | Get-ClusterResourceDependency References Get-Cluster Syntax Get-Cluster [-Domain ] [] Domain Get-Cluster [[-Name] ] [] Name Detailed Description This cmdlet
Find all locked out user account
Find all locked out user account This cmdlet lists all locked out user account in the current Active Directory domain Script : Search-ADAccount -LockedOut | select DistinguishedName References Search-ADAccount Syntax Search-ADAccount -AccountDisabled [-AuthType { | }] [-ComputersOnly ] [-Credential ]
Execute a cmdlet on a remote system with Invoke-Command
Enumerate all domains in a forest
You will be able to enumerate all domains in a forest : the script lists all domain names (FQDN) in an Active Directory forest Script : @(([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest()).Domains |select name ) References System.DirectoryServices.ActiveDirectory Namespace The System.DirectoryServices.ActiveDirectory namespace provides a high level abstraction object
Find an email address in the forest
With this script you will be able to find an email address in the forest and identify the Active Directory object linked on. (Get-ADobject -Filter {(mail -eq “johndoe@mail.com”)} -Properties sn,givenname,mail,displayname -SearchBase “dc=domain,dc=root” -Server “dc01.domain.root:3268” | ` Select-Object displayname,sn,givenname,mail) References Get-ADObject
Display port count per IP address
Find The Largest Top 10 Files and Directories On a UNIX
Cleanup data when the user account no longer exists
Copy the group members to another group
This script copy the group members to another group. You have the choice between Microsoft Active Directory cmdlet or the Quest Active Directory cmdlet. Script (with Microsoft Active Directory module loaded : import-module activedirectory) : $Source_Group = “CN=SourceGroupName,OU=Groups,DC=domain,DC=com” $Destination_Group =