Tag Archives: ICT

PowerShell – Get-EnumValue function to get possible values of properties / attributes

PowerShell – Get-EnumValue function to get possible values of properties / attributes

In my previous blog post I blogged about how to get the possible values of an attribute or property like by example the service starttype using enumerators.

For future use I’ve created this function called Get-EnumValue. The function (and any updated future versions) can be found on ScriptCenter:

But for those that don’t want to click and just want to see the current version, here it is:

Function Get-EnumValue




        Determine possible values of a property / attribute of the [system.enum] type

        By example the possible values of startup type of a service.


        Determine possible values of a property / attribute of the [system.enum] type

        By example the possible values of startup type of a service


        In some cases this can easily be determined if there is a “set-” version of the cmdlet.

        By example with Get-Service, there is also a Set-Service where the StartUpType values can be determined using “Get-Help Set-Service -Full” or by simply typing: Set-Service -StartupType and using auto completion.


        In some cases this is however not possible and this function can be used.

    .PARAMETER EnumProperty

        Input a property of the [System.enum] type. By example: (Get-Date)[0].DayOfWeek or (Get-Service)[0].StartType’)    



        $Property1 = (Get-Date)[0].DayOfWeek

        $Property2 = (Get-Service)[0].StartType

        Get-EnumValue -EnumProperty $Property1,$Property2






        Set $FormatEnumerationLimit to -1 to prevent cutoff of the results.

        Store 2 properties in variables and use the Get-EnumValue function with the named parameter -EnumProperty to enumerate their values.



        Get-EnumValue -EnumProperty (Get-Date)[0].DayOfWeek,(Get-Service)[0].StartType






        Set $FormatEnumerationLimit to -1 to prevent cutoff of the results.

        Use the Get-EnumValue function with the named parameter -EnumProperty to enumerate their values without first storing them in variables.



        $Properties = @((Get-Date)[0].DayOfWeek,(Get-Service)[0].StartType)

        Get-EnumValue -EnumProperty $Properties






        Set $FormatEnumerationLimit to -1 to prevent cutoff of the results.

        Store 2 properties in a single array and use the Get-EnumValue function with the named parameter -EnumProperty to enumerate the values of the properties in the array.



        (Get-Date)[0].DayOfWeek,(Get-Service)[0].StartType | Get-EnumValue | Format-Table    






        Set $FormatEnumerationLimit to -1 to prevent cutoff of the results.

        Put 2 properties in the pipeline and pipe them to Get-EnumValue to get their values.


        1) By default, the EnumValues are truncated like this for format-list, format-table, etc:


        For Format-List:


        TypeName   : System.DayOfWeek

        EnumValues : {Sunday, Monday, Tuesday, Wednesday…}


        TypeName   : System.ServiceProcess.ServiceStartMode

        EnumValues : {Boot, System, Automatic, Manual…}


        For Format-Table:


        TypeName                               EnumValues                            

        ——–                               ———-                            

        System.DayOfWeek                       {Sunday, Monday, Tuesday, Wednesday…}

        System.ServiceProcess.ServiceStartMode {Boot, System, Automatic, Manual…}


        By setting $FormatEnumerationLimit to -1 all values will be shown (



        2) This example uses [Enum]::GetValues but it can easily be modified to use [Enum]::GetNames


        3) Additional information and resources:


    [CmdletBinding()] #Provides advanced functionality. For more details see “What does PowerShell’s [CmdletBinding()] Do?” :



        [Parameter(Mandatory=$true, #Parameter is mandatory.

                   ValueFromPipeline=$True, #Allows pipeline input.

                   Position=0, #Allows function to be called without explicitly specifying parameters, but instead using positional parameters in the correct order

                   HelpMessage=‘Input an object of the [System.enum] type. By example: (Get-Date)[0].DayOfWeek or (Get-Service)[0].StartType’)] #Enter a help message to be shown when no parameter value is provided.

        [ValidateNotNullOrEmpty()] #Validate the input is not NULL or empty

        [ValidateScript({$_ -is [System.Enum]})] #Validate whether or not the input is actually of the [System.enum] type.








        $Output = @()

        Foreach($object in $EnumProperty)




                $TypeName = ($object | Get-Member)[0].TypeName

                $EnumValues = [Enum]::GetValues($TypeName) #Pre-PowerShell 3.0

                $ObjectEnumResult = New-Object PSCustomObject -Property @{

                ‘TypeName’ = $TypeName

                ‘EnumValues’ = $EnumValues


                $Output += $ObjectEnumResult




                Write-Verbose “Error occurred processing $object







        #Send output to the pipeline








1 Comment

Posted by on March 11, 2016 in Automation, ICT, Microsoft, Powershell


Tags: , , , , , , , , , , , , , ,

Free PowerShell Desired State Configuration (DSC) training on February 25th and 26th

Microsoft Virtual Academy (MVA) is hosting 2 PowerShell Desired State Configuration (DSC) training classes on February 25th and February 26th:

  1. Getting Started with PowerShell Desired State Configuration (DSC)
  2. Advanced PowerShell Desired State Configuration (DSC) and Custom Resources

The links above provide include a course outline and a link to register for the Jump Start. And even if you can’t join live, the recordings will always be made available at a later time so you can watch whenever it suits you better.

PowerShell DSC is becoming increasingly important and I personally also still need to learn more about it and look forward to it.

I hope it’s useful to you as well.


Tags: , , , , , , , , , , , , ,

Book review : Cloud Computing Concepts, Technology & Architecture


Title: Cloud Computing Concepts, Technology & Architecture
Number of pages: 
ISBN: 9780133387520
May 2013

My opinion:

The book is well written, is vendor neutral, covers both business and IT aspects and contains many great diagrams. It also has a lot of useful references to external resources.
What I disliked, is that because of the vendor neutral approach some aspects are relatable enough (especially for people that don’t have a lot of working experience). I feel the book would have benefitted by providing more real-life examples of products or services.

The book is a good start for experienced people and will especially come in handy as a reference when getting involved in cloud computing projects. It will help understand vendor specific products and services better.

I would recommend people that are new to cloud computing (or that have very limited working experience) to first read a cloud essentials book like the one from Sybex before reading this book though.

To take a look at the book and its content, you can visit the book’s companion website:


Tags: , , , , , , , , , ,

Book review : Cloud Essentials – CompTIA Authorized Courseware for Exam CLO-001

9781118408735 cover.indd


For those who haven’t read my previous blog posts, here’s a short summary. About 1,5 – 2 years ago I decided that I wanted to know more about cloud computing and get certified as well. I used freely available resources to attain these certifications:

In short, my conclusion was that the quality of the freely available resources were not sufficient. ITpreneurs were kind enough to provide me with access to their e-learning course and Train Signal (now Pluralsight) provided me with their video training. Reviews for both can be found here:

Even though both resources are good, I personally prefer a book over eLearning and video training. As such I picked up a copy of “Cloud Essentials : CompTIA Authorized Courseware for Exam CLO-001


Number of pages: 268
ISBN: 978-1-118-40873-5
: June 2013

My opinion:

The book is well written and knows to provide a very good basis of cloud computing both technical and non-technical. Even though the number of pages is limited, the most important aspects are covered in my opinion, which should be enough to provide insight and to pass the Exin and Comptia cloud exams.

What I disliked are some of the questions at the end of the book, because they are sometimes a bit strange. But as far as I can remember, this was also the case in the official exams … so better get used to it if you are going to get certified.

All in all, this is a very good book to get started with cloud computing.


1 Comment

Posted by on July 15, 2014 in Cloud, ICT, Learning, Private cloud, Public Cloud


Tags: , , , , , , , , , , , , , , , , , , , , ,

ICT – Great article by Paul Simoneau about ICT challenges including suggestions to deal with them

As an ICT professional I believe working in ICT can be very challenging. Paul Simoneau wrote a great article about current and future challenges including suggestions to deal with them.

The challenges covered in the article are: new technology, cloud, big data analytics, virtualization, Bring Your Own Device/Apps (BYOD/BYOA), shadow IT, new generations of workers, energy  efficiency, user systems, creating value, interoperability and social networks.

I wanted to share this article because I feel it reflects reality very well.


Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Cloud – ITpreneurs CCC Professional Cloud Solutions Architect course

At the beginning of September I had the opportunity to attend the first ever Cloud Credential Council (CCC) Professional Cloud Solutions Architect (PCSA) course from ITpreneurs. The trainer was Mark Skilton and I really loved the training. But before telling you more about my experience, I’ll first first explain both the certification and the course in a bit more detail.

What is the CCC Professional Cloud Solutions Architect (PCSA) certification and who is it for ?

The PCSA certification is a globally recognized certification for technology architects. Solution Architects need to understand the impact that cloud is having on business and information architecture, application design, data management and security architecture and be very familiar with the topology and ecosystems that are being created as a result of increasing adoption of cloud technologies and operating models The certification is designed for senior technology professionals who are architecting and designing the future generation of technology solutions. Being PCSA-certified showcases your cloud architecting experience, skills and knowledge, and demonstrates you are capable to manage the various stakeholders within the enterprise. For more information, please take a look at the website:

What is the ITpreneurs CCC Professional Cloud Solutions Architect (PCSA) course ?

The ITpreneurs CCC PCSA course is a 3-day instructor led course that provides attendees with the required knowledge and skills for the CCC Professional Cloud Solutions Architect (PCSA) certification. The course material was created by lead author Mark Skilton and peer reviewers Vladimir Baranek and RajaGopalan Varadan. For more information, contact ITpreneurs and/or take a look at the course description:

My experiences with and opinion about the ITpreneurs CCC PCSA course

Like I said at the beginning, I really loved the CCC PCSA course because:

  • It covers an important current topic that I believe will become even more important in the future.
  • The course materials are very complete and of great quality.
  • There’s a good balance between theoretical and practical knowledge.
  • The cases are mini workshops that force you to apply your knowledge, which provides more insight. They are also consistent with cases from previous cloud courses from ITpreneurs.
  • There is a lot of interaction between the trainer and the students.
  • Mark Skilton presented the course with a lot of enthusiasm and modified the course content on the go to focus more on the interests of the audience. 

One of the difficult parts of cloud computing is that it’s a very broad definition. As such, different interpretations and explanations are used for the same word/technology by different people and companies. So during the course there were some discussions. I thought this was good, because this will happen in real-life as well. It also stresses the importance of clear definitions and verifying correct understanding of all involved parties.

The special version of the course I attended was only two days, while the regular course will be three days. Since there was so much information to take in and because there were many discussions, the two days unfortunately weren’t enough to cover everything. ITpreneurs and Mark Skilton modified the course on the fly to cover the most important things, but I would have loved to go into more detail during the course if there had been time. Unfortunately this wasn’t the case, but since the course materials are of great quality I’ll be reading them at home instead.

As always there’s room for improvement. Our class provided a lot of feedback that Mark Skilton and ITpreneurs took to heart. They seemed to be really committed to improving the course so I expect the course to become even better since the course materials are currently being reassessed and restructured.

I hope you enjoyed reading about my course experience. For those interested in it, I added some more information about ITpreneurs and the Cloud Credential Council at the end of this blog post.


I’d like to thank Corjan Bast and ITpreneurs for providing me with the opportunity to attend this course free of charge. I also want to thank Mark Skilton and all other great people involved in this course for their participation, valuable input and hard work.

Read the rest of this entry »


Tags: , , , , , , , , , , , , , , , , ,

Powershell – Recording of ‘The Case for PowerShell: Why To Learn-PowerShell So You Needn’t Leave-Industry’

Last week Mark Minasi presented a webinar made possible by called:
“The Case for PowerShell: Why To Learn-PowerShell So You Needn’t Leave-Industry”.
The recording can be found here.

In this webinar he explains why ICT administrators need to be(come) familiar with PowerShell. He also explains the basic principles of PowerShell to help lower the threshold for people that have been shying away from command line interfaces (CLI) and scripting in the past. He does this by explaining how PowerShell is different from by example the CLI and Visual Basic Scripting (VBS).

I share his opinion about the necessity to learn PowerShell and therefore I hope I can help spread the message.

You can keep track of Mark Minasi by following him at Twitter: (@mminasi).

Leave a comment

Posted by on September 11, 2013 in Uncategorized


Tags: , , , , , , , , , , , , , , , ,


Get every new post delivered to your Inbox.

Join 1,666 other followers

%d bloggers like this: