Category Archives: Automation

Syncing of OneDrive Shared Librabies automatically using Microsoft Endpoint Manager

First of all, we need to create Configuration Profile within Microsoft Endpoint Manager, you’ll need to gather the SharePoint document library ID or ID), for all the locations you would like to publish to your Windows 10 Devices. In this blog I am going to publish the Blogabout Cloud Library to all my devices.

A window will now appear, (if you receive any prompts to open OneDrive ignore it), click Copy library ID, keep this handy.

Creating the Configuration Profile

In order to apply the configuration to your Windows 10 devices that are enrolled into Microsoft Endpoint Manager. Launch Microsoft Endpoint Manager go to Devices –> Configuration Profiles –> Create Profile

Select Windows 10 and Administrative Templates

Press Next

Provide a Name for the profile and brief description as shown below

Under Computer Configuration and OneDrive, look for the setting Configure team site libraries to sync automatically

Click Enable
Enter the name you would like to be displayed and the Library ID as shown below

I am now going to recommend a number of other Microsoft OneDrive settings

SettingConfiguration
Silently sign in users to the OneDrive sync app with their Windows credentialsEnabled
Silently move Windows known folders to OneDriveEnabled
Use OneDrive Files On-DemandEnabled
Require user to confirm large delete operationsEnabled
Convert synced team site files to online-only filesEnabled

That completes the Configuration Profile setup, deploy this to your test users before deploying to production.

In my next post I am going to be looking leverage Proactive Remediation to decrease the synchronization time of assigned libraries to the Windows 10 device. The Microsoft default is 8 hours before the assigned libraries are published.

Regard
The Author – Blogabout.Cloud

Power Automate and Microsoft Teams Tips: Automated approach to creating new Microsoft Teams Channels

Over the coming weeks I am going to be doing Power Automate post to demostrate the ability to automate workloads within Microsoft 365. Today, I am going look at configuring an Approval process for the creation of a Microsoft Teams Channel

Configuring a SharePoint List

I am no expert when it comes to SharePoint but any expert in “Share Pint” as how does love a good drink now and then. So back on topic within your SharePoint Online Site you need to create a new list as shown in the image below.

This image has an empty alt attribute; its file name is image-34-1024x404.png

Give your SharePoint List a name and description for future reference.

As you can see from the below, I have create a number of columns to capture the information I would like to include into the approval process.

Column NameColumn Type
Title Title used for the Channel Name.
Team NameName of the Microsoft Team
DescriptionDescription of the new Channel
JustificationJustification for the request

Configuring Power Automate

Create a new Flow from the SharePoint List > Automate > Power Automate > See your Flows

Click New > Automated from blank. Provide a Flow name, i.e. “Request – New Microsoft Teams Channel Provisioning”,

Select your Site Address and List Name as shown below.

Modify the Start an approval in line with your requirements, for this post I have included the layout I have created for my own tenant.

We now need a Data Operation in order to gather the Teams ID which is required to identify the Teams where the channel will be created.

first(split(last(split(triggerBody()['webUrl'],'groupId=')),'&tenantId'))

Add connector List teams and no additional

Create Filter array which looks at the Teams List based on the Team Name against the entry in the SharePoint List.

Next step is to create a channel with uses the apply to each array.

We have now completed the flow, so let’s go and create the request. As shown below.

This will now generate a request to create the team channel automatically in the background and as you can see all the new Project Channels have been created.

Regards,
The Author – Blogabout.Cloud

Power Automate and Microsoft Teams Tips: Posting messages on Teams Channel when a RSS feed published

Over the coming weeks I am going to be doing Power Automate post to demostrate the ability to automate workloads within Microsoft 365. Today, I am going look demostrate how I take RSS feeds from Microsoft Blogs and distrube to Microsoft Teams / To-Do. If you have been following my blog for a while you will know I am a big avocate for bringing code important data from Microsoft into Microsoft Teams. As an Architect working within the Microsoft 365 stack, there is always developments, releases and updates coming from Microsoft.

So how do we handle all this information from multiple sources into Microsoft Teams.

So as you can see from below, I have a Microsoft Team called “Microsoft Blogs” in this Teams. I have seperate channels for the areas I am most interested in;

  • Teams
  • Endpoint Manager
  • etc..

I gather this data from https://techcommunity.microsoft.com/t5/custom/page/page-id/Blogs

For the purpose of this post I am going to be looking at the Microsoft Security and Compliance Blog. This is a blog that I follow today and generates the most noise. So I am going create a new channel called Microsoft Security and Compliance Blog within Microsoft Blogs Teams.

So first of, make sure you create the Channel where you wil be publishing this data. Next we need the RSS URL, so if you click on the RSS button it will open a new tab with the required URL in the address bar

https://techcommunity.microsoft.com/plugins/custom/microsoft/o365/custom-blog-rss?tid=-1974032735906843784&board=MicrosoftSecurityandCompliance&label=&messages=&size=10

Configure Power Automate

Create a new Automated Flow

Provide a new for the Flow and select When a feed item is published

Enter the URL for the RSS Feed

Specify the Team and Channel you would like to publish the message. In my message I am providing a link to the Article, the date is was published, the Title and Summary of the post. The reason for this is so that if I am on the move, I can synchronize the content of the blog post to Microsoft Teams or even Microsoft To-Do so I can continue to read on the move.

When there is a new blog post published you will receive a message into your defined channel, just like the below

Why not To-Do?

So as I mentioned, I also push the blog posts to Microsoft To-Do. The reason for this is so I can close the To-Do item once I have read the article so I never miss any important updates.

You dont even how to stop there if you dont want to. You can leverage what ever connector you want in Power Automate to publish the data.

Regards
The Author – Blogabout.Cloud

Power Automate and Microsoft Teams Tips: Approval request process for a new Microsoft Teams Team

Over the coming weeks I am going to be doing Power Automate post to demostrate the ability to automate workloads within Microsoft 365. Today, I am going look at configuring an Approval process for the creation of a Microsoft Teams Team

Configuring a SharePoint List

I am no expert when it comes to SharePoint but any expert in “Share Pint” as how does love a good drink now and then. So back on topic within your SharePoint Online Site you need to create a new list as shown in the image below.


Give your SharePoint List a name and description for future reference.

As you can see from the below, I have create a number of columns to capture the information I would like to include into the approval process.

Column NameColumn Type
TitleTitle used for the Team Name.
DescriptionSingle line of text used to store the project description.
VisibilityChoice with the following options: “Private” and “Public”. Indicates if a team should visible to non-team members.
OwnersPerson or Group with Allow multiple selections enabled.
MembersPerson or Group with Allow multiple selections enabled.
JustifcationMultiple line of text used

Configuring Power Automate

Create a new Flow from the SharePoint List > Automate > Power Automate > See your Flows

Click New > Automated from blank. Provide a Flow name, i.e. “Request – New Microsoft Teams Team Provisioning”,

Select the SharePoint “When an item is created” trigger and click “Create”.

Select your Site Address and List Name from the drop down lists

Create a Start and wait for an approval condition. I have populated the below with information that I required within my own tenant.

Select Apply to each condition and select responses

Select Responses Approver response is equal to Approve

This section is now a bit more complex as I have decided to include an email notification if the request was a approved or rejected. If you follow the screenshot below you will see that I am using the SharePoint List items to provide Team Name, Description, Visiability fields and leveraging the list to include information into the email notification. You dont need to add email notifications into your flow but this is how you would do it.

Now we need to apply each Owner and Member to the new Microsoft Teams and this is completed as followed.

We have now completed the flow, so lets go and create the request. As shown below.

This will now generate a request to the approvers email address and when they click approve the team will be created as shown below with all the Owners and Members you defined.

Regards,
The Author – Blogabout.Cloud

Bringing Power Automate and Office 365 Service Communications API v2 together to deliver Current Status into Microsoft Teams.

