Sylver SCHORGEN Blog's

Articles, astuces et news sur les technologies Microsoft et plus particulièrement tournant autour de Powershell
    • 15/2/2020

    [TEAMS ON LINUX] How to install Microsoft Teams on Ubuntu Desktop 19.10


    Hello everyone,

    Here is a how to article on how to install Microsoft Teams on Ubuntu Desktop 19.10.
    First, go to https://products.office.com/en-us/microsoft-teams/group-chat-software and click on the Download App link.

    On the next page, click on the link Linux DEB (64bit).

    On the next pop-up, select Open with software installer (default) and click on the button OK.

    Finally, the application installer manager window open. Click on the Install button in order to install Microsoft Teams tyour password will be asked).

    You can now log in Microsoft Teams and use it :)

    • 15/2/2020

    [TEAMS ON LINUX] Comment installer Microsoft Teams sur Ubuntu Desktop 19.10

    Bonjour tout le monde,

    Voici un article "How To" sur comment installer Microsoft Teams sur Ubuntu Desktop 19.10.

    Premièrement, Dirigez-vous vers https://products.office.com/en-us/microsoft-teams/group-chat-software et cliquez sur le lien Download App.

    Sur la page suivante, cliquez sur le lien Linux DEB (64bit).

    Une fenêtre s'ouvre, cliquez sur Open with software installer (default) puis sur le bouton OK.

    Enfin, L'interface graphique du gestionnaire d'application s'ouvre. Cliquez sur le bouton Install afin d'installer Microsoft Teams (votre mot de passe vous sera demandé).

    Vous pouvez maintenant vous authentifier et utiliser Teams :)

    • 15/2/2020

    [POWERSHELL ON LINUX] Comment installer PowerShell Core 6.2.4 sur Ubuntu Desktop 19.10

    Bonjour tout le monde,

    Un post simple et rapide aujourd'hui pour l'installation de PowerShell Core 6.2.4 sur Ubuntu Desktop 19.10.

    Vous avez besoin de lancer votre terminal et entrer la commande suivante :

    sudo snap install powershell --classic
    You'll be ask to enter your password

    Une fois installé, il ne vous reste plus qu'à entrer la commande pwsh pour utiliser PowerShell Core sur Linux :)

    • 15/2/2020

    [POWERSHELL ON LINUX] How to install PowerShell Core 6.2.4 on Ubuntu Desktop 19.10

    Hello everyone,

    Today, a simple post on how to install PowerShell Core 6.2.4 on Ubuntu Desktop 19.10.

    You need to launch your terminal and enter 1 simple command :

    sudo snap install powershell --classic

    You'll be ask to enter your password

    Once installed, you can use PowerShell Core by entering pswh

    That's it for today :)

    • 4/11/2019

    [POWERSHELL] DSC Resource Kit Release October 2019

    Microsoft released the October update of the DSC Resource Kit. 9 modules have been updated :

    • ActiveDirectoryDsc 4.2.0.0
    • ComputerManagementDsc 7.1.0.0
    • SharePointDsc 3.7.0.0
    • StorageDsc 4.9.0.0
    • xDnsServer .16.0.0
    • xDscResourceDesigner .13.0.0
    • xExchange .30.0.0
    • xHyper-V .17.0.0
    • xWebAdministration 3.0.0.0



    For more details => https://devblogs.microsoft.com/powershell/dsc-resource-kit-release-october-2019/

    • 21/9/2019

    [POWERSHELL] DSC Resource Kit Release September 2019

    Microsoft released the September update of the DSC Resource Kit. 15 modules have been updated :

    • ActiveDirectoryCSDsc 4.1.0.0
    • ActiveDirectoryDsc 4.1.0.0
    • ComputerManagementDsc 7.0.0.0
    • DFSDsc 4.4.0.0
    • NetworkingDsc 7.4.0.0
    • SecurityPolicyDsc 2.10.0.0
    • SqlServerDsc 13.2.0.0
    • xDnsServer 1.15.0.0
    • xExchange 1.29.0.0
    • xFailOverCluster 1.13.0.0
    • xPSDesiredStateConfiguration 8.10.0.0
    • xRemoteDesktopSessionHost 1.9.0.0
    • xSCSMA 2.1.0.0
    • xWebAdministration 2.8.0.0



    For more details => https://devblogs.microsoft.com/powershell/dsc-resource-kit-release-september-2019/

    • 10/8/2019

    [POWERSHELL] DSC Resource Kit Release July 2019

    Microsoft released the July update of the DSC Resource Kit. 11 modules have been updated :

    • ActiveDirectoryDsc
    • ActiveDirectoryCSDsc
    • ComputerManagementDsc
    • SecurityPolicyDsc
    • SharePointDsc
    • SqlServerDsc
    • StorageDsc
    • xDnsServer
    • xExchange
    • xPSDesiredStateConfiguration
    • xWebAdministration



    For more details => https://devblogs.microsoft.com/powershell/dsc-resource-kit-release-july-2019/

    • 28/6/2019

    [POWERSHELL] DSC Resource Kit Release June 2019

    Microsoft released the June update of the DSC Resource Kit. 8 modules have been updated :

    • CertificateDsc
    • NetworkingDsc
    • PSDscResources
    • SharePointDsc
    • SqlServerDsc
    • xActiveDirectory
    • xDnsServer
    • xPSDesiredStateConfiguration



    For more details => https://devblogs.microsoft.com/powershell/dsc-resource-kit-release-june-2019/

    • 2/6/2019

    [POWERSHELL - EXCHANGE ONLINE] WINMAIL.DAT attachments from Exchange Online emails

    Hello everyone,

    I'm starting a Lotus Domino to Exchange Online migration project that will last 4 weeks. So during the project I have some users on Lotus Domino and some users on Exchange Online.

    One of the first problem you will encounter is that the users on Lotus Domino receiving emails with attachments from the Exchange Online users will see the attachments as "WINMAIL.DAT".

    To avoid this, first, connect to Exchange Online :

    $LiveCred = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $LiveCred -Authentication Basic -AllowRedirection
    Import-PSSession $Session

    Once connected, I entered this command :

    Set-RemoteDomain Default -TNEFEnabled $false

    • 26/5/2019

    [POWERSHELL - EXCHANGE ONLINE] Set Default Email Format to HTML

    Hello Everyone,

    If you need to force the default email format to HTML for all your mailboxes, you can do so with one line of PowerShell.

    To do that, you first need to connect to Exchange Online :

    $LiveCred = Get-Credential
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $LiveCred -Authentication Basic -AllowRedirection
    Import-PSSession $Session

    Once you are connected, you can force the default format to HTML for every mailboxes with this command :

    Get-Mailbox | Set-MailboxMessageConfiguration -DefaultFormat Html
    • 18/3/2019

    My first MVP Summit @ Microsoft

    Hello guys,

    Woooow, this is awesome ! I am currently at my first MVP Summit at Microsoft, Redmond ! This is a really cool week with a lot of technical discussions and sessions !

    For those who don't know what MVP Summit is : "MVP Summit is hosted at Microsoft headquarters in Redmond, USA.The MVP Summit will feature a large catalog of in-depth technical discussions and feedback sessions combined with networking opportunities with other MVPs and the Microsoft product groups !" - from the official MVP Summit website (https://mvp.microsoft.com/summit) 

    For my first year at the summit, I went there with Julien CHABLE (the other Microsoft MVP of New Caledonia). To get to Seattle, we needed to take 3 planes :

    • 1st from Noumea (New Caledonia) to Brisbane (Australia) => 2 hours flight
    • 2nd from Brisbane (Australia) to Los Angeles (USA) => 12.5 hours flight
    • 3rd from Los Angeles (USA) to Seattle (USA) => 3 hours flight

    After this (very) long flight, we finally arrived at our hotel. After a good night of sleep, we started this awesome week ! It is Tuesday as I write these lines, so we still have 3 incredible days

    • 24/2/2019

    [POWERSHELL] DSC Resource Kit Release February 2019

    Microsoft released the February update of the DSC Resource Kit. 14 modules have been updated :

    • ActiveDirectoryCSDsc
    • CertificateDsc
    • ComputerManagementDsc
    • DFSDsc
    • NetworkingDsc
    • PSDscResources
    • SharePointDsc
    • SqlServerDsc
    • StorageDsc
    • xActiveDirectory
    • xExchange
    • xHyper-V
    • xPSDesiredStateConfiguration
    • xWebAdministration



    For more details => https://devblogs.microsoft.com/powershell/dsc-resource-kit-release-february-2019/ 

    • 14/2/2019

    [POWERSHELL TIPS] How to create an Exchange Online Distribution Group

    Hello,

    Here is a little PowerShell tip on how to create an Exchange Online Distribution Group with PowerShell. The cmdlet I will use is New-DistributionGroup with the following parameters : 

    • Name : Unique value used for the name of the group. The maximum length is 64 characters. This value will be used as well if you don't use the DisplayName parameter
    • Alias : Parameter used to specify the Exchange alias for the recipient. If you create a distribution group without specifying the primary email address, the alias will be used (<alias> @ <domain>). If you don't specify this parameter, the value of the Name parameter will be used (without the spaces and unsupported characters)
    • ManagedBy : Parameter used to specify the group owner. If you don't specify a user account here, the user account creating the group (via PowerShell) will be used
    • MemberDepartRestriction : Parameter used to specify the restrictions on users requests to leave the distribution group. There are 2 values possible :
      • Open : The members can leave the distribution group when they want to without any approval
      • Closed : The members can't remove themselves from the distribution group and the requests are automatically rejected. The membership is managed by the group owner(s)
    • MemberJoinRestriction : Parameter used to specify the restriction on users requests to join the distribution group. There are 3 values possible :
      • OpenThe members can add themselves to the distribution group when they want to without any approval
      • ClosedThe members can't add themselves to the distribution group and the requests are automatically rejected. The membership is managed by the group owner(s)
      • ApprovalRequiredThe members can request to join the distribution group. The request is submitted for approval to the group owner(s). The user will only be in the distribution group after approval
    • Members : Parameter used to specify the recipients that are members of the distribution group. You must use a value that uniquely identifies the recipient like the Name, DisplayName, Alias, DN, Canonical DN, Email address or GUID. If you wan to specify multiple members, separate them with a coma (user1, user2, user3)
    • PrimarySMTPAddress : Parameter used to specify the primary email address of your distribution group
    • RequireSenderAuthenticationEnabled : Parameter used to specify if you want to accept only messages from your organization (internal) or from anyone (internal and external).

    The PowerShell syntax I use to create a distribution group with MemberDepartRestriction set to ClosedMemberJoinRestriction set to Closed and RequireSenderAuthenticationEnabled set to $false

    New-DistributionGroup -Name "Demo Sylver" -Alias "DemoSylver" -ManagedBy "Sylver" -MemberDepartRestriction "Closed" -MemberJoinRestriction "Closed" -Members "John","Paul" -PrimarySmtpAddress "demosylver@mydomain.com" -RequireSenderAuthenticationEnabled $false

     
    • 15/1/2019

    [POWERSHELL] Modify your Office 365 Groups language and configuration

    Hello everyone,

    I recently needed to convert every Public Group of an Office 365 tenant to the french language and to automatically Subscribe new members and Let people outside the organization send email to the group.

    There were approximately 100 groups so I didn't want to do it manually ;) (even if there had been 1 group, I would have done it with PowerShell).

    Here is the line I used to configure those 100 groups with these parameters : 

    Get-UnifiedGroup | Where-Object {$_.AccessType -eq 'Public'} | Set-UnifiedGroup -Language "fr-FR" -AutoSubscribeNewMembers -RequireSenderAuthenticationEnabled $false

    And yes, it works on PowerShell and PowerShell Core -> So on Windows, Linux and Mac OS :D

    • 12/1/2019

    [POWERSHELL] DSC Resource Kit Release January 2019

    Hi everyone,

    Microsoft released the January update of the DSC Resource Kit. 14 modules have been updated :

    • ActiveDirectoryCSDsc
    • AuditPolicyDsc
    • CertificateDsc
    • ComputerManagementDsc
    • NetworkingDsc
    • SecurityPolicyDsc
    • SqlServerDsc
    • StorageDsc
    • xActiveDirectory
    • xBitlocker
    • xExchange
    • xFailOverCluster
    • xHyper-V
    • xWebAdministration



    For more details => https://devblogs.microsoft.com/powershell/dsc-resource-kit-release-january-2019/ 

    • 3/12/2018

    [POWERSHELL] DSC Resource Kit Release November 2018

    Hi everyone,

    Microsoft released the November update of the DSC Resource Kit. 9 modules have been updated :

    • AuditPolicyDsc
    • DFSDsc
    • NetworkingDsc
    • SecurityPolicyDsc
    • SharePointDsc
    • StorageDsc
    • xBitlocker
    • xExchange
    • xHyper-V



    For more details => https://devblogs.microsoft.com/powershell/dsc-resource-kit-release-november-2018/ 

    • 22/10/2018

    [POWERSHELL] Configure Exchange Online email forwarding

    Hi everyone,

    I've created a PowerShell script to add an email forwarding rule on a mailbox for Exchange Online. What this script does is :

    • Connect to Exchange Online : You will be prompt for an admin credentials
    • Verifying that the source email address does not already have a forwarding rule
    • If your source email address does not have a forwarding rule, the script creates the one your want to configure
    • By default, the script keeps a copy of every email in the source mailbox and forward the email. If you don't want to keep a copy in the source mailbox, you can add the parameter -KeepACopyAndForward with the value $false

    I've added some verbose log in order to know what the script is doing :)

    How to use the script :

    .\New-O365EmailForwardingRule.ps1 -sourceEmailAddress "john.doe@mail.com" -DestinationEmailAddress "jean.dupont@mail.com"
    .\New-O365EmailForwardingRule.ps1 -sourceEmailAddress "john.doe@mail.com" -DestinationEmailAddress "jean.dupont@mail.com"
    -KeepACopyAndForward $false

    The Link of my script : https://github.com/sschorgen/PowerShell/blob/master/O365_New-O365EmailForwardingRule/New-O365EmailForwardingRule.ps1 

    • 22/9/2018

    [POWERSHELL] Add a Mail Contact in Exchange Online

    Hi everyone,

    I've created a PowerShell script to add a Mail Contact in an Exchange Online. What this script does is :

    • Connect to Exchange Online : You will be prompt for an admin credentials
    • Verifying that the contact does not already exist
    • If your contact does not exist, the script creates it
    • If you added the parameter to hide your contact from the GAL, the script hides it

    I've added some verbose log in order to know what the script is doing :)

    How to use the script :

    .\New-O365MailContact.ps1 -ContactEmailAddress "john.doe@mail.com" -UserFullName "John DOE"
    .\New-O365MailContact.ps1 -ContactEmailAddress "john.doe@mail.com" -UserFullName "John DOE"
    -HideFromGAL $True

    The Link of my script : https://github.com/sschorgen/PowerShell/blob/master/O365_New-O365MailContact/New-O365MailContact.ps1

    • 8/9/2018

    [POWERSHELL] DSC Resource Kit Release September 2018

    Hi everyone,

    Microsoft released the September update of the DSC Resource Kit. 11 modules have been updated :

    • CertificateDsc
    • NetworkingDsc
    • SecurityPolicyDsc
    • SharePointDsc
    • SqlServerDsc
    • StorageDsc
    • xActiveDirectory
    • xDatabase
    • xExchange
    • xRemoteDesktopSessionHost
    • xWebAdministration


    For more details => https://devblogs.microsoft.com/powershell/dsc-resource-kit-release-september-2018/ 

    • 31/8/2018

    [POWERSHELL] Add a user to a distribution group

    Hello everybody,

    I created a script to add a user in an Exchange Online distribution group. What this script does is :

    • Connect to Exchange Online : You will be prompt for an admin credentials
    • Verifying that your user is not in the distribution group
    • If your user is not in the DG, he or she will be added to the DG

    I've added some verbose log in order to know what the script is doing :)

    How to use the script :

    Add-UserToO365DistributionGroup.ps1 -DistributionGoupName "Marketing Team" -Member "john.doe@mail.com"

    The Link of my script : https://github.com/sschorgen/PowerShell/blob/master/O365_Add-UserToO365DistributionGoup/Add-UserToO365DistributionGoup.ps1

    • 3/8/2018

    [POWERSHELL] DSC Resource Kit Release July 2018

    Hi everyone,

    Microsoft released the July update of the DSC Resource Kit. 12 modules have been updated :

    • ComputerManagementDsc
    • SecurityPolicyDsc
    • SharePointDsc
    • SqlServerDsc
    • xActiveDirectory
    • xDhcpServer
    • xDscResourceDesigner
    • xExchange
    • xPowerShellExecutionPolicy (now deprecated since now in ComputerManagementDsc)
    • xPSDesiredStateConfiguration
    • xRemoteDesktopSessionHost
    • xWebAdministration



    For more details => https://blogs.msdn.microsoft.com/powershell/2018/07/25/dsc-resource-kit-release-july-2018/

    • 2/8/2018

    [POWERSHELL] Let's automate my computer configuration :)

    Hello,

    In my obsession about automation, I never took the time to automate my own laptop reconfiguration (yeah I know, poor me ...). I have my up to date Windows 10 image with my drivers, but that's all. I never automated my software reinstallation or my Windows 10 configuration as I like it :)

    So the last couple of days, I've decided to do so :)

    You'll find in my GitHub repo a script doing these steps :

    1. Check if chocolatey is installed, if not, install it
    2. Install some softwares
      • Foxit Reader
      • Flash Player
      • Google Chrome
      • Firefox
      • VLC
      • Silverlight
      • Handbrake
      • Sonos Controller
      • iTunes
      • qBittorent
      • Git
      • GitHub
      • Visual Studio Code
      • Kitty
      • Remote Desktop Manager
      • FileZilla
      • Teamviewer
      • Keepass
      • Winscp
      • WinMerge
      • 7zip
      • Lightshot
      • Evernote
      • Dropbox
      • Microsoft Office 365 Pro Plus
      • Microsoft Teams
      • Slack
      • Rufus
      • Grisbi
      • Toggl
      • Listary
      • JRE 8
      • NuGet
      • AzureAD PowerShell module
      • MSOnline PowerShell module
      • SharePoint PnP for SharePoint Online module
    3. Configuring Windows as I want it to be configured
      • Install Hyper-V
      • Disable Windows 10 hibernation
      • Unpin start menu tiles
      • Remove Windows 10 Fax
      • Uninstall Windows XPS printer
      • Uninstall Microsoft Windows 10 preinstalled softwares
      • Show "This PC" desktop shortcut
      • Show hidden files in Windows explorer
      • Show well known extension in Windows explorer
      • Hide search taskbar
      • Configure Windows explorer to open at "This PC" location
      • Configure Control Panel view to "Categories"
      • Hide frequently and recently used item from Windows explorer

    For the configuration functions, I used some functions developped by Ali Robertson in its script reclaimWindows10.ps1

    You'll find my script on my GitHub repository : Direct Link to the script

    • 31/7/2018

    [SHAREPOINT 2013 - SP DESIGNER] Error were found when compiling the workflow. The workflow files were saved but cannot be run

    Hello everyone,

    Yesterday I was helping a customer on the creation of a particular workflow and when we published it we had this error : Error were found when compiling the workflow. The workflow files were saved but cannot be run.

    The detailed message on SharePoint ULS was :

    Microsoft.Workflow.Client.WorkflowCommunicationException: The request was aborted: The request was canceled. Client ActivityId : 7a290e9c-0917-7088-afc4-e65fd25c5c0b. ---> System.Net.WebException: The request was aborted: The request was canceled. ---> System.ServiceModel.ServiceActivationException: The requested service, 'net.pipe://localhost/SecurityTokenServiceApplication/appsts.svc' could not be activated. See the server's diagnostic trace logs for more information

    After searching on the web and trying some well documented solutions, I finally found what was the cause of our issue. The service Net.Pipe Listener Adapter wasn't started on the SharePoint web server. After I started it, I was able to publish the workflow.

    • 25/7/2018

    [SHAREPOINT] SharePoint 2019 Public Preview is now Generally Available

    Hello everyone,

    You have to clear your schedule for this week-end, SharePoint 2019 Public Preview is GA ! This mean we have to install it, test it and be prepare for future implementations.

    There a lot of new features including :

    • Modern User Experiences
    • Modern Team Sites
    • Modern Lists
    • Modern Site Pages
    • Communication Sites
    • PowerApps and Flow integration (I loooove this one !!!)
    • SMTP Server authentication
    • SharePoint Hybrid made easy
    • Etc ...

    You can download this new version of SharePoint right here : https://www.microsoft.com/en-us/download/details.aspx?id=57169

    Some guides provided by Microsoft :

    For more details (the original article by Microsoft) : https://blogs.technet.microsoft.com/christianheim/2018/07/24/sharepoint-2019-public-preview-generally-available/

    • 2/5/2018

    [POWERSHELL] DSC Resource Kit Release May 2018

    Hi everyone,

    Microsoft just released an update of the DSC Resource Kit. 12 modules have been updated :

        ActiveDirectoryCSDsc (previously xAdcsDeployment)
        CertificateDsc (previously xCertificate)
        ComputerManagementDsc (previously xComputerManagement)
        DFSDsc (previously xDFS)
        SqlServerDsc
        xDnsServer
        xDscResourceDesigner
        xExchange
        xNetworking
        xPendingReboot
        xSMBShare
        xWebAdministration

    For more details => https://blogs.msdn.microsoft.com/powershell/2018/05/02/dsc-resource-kit-release-may-2018/