Skip to main content

More Powershell DSC resources released

powershell 









The PowerShell Blog has released information about the second wave of resources to use in your Desired State Configuration. Looks like the guys have been really busy  and released some neat resources for us.


Here is the list:


Resource Description Module Name Link
xADDomain Create and manage an Active Directory Domain xActiveDirectory click here
xADDomainController Create and manage an AD Domain Controller xActiveDirectory click here
xADUser Create and manage an AD User xActiveDirectory click here
xWaitForADDomain Pause configuration implementation until the AD Domain is available.  Used for cross machine synchronization. xActiveDirectory click here
xSqlServerInstall Create and manage a SQL Server Installation. xSqlps click here
xSqlHAService Create and manage a SQL High Availability Service. xSqlps click here
xSqlHAEndpoint Create and manage the endpoint used to
access a SQL High Availability Group.
xSqlps click here
xSqlHAGroup Create and manage a SQL High Availability Group. xSqlps click here
xWaitForSqlHAGroup Pause configuration implementation until a
SQL HA Group is available.  Used for cross machine synchronization.
xSqlps click here
xCluster Create and manage a cluster. xFailOverCluster click here
xWaitForCluster Pause configuration until a cluster is available.  Used for cross machine synchronization. xFailOverCluster click here
xSmbShare Create and manage a SMB Share. xSmbShare click here
xFirewall Create and manage Firewall rules xNetworking click here
xVhdFile Manage files to be copied into a Vhd. xHyper-V click here
xWebsite Added functionality to xWebsite to support configuration of https websites. xWebAdministration click here
xVhd Bug fixes xHyper-V click here

This is starting to look really promising. With the second wave of resources, DSC is beginning to look like an enterprise “product” that the IT-pros could embrace with vengeance. First off they have now included an resource to not only manipulate the objects in Active Directory, however also the infrastructure with the xADDomain and xADDomainController resources. As I have previousely commented in my blog, this was one of the missing elements of DSC. I even looked into creating an custom resource for manipulating AD-objects myself using the custom resource in DSC.

Secondly with the release of the SQL resources, we can now handle deployment of a full 3-tier application all in Powershell DSC. If your company is building software and you have not yet started looking in to DSC, now is the time to start. May I ask why you have not started? Normally software runs through 3-4 stages:
  1. Birth (created in an development environment)
  2. Test/Staging environment
  3. QA-environment
  4. Production environment
Agile development suggests that the software moves through this cycle several times during a year, maybe several times each month. What is the tasks required between these stages? Somthing like this perhaps:
  1. Create the required virtual machines to be used (normally perhaps a web-server and a database-server), DSC xHyper-V resource
  2. Install the required roles/features, built-in DSC resource
  3. Install other required software, built-in DSC resource
  4. Configure web-server/sql server DSC xSQLps and xWebAdministration
  5. Congfigure users, DSC xADUser
  6. Install your custom software, built-in DSC resource
By investing into DSC your software would enjoy an identical environment between the different stages of it’s live and thus reducing the time and cost of release. Even if you do not create the entire stage in DSC, your ROI (Return On Investment) would be very nice. Tell that to your boss and get starting with DSC and PowerShell.

Now if you are not into software development, you probably have some other scenario where you could use DSC. If you are doing manually repetitive tasks that DSC could do for you, my advice to you would be that you are doing it the wrong way. Automation has been around for ages, however with DSC and PowerShell this is looking to be easier than ever.

Enjoy the new resources, I will :-)

Comments

Popular posts from this blog

Monitoring Orchestrator runbook events from Operations Manager

Today I will follow up on my colleague’s post Mr ITblog (Knut Huglen) about monitoring Orchestrator Runbook events.  He has build a nice double up SNMP loopback feature that does self monitoring in Orchestrator resulting in entries written to a special Windows Eventlog. Now we need to raise alerts in SCOM when one of his runbooks fails or sends a platform event, who knows there could be trouble lurking in his paradise.

We are not going to do anything fancy, however these are the steps we will be focusing on today:
Create a Management Pack for our customizations Create rules that collects the events from the orchestrator serverOff we go then and fire up the SCOM console and a powershell window. First we create a MP, I am going to use powershell to do this, however you may use the SCOM console as well (Administration – ManagementPacks – Action: Create Management Pack):



Import the Management Pack into SCOM and move on to the Authoring section in the SCOM console. Create a new rule:



Give the…

Powershell – Log like you mean it

How do you do logging in powershell? Why should you do logging? What should you log? Where do you put your log? How do you remove your log? How do you search your log? All important questions and how you answer then depends upon what your background is like and the preferences you have. This will be a 2 part blog post and this is part 1.


Why should you log?

Well it is not mandatory, however I have 2 reasons:
Help with debugging a script/module/functionSelf documenting script/module/function
Firstly; Do you know any program that does not contain any bugs? Working with IT for the last 2 decades, I cannot name one. When you create scripts/modules/functions, you will create bugs, that is where they live and try to make your life a living mess.

Secondly: Adding a little extra information to your logging will make them self documenting. Do you like writing documentation? Well I normally am not fond of it and use logging while debugging to get two birds with one stone.


What should you log?

Anyt…

Powershell - List information about your WIFI networks

This is just a quick post about this new function I have created. Basically this is a text-output to powershell object output function that uses netsh to query the WIFI information. This illustrates the importance of changing the authentication level on your WIFI-network. No matter if you use WEP/WPA/WPA2 your password is available in clear text in your profile.



Cheers

Tore