Skip to main content

Posts

Showing posts with the label Pester

Identity Manager and Powershell

It is year 2016 and Identity Manager looks like it did in 2010 when Forefront Identity Manager (FIM) was released. Who came up with the name and added it to the Forefront portfolio anyway, crazy stuff. As you probably know, looks can be deceiving. Even if MIM looks the same and run basically the same features, it is still a powerful state machine. I have been buzy collecting scripts and tools I have used the last couple of years and have started on 2 Powershell modules for MIM. This post is just a brief introduction to the module and the plans for the future. Why create a module Wait a minute. Does not  Identity Manager  come with a Powershell module? No, it comes with a Powershell snap-in from 2010. Back in those days Snap-ins where the cool kids on the block and everybody created snap-ins for things that should be created as a module. I blame  Powershell  version 1.0, however they fixed that in Powershell version 2.0, I think. I use the snap-in as ...

Pester Operational Tests

I have created yet another GitHub repro " PesterOperationTest ". Feels like I do this every week, however that is not the case. But why? The purpose of this repository is to collect Pester Unit tests for your infrastructure. Anything that is mission critical for you business deserves a tests that validates the correct configuration. It will make you sleep like a baby and stop worrying when you implement a change in your environment if you tests pass. This will only become as good as the contribution you make to the repository. I would love to do all the work myself, however there is not enough time in the world. Think of it like you are helping yourself and at the same time a lot of other people could benefit from the test you create. How? My original thought was to organize this in folders, one for each vendor and with subfolders for each products and/or feature. The scripts will be published to the Powershell Gallery for easy and convenient access for everyone...

Devops – Unit testing in Powershell Part 2

Powershell has really gained a strong momentum the last 3-4 years and is becoming increasingly the scripting language of choice if you live in the Windows part of the IT world. Together with the increasing popularity of the Devops phrase, unit testing is a key factor going forward. This is part 2 ( Part1 ) of a small series of posts related to unit testing in Powershell. You can read the first post her. In the previous post we presented the Scenario we will be working with and the API functions that our SillyModule will wrap logic around. The tasklist Read up on Unit Testing frameworks for powershell (Pester or PSUnit) Create the the SillySystem Import-Object and Export-Object API Walk through of the module and the functions (Get/Update-Person/Group) Create tests for the functions Refactor where needed ad update the tests The SillyModule The context of the module is pretty simple. We need cmdlets to receive a list of persons or groups. The list may be filtered on a s...

Devops – Unit testing in Powershell

Powershell has really gained a strong momentum the last 3-4 years and is becoming increasingly the scripting language of choice if you live in the Windows part of the IT world. Together with the increasing popularity of the Devops phrase, unit testing is a key factor going forward. One of the new phrase/term that is spoken often and warm about is Devops . It represents the evolvement from regular IT operation to IT operations with development. It is getting increasingly difficult to separate what is Operations and what is Development, they are combined into one entity. traditionally IT operations has very limited experience (that is zero) with the unit test concept. Testing is catching on and becoming one of the key elements that separates regulars from professionals in the Devops world. Everyone know they need to learn it and may have done it or are in the process of embracing it. Powershell has really gained a strong momentum the last 3-4 years and is becoming increasingly the...