Open a file with its default application

roualin facebook Open a file with its default applicationroualin google Open a file with its default applicationroualin twitter Open a file with its default applicationroualin linkedin Open a file with its default application

Hey there !

A little tip I’ve just found, really usefull.

If you need to open a file through Powershell with the default application set up in Windows parameter, just use “Start-process” and the full path of your file

In this short example, this command will launch Excel and your file !

How to wish a birthday using Powershell

roualin facebook How to wish a birthday using Powershellroualin google How to wish a birthday using Powershellroualin twitter How to wish a birthday using Powershellroualin linkedin How to wish a birthday using Powershell

It’s easy to surprise someone, setting sound to mute=off and sound at 100% using that code :

 

Remote Check Memory Usage

roualin facebook Remote Check Memory Usageroualin google Remote Check Memory Usageroualin twitter Remote Check Memory Usageroualin linkedin Remote Check Memory Usage

When you have to do a lot of stuff on remote servers, the best you have, you MUST do is to check is the Ram usage is not too high.

Here is a little function that can help

On some powershell version (V3.0…) if the returned value is below 10, an error could happen if you try to compare that returned value with a number.

Sort files by extension with total size

roualin facebook Sort files by extension with total sizeroualin google Sort files by extension with total sizeroualin twitter Sort files by extension with total sizeroualin linkedin Sort files by extension with total size

For several reasons, it could be awesome to sort a folder and sub by extension, with the associated size for each.

 

 

Get all pst files set up in Outlook ?

roualin facebook Get all pst files set up in Outlook ?roualin google Get all pst files set up in Outlook ?roualin twitter Get all pst files set up in Outlook ?roualin linkedin Get all pst files set up in Outlook ?

Then you just have to call that function such as :

$pstfiles=GetPstFromProfil

LAN Speedtest in Powershell

roualin facebook LAN Speedtest in Powershellroualin google LAN Speedtest in Powershellroualin twitter LAN Speedtest in Powershellroualin linkedin LAN Speedtest in Powershell

Sometimes it may be usefull to monitor the network speed on your LAN/WAN network. This little script needs to acces to the c$ admin share to work.
 
That works as the famous Speedtest.net website, uploading and then downloading a simple file, calculating then the average speed.

 

Enjoy !

Massive AD Group Creation using Powershell

roualin facebook Massive AD Group Creation using Powershellroualin google Massive AD Group Creation using Powershellroualin twitter Massive AD Group Creation using Powershellroualin linkedin Massive AD Group Creation using Powershell

A quick Powershell script, easy to use, to create a lot of groups from a csv file

 

The import csv file is like :

GroupName;DESTINATION;DESCRIPTION

Vérification des certificats arrivant à expiration

roualin facebook Vérification des certificats arrivant à expirationroualin google Vérification des certificats arrivant à expirationroualin twitter Vérification des certificats arrivant à expirationroualin linkedin Vérification des certificats arrivant à expiration

Une  mauvaise surprise est un jour arrivé, un certificat de la PKI venait d’expirer, paralysant pas mal de choses.

Voici une fonction permettant de lister les certificats arrivant à expiration dans X jours.

L’appel de la fonction se fait comme dans l’exemple ci-après :

Un peu de scripting en plus, une petite tâche plannifiée, et nous voilà avec un système de surveillance des certificats arrivant à expiration.