Archive for February, 2018

How to move Mailbox to Exchange online:


About Office 365 message encryption:

New Office 365 Message Encryption capabilities built on top of Azure Information Protection, your organization can use protected email communication with people inside and outside your organization. The new OME capabilities work with other Office 365 organizations,, Gmail, and other email services

OME How to:



Microsoft .net Framework is a software package that is used by many applications, it runs in a software environment as opposed to hardware environment.

Free program called .NET Version Detector ( download here ).

PowerShell: how to get version of .net framework on a remote computer:

To query the local Registry using PowerShell, execute the below command in an elevated PowerShell session.

(Get-ItemProperty ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full’  -Name Release).Release

You can then use the table below to reference the installed version of .NET. For instance, if the returned value is 379893, then .NET 4.5.2 is installed.

Those laptops must run the latest Windows 10 OS with all the new security features and security best practices like:

  • Apply a Hardening Security Baseline from Microsoft Security Compliance Manager (SCM) or Security Compliance Toolkit
  • Enable Secure Boot with UEFI
  • Impose Software Restrictions using AppLocker
  • Enable Full Disk Encryption.
  • Impose Restrictions on USB ports.
  • Implement Network Isolation via host firewall
  • Install and configure the Device Guard, Windows defender ATP or equivalent + Crowdstrike or equivalent
  • Don’t allow Internet access from a browser.
  • Install Minimal Software.
  • Allow Minimal Administrative Accounts (gad-xxxx accounts in our case)
  • Implement a Hardened OU for the PAWs into the GAD of MUCMSPDOM

Best practices for big companies:

  • It is recommended to deploy Office pro plus in 32bit mode
  • deploy using SCCM or equivalent deployment software in .msi mode or click-to-run
  • patch management using SCCM
  • set GPO settings for Office suite


Here a link to explain the different channel:


And the link for the history of the version (with the detail of build number):


How to control office pro plus activations:

Deployment guide:


Office deployment toolkit:



To get the information about Office 365 Pro Plus products on a computer, we can use ospp.vbs script:

1)Determine whether the 32-bit or 64-bit version of Office 365 ProPlus is installed. To do this, open an Office 365 ProPlus application, such as Word, and choose File > Account > About {name of app}. 64-bit or 32-bit is displayed next to the application version.

2)Determine whether the computer has the 32-bit or 64-bit version of Windows installed. To do this, press the Windows logo key+E, then choose System properties or Computer > System properties. Under System, the System type property will indicate either a 32-bit or 64-bit operating system.

3)Open a command prompt and type one of the following commands, depending on your versions of Windows and Office:

  • If the 32-bit version of Office 365 ProPlus is installed on the 32-bit version of Windows:cscript.exe "%ProgramFiles%\Microsoft Office\Office15\"ospp.vbs /dstatus
  • If the 32-bit version of Office 365 ProPlus is installed on the 64-bit version of Windows:cscript.exe "%ProgramFiles(x86)%\Microsoft Office\Office15\"ospp.vbs /dstatus
  • If the 64-bit version of Office 365 ProPlus is installed on the 64-bit version of Windows:cscript.exe "%ProgramFiles%\Microsoft Office\Office15\"ospp.vbs /dstatus

4)Review the LICENSE STATUS. The following table describes what each status means.

License status Description
OOB_GRACE Office 365 ProPlus was recently installed and is fully functional, but hasn’t been activated yet. The user is prompted to enter user ID credentials to activate Office 365 ProPlus.
LICENSED Office 365 ProPlus is fully functional and activated.
EXTENDED_GRACE Office 365 ProPlus is fully functional but at risk of going into reduced functionality mode. This status lasts for 30 days and indicates that the product key wasn’t successfully re-activated. In most cases, this means the computer hasn’t connected to the Internet for some time and Office 365 hasn’t had an opportunity to validate the license.
NOTIFICATIONS Office 365 ProPlus is in reduced functionality mode, and displays messages that the user needs to reactivate.


Reference articles:


Scripting and automation:



The tenant must be configured to redirect MFA to MFAonprem through ADFS: ADFS infrastructure has been configured to support MFA onprem with special connector running on each internal ADFS server

MFA servers onprem configured to import internal domain users. No conditional policies possible with MFA onprem servers.



  • Azure MFA will works only for accounts created on the tenants (aad-xxx, guests)
  • Azure AD conditional access policies will not work with MFA onprem – only with Azure MFA
  • Accounts on Azure AD must be MFA enabled (with the phonefactor portal or via PS script or AAD identity protection policy). MFA setup:
  • Applications supported:

Granular policies possible per application

Azure AD federated applications / office 365 apps…

Not possible to use Cisco VPN or onprem applications => because account must be declared on MFA onprem server database.


MFA onPrem:

  • Synchronized users will use only MFA onprem
  • Synchronized accounts on Azure AD must be MFA enabled (with the phonefactor portal or via PS script or AAD identity protection policy) , else by default users are not MFA enabled
  • Conditional access to Office 365 is only possible at the ADFS level (Access rule for the whole O365 RP trust)
    • and for all AzureAD/Office 355 apps (no granularity per application compared to AzureMFA)
  • Other use case supported:

Cisco VPN (using Radius)




Users must be MFA enabled to support AzureMFA OR MFAonprem:

To automate:

  1. By PowerShell script
  2. By using Azure AD identity protection and policies


Unchecked the box Azure MFA to keep only MFA onprem as main MFA authentication method


ADFS conditional access for the RP office365:

We must create a single policy – valid for the Office 365 RP trust and thus – valid for all Azure AD and Office 365 apps (ALL or nothing – no granularity here).



Office 365 groups:


Manage Office 365 groups with PowerShell:

Allow/Block guest access to Office 365 groups:

Office 365 groups naming policies: (I know how to use PowerShell to apply naming convention for new and current groups and blacklisting words in group names!)

How to restrict who can create Office 365 groups:

How to restore a deleted Office 365 groups:

Archive or restore a team?

Connect to AzureAD:

Check installed module:
Get-InstalledModule -Name “AzureAD*”
To uninstall a previous version of AzureADPreview or AzureAD, run this command:
Uninstall-Module AzureADPreview
Uninstall-Module AzureAD

To install the latest version of AzureADPreview, run this command:   Install-Module AzureADPreview -force

At the message about an untrusted repository, type Y. It will take a minute or so for the new module to install.

Then Connect-azureAD

Office 365 groups governance guidance:

I am in favour of the self-service of the end users. This kind of freedom helps to improve the collaboration and the adoption. But It’s true that a bad use of this self-sevice, can be a nightmare in terms of governance. Here some ideas or highlights to balance the user needs and IT management :

Questions to be addressed before the real production phase:

  • Do we want to continue to allow ALL users to create groups ! or do we want to only allow some users?
    • By default all users can create such office 365 groups ! (contrarily to a normal active directory)
    • In one side it is good for end-user (more flexibility and autonomy) => self-service
    • But in other side, it can be a mess for IT !
  • Do we need a naming convention? (but limited to only one naming convention: ie. OG_, O365_ , <prefix>_<attribute>_<free text> …)
  • Do we need to blacklist words? (which ones? Who decide? …)

Other subject:

  • Need to change the expiration policy ? ( Retention period is 30 days after deletion)
  • To restore Office 365 groups is only via PowerShell or with Exchange admin center
  • Need an end-user procedure to request new group
  • Need an end-user procedure to request group restore



PowerShell connection to exchange online:

Office 365 group => management using PowerShell => not part of AzureAD or MSOnline module => only available online ! But need Basic authentication on the client:

PS C:\WINDOWS\system32> Set-ExecutionPolicy -scope currentUser RemoteSigned

PS C:\WINDOWS\system32> $UserCredential = Get-Credential     <== do not use an account with Azure MFA enabled

Note: if you are using Azure MFA to connect to Exchange online, follow this article:

PS C:\WINDOWS\system32> $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $UserCredential -Authentication Basic -AllowRedirection

In case of problem due to Message: “The WinRM client cannot process the request. Basic authentication is currently disabled in the client configuration”

PS E:\–DEV WORK–> winrm get winrm/config/client
NetworkDelayms = 5000
URLPrefix = wsman
AllowUnencrypted = false [Source=”GPO”]
Basic = false [Source=”GPO”]
Digest = false [Source=”GPO”]
Kerberos = true [Source=”GPO”]
Negotiate = true [Source=”GPO”]
Certificate = true
CredSSP = true [Source=”GPO”]
HTTP = 5985
HTTPS = 5986


Import-PSSession $Session

ModuleType Version    Name                                ExportedCommands
———- ——-    —-                                —————-
Script     1.0        tmp_0gtrs5dm.juw                    {Add-AvailabilityAddressSpace, Add-DistributionGroupMember, Add-MailboxFolderPermission, Add-MailboxLocation…}

PS C:\WINDOWS\system32> Get-Mailbox | Get-MailboxStatistics


For Office 365 groups:


PS C:\WINDOWS\system32> get-unifiedgroup “All Guest users”

After your work, dont forget to stop the remote session:

Remove-PSSession $Session

 External access for Office 365 applications: