O365 – Tips & Tricks in Powershell

Hello,

For those who are starting to work on O365 using powershell, here below are some short lines to help you.

Prerequisites :

https://technet.microsoft.com/en-us/library/dn975125.aspx

Connect to O365 :

Add a licence to a user :

 

 

Read more

Defending Against PowerShell Attacks

Read more

O365 – Check Sync batch


When you are doing a migration from Exchange to O365, there are two ways :

  • Direct Migration
  • Two step migration (provisioning then migrating)

If you choose the second way, you’ll have to check if all mailboxes are synced and not failed.

Read more

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 !

Read more

Group-Object is magic !

I had to create a script that sort a whole csv, each line is an extract of a computer scan, one extract per day, and get only the last extract per computer AND per user.

Indeed, a user can use multiple computers, and several users can use the same computer, the extract result is not the same !

Read more

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 :

 

Read more

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.

Read more

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.

 

 

Read more

Get all pst files set up in Outlook ?

Then you just have to call that function such as :

$pstfiles=GetPstFromProfil

Read more

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 !






Read more