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: Tidy Up That Pesky Computers Container with PowerShell

    Another customer question (they're keeping the PoSh Chap blog in business)! By default, when a computer account is created it gets placed in the Computers container. Now, experience tells me that some folks aren't good at moving these computers to a production OU and as they're...
  • Blog Post: Scripting Tips and Tricks: Script Development with Splatting

    Advice can be given, ignored or taken. Over the next few weeks I'll write about some scripting practices I find useful and helpful. You can decide if these tips are for you... When writing a longer script I often have to work on it as and when I can. These scripts tend to have lots of parameters...
  • Blog Post: Scripting Tips and Tricks: Param()

    Param() - the next instalment in the exciting Scripting Tips and Tricks series! I'm a tidy person: tidy desk, tidy mind, and all that jazz. I believe in being as thorough and proper in my scripts and functions as possible. To that end, I delight in using PowerShell features such as: #Requires...
  • Blog Post: One-Liner: Change Account Lockout Threshold

    What's the optimal Account Lockout Threshold value? A question that continues to generate a lot of debate! If an account lockout threshold is set, the latest guidance, issued with Windows Server 2012 R2, suggests a value of 10 . Visit this post for more information: Configuring Account Lockout...
  • Blog Post: Use PowerShell to Check for High Privilege Group Membership

    Here's my latest 'Hey, Scripting Guy! Blog' outing: Use PowerShell to Search Active Directory for High-Privileged Accounts It's the second in a four-part series on securing and optimising RODC administration. Here's the first post: Use PowerShell to Work with RODC Accounts...
  • Blog Post: Verify Active Directory Group Naming Standards

    I love the stuff customers ask me! This week one of the chaps relatively new to PowerShell wanted some code to check for deviations from the organisation's group naming standards. A simple enough task, I thought, one he could accomplish with some pointers from me. My metaphorical gauntlet was...
  • Blog Post: One-Liner: Active Directory Protected Objects

    This week I was asked how to get a list of Active Directory protected objects with PowerShell. Protected objects can't be deleted as they are critical to the health of Active Directory. The easiest way I could think of is to use Get-ADObject with a specific LDAP filter. Get-ADObject -LDAPFilter...
  • Blog Post: Scripting Tips and Tricks: CmdletBinding()

    It's been a little while since we've had a Scripting Tips and Tricks post... and, boy, what a topic to return on - CmdletBinding! The last Tips and Tricks post talked about using Write-Verbose in scripts and advanced functions. It's just one of the features enabled with CmdletBinding ...
  • Blog Post: Help, I Need Connectivity!

    Help, not just any connectivity, Help, you know, I need a proxy... Won't you please, please help me? ... Right, note to self: ignore the catchy tune and write the post. Here goes... ... With v3 of PowerShell the Help System delivered a number of improvements. My favourite is the...
  • Blog Post: Introducing Scriptify!

    A bit of a departure this week... One of my colleagues in the UK has put together 'Scriptify' to categorise the 700+ SharePoint cmdlets: Scriptify As an administrative value-add and as a beginner's learning aid I really like the concept. What about applying this to the Active...
  • Blog Post: One-Liner: My Take On Finding Stale User and Computer Accounts

    Using PowerShell and information in Active Directory to identify 'stale' user or computer accounts is prone to inaccuracies. This is because there are many circumstances or technical nuances that can make the data unreliable. For example, think of a globe-trotting sales person, they (and their...
  • Blog Post: Managing Azure VMs with PS Remoting

    I'm a BIG fan of Microsoft Azure. I'm also a BIG fan of dystopian novels. What have the two got in common? Nothing, AFAIK, although I'm sure some tenuous links could be found by the hard-of-sleeping... Blimey, I'm off topic already... so, Microsoft Azure... I'm an even BIGGER fan...
  • Blog Post: One-Liner: Delegate Group Policy Management

    Here's a quick and easy way to delegate the management of existing Group Policy Objects in your domain. Set-GPPermission -All -Domain "halo.net" -TargetType Group -TargetName "Domain Local - Halo GPO Edit 1" -PermissionLevel GpoEdit What's going on here then? ...
  • Blog Post: Scripting Tips and Tricks: Write-Verbose

    A couple of weeks ago I reminisced about message boxes. In that post I mentioned that I use the Write-Verbose cmdlet in scripts. Here's how why and how... Why? Information sent to the verbose message stream can aid troubleshooting. It's also great for tracking the progress of a script or...
  • Blog Post: Scripting Tips and Tricks: Strict Mode

    Dealing with the PoSh progeny, it is important to possess a Strict Mode to compliment the now famous Naughty Step *. Such techniques maintain discipline and keep the troops in line. My Strict Mode is as far removed from the Wackford Squeers' school of discipline as one can imagine, being nothing...
  • 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...