I have been recently looking how to provide the Current Status of the Microsoft 365 stack into an automated process so I could quickly identify any outages. The Office 365 Service Communications API v2 does exactly that and also allows additional options like Power Automate and PowerShell to pull the data. So in this particular article I am going to look at pushing the Current Status into Microsoft Teams so not just myself but anyone who is apart of the Teams is able to see the status.

Prerequisites

  • You have configured Azure AD App for Office 365 Service Communications API v2
  • Licensed for Power Automate either;
    • Per user plan
    • Per user plan with attended RPA
    • Per Flow plan

Configuring Power Automate to deliver posts into Microsoft Teams Channel.

You will now need to repeat the above process for client_secret and tenantid

After that, you need to create an HTTP action to query the Office 365 API. Populate the same as below, making sure all 3 variables are used.

Please be aware the HTTP Connector has an associated cost due to being a Premium Connector. This cost can be found at the following link

If you were to run the flow at this point it would return a big output of JSON. It’s best to use the Parse JSON action to make it easier to read. Set the Content as the Body of the previous HTTP action and the Schema below:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
    "type": "object",
    "properties": {
        "@@odata.context": {
            "type": "string"
        },
        "value": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "FeatureStatus": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "FeatureDisplayName": {
                                    "type": "string"
                                },
                                "FeatureName": {
                                    "type": "string"
                                },
                                "FeatureServiceStatus": {
                                    "type": "string"
                                },
                                "FeatureServiceStatusDisplayName": {
                                    "type": "string"
                                }
                            },
                            "required": [
                                "FeatureDisplayName",
                                "FeatureName",
                                "FeatureServiceStatus",
                                "FeatureServiceStatusDisplayName"
                            ]
                        }
                    },
                    "Id": {
                        "type": "string"
                    },
                    "IncidentIds": {
                        "type": "array",
                        "items": {
                            "type": "string"
                        }
                    },
                    "Status": {
                        "type": "string"
                    },
                    "StatusDisplayName": {
                        "type": "string"
                    },
                    "StatusTime": {
                        "type": "string"
                    },
                    "Workload": {
                        "type": "string"
                    },
                    "WorkloadDisplayName": {
                        "type": "string"
                    }
                },
                "required": [
                    "FeatureStatus",
                    "Id",
                    "IncidentIds",
                    "Status",
                    "StatusDisplayName",
                    "StatusTime",
                    "Workload",
                    "WorkloadDisplayName"
                ]
            }
        }
    }
}

Once the data has been parsed, you can loop through each service and check for service status. The next action is to add an Apply to each action for the value variable.

Within the loop, add a Group Condition that Status is equal to ServiceOperational and ServiceRestored.

Under the If No condition, you can add an action because the service is not operational. To demonstrate, I’ve configured steps for posting a message to Microsoft Teams as shown below

This will then be triggered when there is any status that doesn’t match the define ServiceOperational or ServiceRestored within Office 365. As you can see below I have been notified in Microsoft Teams for an issue with Microsoft 365 stack.

Regards
The Author – Blogabout.Cloud

Making your PowerShell script self elevate to run as an Administrator

I have been recently running a number of PowerShell scripts where I required to elevate the session to Administrator. Ideally I didnt want to have to provide logon details everytime, so the following script removed the need to provide Admin credentials.

# Get the ID and security principal of the current user account
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)

# Get the security principal for the Administrator role
$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator

# Check to see if we are currently running "as Administrator"
if ($myWindowsPrincipal.IsInRole($adminRole))

   {
   # We are running "as Administrator" - so change the title and background color to indicate this
   $Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Elevated)"
   $Host.UI.RawUI.BackgroundColor = "DarkBlue"
   clear-host

   }
else
   {
   # We are not running "as Administrator" - so relaunch as administrator

   # Create a new process object that starts PowerShell
   $newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";

   # Specify the current script path and name as a parameter
   $newProcess.Arguments = $myInvocation.MyCommand.Definition;

   # Indicate that the process should be elevated
   $newProcess.Verb = "runas";

   # Start the new process
   [System.Diagnostics.Process]::Start($newProcess);

   # Exit from the current, unelevated, process
   exit

   }

Regards
The Author – Blogabout.Cloud

