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: 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: 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: 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...