This post will contain all my scripts and snippets in zip format for download, that I use to manage my ConfigMgr environments or anything related to System Center 2012. I’m going to update this post with every script I write. These scripts should all work, you probably need to adjust some of those scripts to your environment as some of them still have hard-coded stuff in them. As always: No warranty Download all in one: [Update] 22/11/2014 Fixed links I have fixed the link for the all-in-one download. I haven’t updated the zip file itself, but I will do that soon.
In part one of this miniseries I explained some principals around using the new class keyword in Windows PowerShell DSC resource modules. If you haven’t read that article yet, go find it here: http://www.david-obrien.net/2015/02/windows-powershell-dsc-classes-introduction-part-1/ This part 2 will concentrate on the enum keyword and the three main functions in each resource class. Enum -erate input One of the most important things in every script (no matter what language) is error handling. PowerShell and DSC is no exception here. For me, part of error handling is also to validate input users can provide your script or application with. Enum is used to implement constant values inside of a variable. A limitation […]
The Windows Management Framework 5 (WMF 5) Technical Preview also brought us PowerShell 5, and with that we got Desired State Configuration v2 (DSC v2). I just made that name up, I don’t believe it’s officially called DSC v2. Anyways, with PowerShell v5 we now got two new keywords, called “class” and “enum”. Developers will instantly recognise these two keywords and will also know what to do with them. I’m an IT Pro, not a developer, I had (have) to learn what to do with them. Follow me on my journey to a more “dev” side of the PowerShell world than I was ever used to.
ConfigMgr & PowerShell automation While being in Oslo for NicConf I had the pleasure to do a talk on “ConfigMgr and PowerShell – How to automate tasks in ConfigMgr” at a local Oslo Microsoft User Group. Even though the audience was quite small (10 attendees?), I enjoyed speaking there. It was more interactive than I expected, which was great. As promised, here are my slides (not many, I know, I’m not a Powerpoint guy): Here are some of the commands I used, run them in your test environment and on the ConfigMgr server: Enjoy, David
If you’ve been to my session on PowerShell Desired State Configuration and are interested in the slides, well, here you go. PowerShell DSC resources The session description: What is Powershell Desired State Configuration and how can you become the captain of that spaceship which is your IT environment? How hard is it really to create your own custom DSC Resource? Follow me on a journey where only the bold have gone before and realised, it wasn’t that hard after all. Download:
I was tasked to write a bunch of PowerShell scripts to deploy a new Active Directory Domain Services (ADDS) Server onto Azure. The end goal would be to have some kind of synchronisation running between the off-premises and the on-premises environment, the off-prem basically being the Test/Dev environment for that customer. Over the last couple of days I wrote down some notes on about what I did and what curiosities I found. If you haven’t yet started using the Azure PowerShell SDK, go check out http://azure.microsoft.com/en-us/documentation/articles/install-configure-powershell/ . This will help you get started. PowerShell SDK for Azure as with everything you are trying to automate, it helps a lot to have a […]
After getting rid of my Surface earlier this year there’s another big change for me, I’m saying good-bye to the Enterprise Client Management Group and with immediate effect am now a “System Center Cloud and Datacenter Management” (SCCDM) MVP. My MVP Profile has already been updated accordingly. Cloud and Datacenter Management MVP This has already been on my mind for some time. I’m still going to do and blog about ConfigMgr, but my focus will clearly stay on Cloud and Datacenter AUTOMATION, because that is what I do, in my free time, when speaking at events and of course at work. Even more exciting times ahead! -David
2015 brought its first big change for me, I’ve sold my Surface Pro 3 and bought a – wait for it – MacBook Air. Why did I sell the Surface Pro 3? Well, I was very, very excited when I got the Surface. I had the first Surface Pro, my wife had the first Surface RT and we were both pretty unimpressed with Microsoft’s first Surface. My wife still occasionally uses the Surface RT for some stuff, but I sold mine with great financial loss. Then, when Microsoft released the Surface Pro 3 I wanted to have it right away (the i5, 128GB version). Even with a 10% off voucher […]
I was setting up my new lab environment at home and ran into a VERY weird issue, that caused me a bit of a headache. Thanks to Social Media and a very helpful colleague I now found the solution, and because I wasn’t able to find any other article, here it is. Create a Plan in Windows Azure Pack If you ever wanted to create a Plan in your Windows Azure Pack (WAP) environment to give your tenants / users some IaaS / DBaaS functionality, then you might have run into this issue as well, or not. This whole issue just came to be because I got a bit ahead […]
2014 felt a bit like that. So much happened the last 12 months it’s hard not to forget something. had a session at User Group in Zurich / Switzerland quit my job at sepago, after 5 great years moved to Australia!!! I frigging moved to Australia!!! met a lot of great people here. had a session at TechEd Australia in Melbourne had a session at TechEd Australia in Sydney Went to my first MVP Summit (Redmond / Washington / USA) ever had 5 (or was it 6?) sessions at MMS Minnesota sharing the stage with great guys like Jeff Wouters, Trevor Sullivan and Greg Ramsey had 2 […]
Rebuilding my home lab with PowerShell I am currently rebuilding my home lab (again! This time properly, I promise.) and my goal is to use as much PowerShell as possible. I am building everything on a Dell XPS 15 laptop with a 1TB Samsung SSD and 16GB RAM. Enough for a mid-size mobile lab. The host runs Windows Server 2012 R2, what else? On top of that I have also installed the Windows Management Framework 5 November Preview in order to use all the latest and greatest features of PowerShell, for example Desired State Configuration in its latest version. Of course, I have also downloaded the DSC Resource Kit in […]