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: 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: 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: 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: Prompt Delivery

    Chatting to a punctual acquaintance, I was directed towards a ‘sweet hack’ to ‘never fear a long path ever again’: Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Command Processor] "AutoRun"="prompt $P$_$+$G" ...
  • 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: PowerShell and Poetry

    Some of the best scripts I've seen often remind me of my favourite poems. There's a structure, flow and precision manifest in both disciplines. I suspect this says a lot about the pleasure I derive from detailed patterns. @" THE THOUGHT-FOX I imagine this midnight moment’s...
  • 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, DHCP and Star Wars

    Like PowerShell? Like Star Wars? Like PowerShell AND Star Wars? Then, my friend, these are the articles you are looking for: Using PowerShell to Migrate DHCP Servers: Part 1 Using PowerShell to Migrate DHCP Servers: Part 2
  • Blog Post: Using Get-Acl to Identify Administrator Permissions

    A good friend – a certain Mr X - asked me the following: “…Do you happen to have a PowerShell command or script that would look at a Fileserver and dump out all the files and folders that the Administrator has permissions on?...” Well, I didn’t have a snippet...
  • 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...
  • 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...