Networking Ideas for PowerShell Scripters

Summary: The Scripting Wife presents networking ideas for Windows PowerShell scripters. Microsoft Scripting Guy, Ed Wilson, is here. Today the Scripting Wife is going to write the blog post… Hello fellow scripters! The Scripting Guy, Ed Wilson, is not feeling so great, so I thought I would be nice to him on this Sunday morning…


PowerTip: Find Module Information from Cmdlet

Summary: Find Windows PowerShell module information from a cmdlet.  How can I find more information about the module that provides a Windows PowerShell cmdlet?  Use the Get-Command cmdlet, pipe the results to the Foreach-Object cmdlet, then inside the script block,            use Get-Module. Here is an example using the Get-Process cmdlet: Get-Command get-process | foreach {Get-Module -name $_.modulename}


Weekend Scripter: Latitude, Longitude, and PowerShell

Summary: Microsoft Scripting Guy, Ed Wilson, talks about using Windows PowerShell to retrieve latitude and longitude information. Microsoft Scripting Guy, Ed Wilson, is here. Today it is cold and dreary, so I thought it would be a nice time to play around with Windows PowerShell. One of the things I have always wanted to do…


PowerTip: Use PowerShell to Get List of FSMO Role Holders

Summary: Use Windows PowerShell to get a list of FSMO role holders in Active Directory.  I use NETDOM QUERY FSMO to list my domain controllers that hold the FSMO roles, but can I do it with Windows PowerShell?  As usual, there is more than one way to do most things in Windows PowerShell, but here…


Active Directory Week: Essential Steps for PowerShell when Upgrading

Summary: Learn three essential steps for Windows PowerShell when upgrading from Windows Server 2003. Microsoft Scripting Guy, Ed Wilson, is here. Today we have the final post in the series about Active Directory PowerShell by Ashley McGlone. Before you begin, you might enjoy reading these posts from the series: Get Started with Active Directory PowerShell…


PowerTip: Use PowerShell to Work with Active Directory Date Fields

Summary: Use Windows PowerShell to work with Active Directory date fields.  How can I Use Windows PowerShell to work with date fields in Active Directory?  Try the following techniques: # Password last set within the last 30 days? $pwdLastSet = Get-ADUser Administrator -Properties pwdLastSet |      Select-Object -ExpandProperty pwdLastSet # Option A $pwdLastSet -gt (Get-Date).AddDays(-30).ToFileTimeUTC() #…


Active Directory Week: Stale Object Cleanup Guidance—Part 2

Summary: Scripting tips for cleaning up stale Active Directory accounts. Microsoft Scripting Guy, Ed Wilson, is here. Today we continue our series about Active Directory PowerShell by Ashley McGlone. Before you begin, you might enjoy reading these posts from the series: Get Started with Active Directory PowerShell Explore Group Membership with PowerShell See yesterday’s post for…


PowerTip: Use PowerShell to Get Inactive Active Directory Accounts

Summary: Use Windows PowerShell to get a report of inactive Active Directory accounts. How can I use Windows PowerShell to get a report of inactive Active Directory accounts? The Search-ADAccount cmdlet has a number of parameters and switches to help identify stale accounts: Search-ADAccount -AccountInactive Search-ADAccount -AccountDisabled Search-ADAccount -AccountExpired You can also use the -UsersOnly or -ComputersOnly switch to narrow the…


Active Directory Week: Stale Object Cleanup Guidance—Part 1

Summary: Learn about how to clean up stale Active Directory accounts. Microsoft Scripting Guy, Ed Wilson, is here. Today we continue our series about Active Directory PowerShell by Ashley McGlone. Before you begin, you might enjoy reading his first two posts: Get Started with Active Directory PowerShell Explore Group Membership with PowerShell Here's Ashley… In…


PowerTip: Use PowerShell to Find if User Is Nested Group Member

Summary: Use Windows PowerShell to find if a user is a nested member of a particular group.  How can I use Windows PowerShell to quickly find if a user is a nested member of a particular group,            for example, Domain Admins?  Use the -RecursiveMatch LDAP filter operator: Get-ADUser -Filter ‘memberOf ‑RecursiveMatch “CN=Administrators,CN=Builtin,DC=Fabrikam,DC=com”‘…