PowerShell GUI: Use the Mahapps Badged control


In this post, I will show you a nice control to use using PowerShell and Mahapps. We'll see how to manage and use it.
If you often read my posts, you may know that I'm a big fan of Mahapps. It's just, for me an awesome way to give some pretty cool design to GUI. 
Some weeks ago a colleague, Kevin Rahetilahy (aka Dev4sys), has shown me a new Mahapps control that I missed. 
I was what ? I like it, I have to test it and share how to use it.

What is this ?

This control can be compared to the Windows 10 notifications below:
See below what you do with this control.


Badge color

You can first apply the badge to a simple button.
You can apply the color you want to the badge control. In the below example I show some colors that can be pretty to use.
You can also apply a fix number to the badge or use it to display a warning.
In the below example, I created two buttons
System error: it shows the number of system error in the event log during the last day
Application error: it shows the number of application error in the event log during the last day
This control can be very useful to use to highlight some options, or missed parameters. 


Badge with icon

You can also apply, the badge control to a button displayed by an icon.
See below how it can looks like.

Badge location

The third tabitem in my example shows the different available locations on your button.


How to use it ?

Badge in XAML 

How to add a badge to a simple button ?

See below, the code used to display a badge on a simple button.

How to add a badge on a icon button ? 

See below, the code used to display a badge on an icon button

How to add a badge to a tabcontrol ?

See below, the code used to display a badge on a TabControl

How to modify the location of a badge ?

See below the attribute used to modify to the badge location.

How to modify the color of a badge ?

See below the attribute used to modify the badge color


Badge in PS1

See below the code used to modify the value of the badge.

See below the code used to modify the color of the badge



When to use it ?

This control can be very useful. My colleague Kevin used it, in his great tool driver manager,link here.
This tool allows you to see if there are some missing drivers on your computer, of there is an issue with some of them.
It's composed of 3 Tabs, and a badge indicates you directly the number of missing drivers, see below.


You can also imagine a button that will show you the number of event log error during a specific period. You can find an example in my post.

Previously, I shared a tool that allows you to monitor your MDT Deployment. This way you can see if there are deployments running on computers, completed deployment or also deployment failure. 
So, why not using this control to resume quickly number of each part ?

There are many possibilities to use with this control, just use your imagination.



How to get my sample ?


PowerShell module: PSTalk - Speak with PowerShell


In this post, I will share with you a PowerShell module I created that allows you to tell a text using the System voice.

How to get the module

The module PSTalk is available on the PowerShell Gallery and on GitHub.
Click on the links below to get the module.
Module on GitHub
Module on PowerShell Gallery


How to install it ?


From the PowerShell Gallery

Open the PowerShell prompt
Type the below commandline
The module PSTalk will be installed


From GitHub

Click on the download button
Extract content of the zip folder
Open the PowerShell prompt
Type the below commandline

How to use it ?

Type the below commandline to see the available cmdlets
Get-command -module PSTalk
See below, the available alias for the cmdlet
Available alias in the PSTalk module


Speak cmdlet

The Speak cmdlet allows you to tell a text using PowerShell.
See below how to use the cmdlet.
The cmdlet allows you to do the below things
- Choose the voice to speak
- Choose the voice volume
- Choose the voice rate
- Generate a script that will use your selected options

When you add the -voice switch, you will have to choose a voice. Those voices are depending of the installed voices on the computer.
Voices selection
When you add the -resume switch, a short resume will be displayed about your options you have selected 
Voice resume selection
You can also use a pipeline with the speak cmdlet as below

The module in action


The below example shows you how to use basically the speak cmdlet with Text only.

The below example shows you how to use the speak cmdlet with Text only from a pipeline

The below example shows you how to use the speak cmdlet by selecting the voice to speak.




PowerShell Fun: Talk with PowerShell tool


It's the summer time, so it's time for fun. In this post, I will show you a tool I created just for fun. 
This tool allows you to type a sentence and use PowerShell to tell this one using different option.

What does it take to become a Microsoft MVP ?


In this post, no matter to talk about PowerShell, GUI or MDT but  a will to share my point of view and experiences about the MVP Award.

Why this post ?

Internet is a wide world in which you can find almost whatever you want. 
You can easily upgrade your skills and learn new things, specifically in the IT domain.
That's why the knowledge sharing is important to me.
If I can help even just one person, that's so nice...
Last March I received a mail informing me I'm a Microsoft MVP... Waouh!!!
I was so happy and honored and still am.
I saw many questions about this award, 
- How to become one,
- How it works and 
- What is the process and so on...

In this post, I will try to answer all those questions.

What's an MVP ?

