Musings on the splendour of PowerShell Browse by Tags - PoSh Chap - Site Home - TechNet Blogs

PoSh Chap

Musings on the splendour of PowerShell

Browse by Tags

Related Posts
  • Blog Post: Scripting Tips and Tricks: Requires

    The PoSh family require lots of things. Food, warmth and shelter seem to be at the top of their list. Attention is up there, too. Interestingly, the PoSh chickens have similar requirements... although, PowerShell still doesn't figure on THEIR list. More interestingly, scripts have requirements...
  • Blog Post: Creating a Windows Server 2012 DHCP Failover Relationship

    Here's my quick and simple recipe for creating a Windows Server 2012 DHCP failover relationship. The following ingredients are required: two Windows Server 2012 DHCP servers with the DHCP role installed two or more scopes already configured as type DHCP on the first DHCP server ...
  • Blog Post: Authentication Policy Silos

    A short one this week. Here's my latest 'Hey, Scripting Guy! Blog' posts: Weekend Scripter: Authentication Silos Part 1 Weekend Scripter: Authentication Silos Part 2 These ones are about using PowerShell to create an Authentication Policy Silo. This Windows Server 2012 R2 Active...
  • Blog Post: One-Liner: Find User Accounts Configured for DES Encryption

    Once more, with feeling: extended support for Windows Server 2003 ends on July 14, 2015... Less than a year to go! Hopefully, you've already upgraded your domain controllers to at least Windows Server 2008 R2. If you haven't, there are security enhancements to be aware of. Here's...
  • Blog Post: One-Liner: PS Remoting - Connected Clients

    They say "imitation is the sincerest form of flattery". Who 'they' are remains a mystery. I do know that 'they' seem to say a lot of things, some of which they probably shouldn't... Still, let me start this post with imitation; let me introduce the PoSh chickens. Actually...
  • Blog Post: PS Remoting Considerations

    I'm winding my way through the glorious English countryside on an early morning train. The weather outside the window is glorious, my new short-sleeved shirt (in tribute to the weather) is glorious and my train-issued coffee is... well, brown. Coffee aside, given that gloriousness abounds today,...
  • Blog Post: Useful Windows Feature Commands

    There are a number of cmdlets from the ServerManager module that I find myself using on a regular basis, specifically WindowsFeature cmdlets. I thought I'd share some of them. This one shows what PowerShell related stuff I have installed or available... Get-WindowsFeature | Where-Object { ...
  • Blog Post: Active Directory Replication Cmdlets - Site Creation

    To create an Active Directory site with VBScript took about 30 lines of code and it took a few less lines to create an Active Directory site with v1 of PowerShell. With the introduction of the Active Directory PowerShell module in Windows Server 2008 R2, you could cut this down to 5 lines. Here's...
  • Blog Post: One-Liner: Find Manually Created Replication Connection Objects

    Replication connections between domain controllers are created by the Knowledge Consistency Checker (KCC). The KCC runs every 15 minutes and will adjust the replication topology in response to configuration changes or to a domain controller becoming unavailable. Here's a smashing picture of an...
  • Blog Post: Remote Group Policy Update - 'Under the Bonnet'

    Windows Server 2012 introduced the ability to perform remote Group Policy updates, kicked-off from the Group Policy Management Console or via the Invoke-GPUpdate PowerShell cmdlet. So... what happens when you schedule a remote Group Policy update? Before I start, the first thing to mention is that...
  • Blog Post: One-Liner: Targeted Remote Group Policy Updates

    Windows 2012 added one additional cmdlet to the PowerShell GroupPolicy module - Invoke-GPUpdate When used in conjunction with the ActiveDirectory PowerShell cmdlets we can easily target remote group policy updates. Here's a one-liner to run a Group Policy update on all Windows Server 2012 systems...
  • Blog Post: Active Directory Bulk User Modification

    An old favourite! This is what automation is all about: making the tedious and the long-winded incredibly easy, and, dare I say, joyous! Your HR department gives you a dump of user names with email addresses and phone numbers to be updated in Active Directory. The dump is in the form of a CSV file...
  • Blog Post: Using PowerShell to create a BPA Problem Report

    In Microsoft Global Business Support we have a number of proactive health and risk assessments available to Microsoft Premier Support customers. These invaluable, technology-specific assessments are known as RAP as a Service (RaaS). If you don't have access to a Microsoft Premier Support contract...
  • Blog Post: Tracing the Source of Account Lockouts

    As an Active Directory administrator, you have no doubt experienced re-occurring account lockouts. Back in the day, you would need the investigative powers of a Mr Sherlock Holmes to get to the bottom of these little mysteries! Then, the Account Lockout Tools made the process somewhat easier. Now, though...
  • Blog Post: PowerShell ISE Script Browser Add-On

    Still not using v3 or v 4 of the PowerShell Integrated Scripting Environment nI (ISE) for script development? If not, here's yet another reason to make the change from your current script editor or, dare I say, Notepad! Version 1.1 of the ISE Script Browser Add-On The add-on gives you...
  • Blog Post: 'Retire' Active Directory Non-LVR Group Members

    Here's my latest 'Hey, Scripting Guy! Blog' outing. I talk about using the AD Replication cmdlets to easily find and remediate Non-LVR group members... Remediate Active Directory Members that Don't Support LVR I've really geeked-out in this one, with references to one of...
  • Blog Post: One-Liner: Collect AD LDS Lingering Object 1946 Events

    Lingering Objects... what are they? Here's the essence of LOs: "...Lingering objects are objects that exist on one or more DCs that do not exist on other DCs hosting the same partition...They are essentially object delete operations that do not successfully replicate to DCs/GCs that host...
  • Blog Post: One-Liner: Specific GPO and DC Information from a Forest

    Man, I love PowerShell one-liners. The efficiency, the elegance, the challenge! Here's one to give me a list of the domain names in a forest, the number of group policies per domain and the number of domain controllers per domain. ( Get-ADForest ) . Domains | ForEach-Object { "Domain...
  • Blog Post: Comprehensive GPO Backup Script

    Obtaining a comprehensive, automated backup of your domain Group Policy Objects has always been a challenge. First, we had the GPMC WSFs (Windows Script Files) and then the glory of PowerShell and the Backup-GPO cmdlet. However, like a single chunk of chocolate, they were never quite enough... so...
  • Blog Post: Prepopulate Passwords to RODCs with PowerShell

    Hello! The sun is shining, spring has sprung and it's nearly the weekend... life is sweet! Today, I'm going to talk about using the AD Replication cmdlets, introduced with Windows Server 2012, to prepopulate passwords to your RODCs. No more repadmin, no more DSA.msc... just pure, unadulterated...
  • Blog Post: To and Fro, Back and Forward Links

    I seem to have acquired a post sack. It has the initials NP on it... Hmmm, what's inside? This one looks interesting... "...Dear, Sir, How can I use PowerShell to check that a backlink is populated for an object in AD? Yours, faithfully, Mr Johnny Face..." ...
  • Blog Post: Logging, On

    Below is an excerpt from one of the ‘Inside Track’ pieces I wrote for the Microsoft Press Windows PowerShell Best Practices book by Ed Wilson, the Microsoft Scripting Guy. Why consider script logging? You’ll have to troubleshoot issues with your scripts - I’ve written...
  • Blog Post: One-Liner: Active Directory Schema Version

    Rules rule! What's a directory service without schema? This week I was asked about the Active Directory schema version for Windows Server 2012 R2. Here’s how to get hold of it with PowerShell: Get-ADObject ( Get-ADRootDSE ) . schemaNamingContext -Property objectVersion ...
  • Blog Post: PowerShell and Executable Output (with Boats)

    What floats your boat? For me, it’s usually a body of water, but I also like being asked stuff about PowerShell. Here’s one such question: “How come in a forest with two domains each with two (2008R2) domain controllers I get the following results with PowerShell? ( nltest...
  • Blog Post: One-Liner: Get a List of AD Users Password Expiry Dates

    All good things come to an end. Rivers run their course, curtains fall and… passwords expire. We have epilogues, codas and an Active Directory attribute named msDS-UserPasswordExpiryTimeComputed . How can we use that attribute to get a list of enabled Active Directory accounts and their...