Delivering your favourite configuration, tweaks and PowerShell modules to all of your Microsoft Endpoint Managed Windows 10 devices.

In recent times I have had to rebuild a number of my Windows 10 devices and reinstall my favourite scripts, applications and tweaks. Which got me thinking there must be a better way of rebuilding my devices, so heres my approach.

Azure Blob Storage

After transitioning from a very UC focused role I have been learning an appreciation for the whole M365 stack and how Microsoft Azure can work hand in hand with potential problems or scenarios. Microsoft have done a very good job in providing a platform to enable businesses and organisations to leverage their subscriptions in more power ways, so with that being said lots looks at Azure Blob Storage.

First of all we need to log into the Azure Portal as this is where all the required work will now take place. Once logged in you will need to search for Storage account as this is where all files will need stored. In my case, I have already created a Storage Account but you can complete this by using the Add button.

Storage Accounts

As you have now created the Storage Account, you will need to go to Containers as shown below.

Containers

Again in my case I already have a container called intuneblogaboutcloud but you can create your container by clicking + Container

New / Existing Containers

We can now upload all required PowerShell scripts, installers, images etc.. depending on what you are attending to achieve. In my container, I have created folders to structure the data.

Structure to the container

One of the key things to understand with each file uploaded it has a unique URL, please keep this in mind as later in this post I will be demostrating how I use this URL to deliver customizations to my Windows 10 devices.

Example of the blob uploaded

PowerShell Scripts

So Microsoft Endpoint Manager has the ability to deliver PowerShell scripts to any and all Windows 10 enrolled devices. As I was getting annoyed in having to reinstall PowerShell customizations and tweaks I like to perform on my client machines. I created several scripts that do the hard work for me.

Now we will need to connect to Microsoft Endpoint Manager portal. Once logged in browse to Devices –> PowerShell Scripts.

PowerShell Scripts

As you can see from the above I am curently delivering 3 scripts to my Windows 10 endpoints so lets look at them a bit closer.

Microsoft Teams – Custom Backgrounds

Please refer to my dedicated post about publishing custom backgrounds for Microsoft Teams.

PowerShell – Common Modules

In my line of work, I use a number of PowerShell modules to help me achieve the required outcomes to complete a project or ad-hoc work for customers.

The below script installs the following PowerShell modules

One of the unique features of this script is to check for updated versions of the module from the PSGallery. However, this feature isn’t effective using MEM for delivery unless a modified script is upload to the MEM.

https://github.com/TheWatcherNode/blogaboutcloud/blob/master/Get-CommonModules.ps1

PowerShell – Custom PowerShell Tweaks

While working on a customer engagement there was a requirement to deliver customization to Windows 10 endpoint and to be able to achieve this via a “Cloud First Approach”.

The below script has designed to action the following;

  • Create a local directory to download all files from Azure Blob Storage (C:\_build)
  • Download all specified files from Azure Blob Storage
  • Run all applications or scripts
  • Remove C:\_build folder directory
  • Run any necessary PowerShell commands to configure applications.

https://github.com/TheWatcherNode/blogaboutcloud/blob/master/Get-AppsfromBlobStorage.ps1

As mentioned in the Azure Blob Storage section the unique URL will have an important part to play. As you can see from the image below, I have highlighted 3 sections

  • 1 – The unique URL with its our unique variable name $chromeinstaller
  • 2 – The download command
  • 3 – The installer command

Even with limited PowerShell experience, you will be able to understand how this script works and customize to your needs. Whether its an .msi, .exe, .ps1 you just modify the script to your needs.

W32 Apps

Finally, delivering applications to Windows 10 using the native W32 App method. Microsoft have already made it easier with Microsoft Apps for Enterprise aka Office ProPlus but as you can see I have leverage MEM to install a number of MSI files that I like on my machines. I will not going into detail on this section as its quite straight forward.

So there you have it, customizing my Windows 10 devices with my tweaks, modules and applications via Microsoft Endpoint Manager + Azure Blob Storage and PowerShell.

Regards
The Author – Blogabout.Cloud