Firstly, an MVP is a community leader 
who likes to share his knowledge with others.
I think this is the main part to become MVP.
This knowledge sharing can be done in different ways: blogging, creating videos, speaking at conference, help others on forum ...
Secondly, an MVP is an expert in a specific domain who likes to transmit his passion with people in this domain. For instance, SCCM, PowerShell, Azure ...

Are MVP better than others ?
Of course, not. 
There are many excellent professionals that are not MVP's even if they deserved it, but I'm sure this day is coming soon for them. 
For instance I can mention Prateek Singh, Zeng Yinghua, Simon Dettling, Tzoyvaras Kostas, Daniel Ratliff, Dan Franciscus,  Jérôme Bezet-Torres and many others, sorry those I forgot.
I will say MVP's are not better than others but they are people with good ideas to share.
In my case, I'm not a PowerShell expert, my scripts aren't perfectly written, but I have a lot of ideas and PowerShell helps me to realize them.

The MVP award must not be the goal of the knowledge sharing it's more an accomplishment. 


Why to share ?
You can be the best in your domain but I will say that if you don't share your knowledge, it will die with you, what a waste !!! 
Remember the day that you were looking for a solution to resolve an issue since many hours. You started to be crazy until you find "out" the solution from someone. 
For me if you're working on something interesting for you, it will necessarily interest someone else.
I really like when someone tests my work, and gives me some feedback such as you should add this or this,  even if it doesn't work, you can learn from others and others can learn from you.

How to become MVP ?

This part can be a bit obscure for some people. I will explain my own case how I became MVP.
Four years ago, I started my blog, first I did some post in French but chose to proceed in English.
First I posted some articles.
While doing it I had more and more ideas to share, so I did more and more posts. My goal wasn't of course to share to become MVP, but I like to share.  

How many posts are required ?
I don't know how many posts are required but I know the MVP team analyzes your work over the past year. 
Concerning my posts, I used to post about one or two posts a month, sometimes more.
As I already told you, don't write posts for the purpose of becoming MVP, do it because you love it and are passionate with it 

How Microsoft can detect me ?
You are blogger or speaker and write for some months or years but nothing happened.
As far as I know, there are two ways to integrate the MVP awarding process.
First you can nominate yourself, using the following link.
You will have to add some information about you and your different contributions such as blog posts, videos, speaking ...

The second way is to be recommended by another MVP (Special thanks to Octavio Rodriguez). 
In this case, you will receive a mail that informs you, that you have been recommended from someone to become MVP.
You will have to click on the link included in the mail and add informations about you and your contributions.
Then the MVP lead of your country gets in touch with you. It can take a while, so do not lost hope.
MVP lead contacting you does not mean that you are MVP or you will become one. 
In fact, it means that your profile will be analyzed by the MVP award team.
See below an overview of my profile contributions to get an idea of the way to manage it.

What is this MVP award team ?
The MVP team is composed of some employees from Microsoft located in Redmond and also of some Community Program Managers spread out through different countries, see more about them in this link.

How this team will analyze my profile ?
They will analyze your work, read your posts, watch your videos ...
Then they will choose whether you deserve to become MVP or not.

When this team analyze profiles ?
Three months ago, Microsoft changed his MVP award process. 
Now there are new MVP on the first of each month.
So, if you were not awarded, on first of current month, do not lost hope and keep working, your profile will be analyzed subsequently and, if its deserves award, you'll get it on first of next month!

How do I know that I will become ?
There is no magic formula or trick that will certify you will be awarded. The best way is to keep going on sharing and wait...

How do I know that I am awarded ?
You will receive Microsoft mail informing you, you are now MVP! 
Now you can enjoy.


What are the MVP benefits ?


Common benefits
The MVP award allows you multiple benefits such as software licenses, Office 365 ... 3rd Party offers.
You will be also invited to technical meeting via Skype, and to in-person meetings with others MVP and Microsoft employees.
One of the benefits is the MVP Global Summit. 
It's a summit dedicated to all MVP's in the world and located in Seattle. 
For me it's a nice way to travel, to meet people for many countries, to learn a lot of thing and meet Microsoft employees. 
Becoming MVP doesn't mean that you will work for Microsoft, nor be paid for it.

What it personally takes ?
In my case, it's first a reward for the work I did and knowledge I shared. 
Then it also allows me to get more job offers, and more proposition from editors.

Someone told me that when you become MVP, you are now forced to post more and more and more in order to be renewed the next year. 
Humm I don't agree with this point of view. 
Indeed, I have now more ideas to share, or also some new project ideas but my first goal is still to share my ideas. 
I will say that it will give you some new perspectives. 
For instance, if you only write posts, the fact to have been rewarded for your work can give you the motivation to do more for others.

PowerShell tool: MDT Light Monitor

In this post I will show you a tool I created to monitor your Deployment Share.  You will be able to see running, completed and failed deployment. You will be also able to be notified when a deployment is completed or not by a GUI and by mail.