Script to search through Recoverable and Purged items and restore those

The purpose of this script is to find deleted messages in a specified user's mailbox. There are 3 levels (when configured) of Trash in a mailbox: Level 1 - Deleted Items (e.g. 30 days) Level 2 - Recoverable items (e.g. 15 days) Level 3 - Purged items (e.g. 15 days) Users usually know about the first two. Moreover, they can only work with the first two from both Outlook and OWA. Only admins have access to Purged items. It makes sense to use this script in at least 2 cases: A user is being terminated on bad terms, decided to permanently delete everything from both Deleted and Recoverable items. A user deleted an email at some point, missed the first 30-day period, then missed the second 15-day period, and then wants to recover that email. If it's less than 60 days (30+15+15) overall then that email can be restored. The script…

Continue ReadingScript to search through Recoverable and Purged items and restore those

PowerApps form in SharePoint – show values of Created and Created By before item submission

I am huge advocate of using as few columns as possible when building PowerApps forms in SharePoint. Let's take a look at a very simplified example - a custom Requests SharePoint list.  It surely has to have fields like: Requested By (a user name here) Requested On (a date and time here). So rather than creating two more columns and populating them with values, I would highly recommend using columns that already exist in SharePoint - Created and Created By. The downside of these columns is they don't have values until a user submits the request. Because of this it might be not the cleanest user experience if you decide to use and show those fields. There is a simple way to prepopulate those fields with values that will be exact (user name) or very close (date and time) to the ones that will appear after submission. Let's create a…

Continue ReadingPowerApps form in SharePoint – show values of Created and Created By before item submission

Skype for Business – using Banner logo from Azure-Company Branding in a Skype Logo URL

It's a good practice to display your Company logo in the places where it makes sense, e.g.: Login page (for users to be 100% sure they are trying to access their Company resource) Email signature (Company branding) Skype for Business meeting (Company branding) Configuring Logo in the Skype for Business is pretty straightforward and fully described in this Microsoft article - https://docs.microsoft.com/en-us/SkypeForBusiness/set-up-skype-for-business-online/customize-meeting-invitations Since it has to be a URL, it must be pointing to a web resource whether it's your Company website, SharePoint document library with enabled anonymous access or anything else. In my opinion, these are all unnecessary dependencies. Why not using something that is already configured? PREREQUISITES - Company Branding To configure Company branding you must follow these steps: Go to Microsoft 365 admin center - Admin centers - Azure Active Directory Then Azure Active Directory admin center - Azure Active Directory - Company branding - Banner logo Upload your Company logo image following the…

Continue ReadingSkype for Business – using Banner logo from Azure-Company Branding in a Skype Logo URL

Script to add or replace distribution groups of a target user with groups a source user has

This PowerShell script has two use cases combined in it - ADD and REPLACE. Before any change is made the script also shows a group membership for both a target and a source users. Note, the script only processes those distribution groups that are managed in the cloud. If you have some groups synced with Active Directory, those should be processed separately. USE CASE #1 - ADD When Add is chosen, the scripts only adds distribution groups of the source user to the target user's list. Use this part of the script when a target user assumes new responsibilities that another user has but keeps the old responsibilities as well. In other words, the target user needs to have a combination of new and old distribution groups to perform job tasks. USE CASE #2 - REPLACE Essentially, the 2nd part of the script is a combination of the 1st part…

Continue ReadingScript to add or replace distribution groups of a target user with groups a source user has

PowerApps – using Checkbox controls with Multi-Valued Choice columns

At some point Microsoft PowerApps Team added support for fields with multiple values through a Combo Box control. However, as of this moment (2/3/2019) there is still no native support for Checkbox controls even when you configure your Choice column in SharePoint to have Checkboxes (allow multiple selections). There is a good article (https://powerapps.microsoft.com/en-us/blog/multivaluedchoicesinforms/) published by Carlos Figueira from PowerApps Team that shows how to implement Checkbox controls. The downside of it was using a Text column that imitates a Choice column. It's been a while since that article was published, so it's hard to say if anyone has done it differently. In this post I will explain how to pair Checkbox controls with a true Multi-Valued Choice column. Please note, in my example I will be using a PowerApps Form rather than PowerApps App; however, it shouldn't make any difference. Let's create a SharePoint List, name it TestList, add a TestListColors Choice column.…

Continue ReadingPowerApps – using Checkbox controls with Multi-Valued Choice columns

Script to removeĀ a user from all distribution groups managed in the cloud

The purpose of this PowerShell script is to remove a user from all distribution groups. The script is interactive, it will show the list of groups first, then you have an option to process your request. While the same can be done using Exchange Admin or Microsoft 365 Admin Center, it is much faster using PowerShell. Note, the script only processes those distribution groups that are managed in the cloud. If you have some groups synced with Active Directory, those should be processed separately. $email = Read-Host "Please provide a user's email address to remove from all distribution groups" $mailbox = Get-Mailbox -Identity $email $DN=$mailbox.DistinguishedName $Filter = "Members -like ""$DN""" $DistributionGroupsList = Get-DistributionGroup -ResultSize Unlimited -Filter $Filter Write-host `n Write-host "Listing all Distribution Groups:" Write-host `n $DistributionGroupsList | ft $answer = Read-Host "Would you like to proceed and remove $email from all distribution groups ( y / n )?" While…

Continue ReadingScript to removeĀ a user from all distribution groups managed in the cloud

SharePoint Document Library – show Path column in the view and make it clickable to open that path

How to add / show Path column in a view in a SharePoint Document Library appears to be a question with hundreds of different answers to it. The reasons for such a variety are: different versions of SharePoint (on premise, online, 2010, 2013); two Workflow variations ("old" workflow, Microsoft Flow); SharePoint Designer (2010, 2013); using Web Parts and more. Why would one need to see a Path column? Take a look at the two examples below; however, there might be more use cases. Example 1 - when searching for files. Example 2 - when using a view with "Show all items without folders" option selected Here is a test Document Library with a folder and some document in it: It's not possible to show Path column using out-of-the-box tools, the Path column is just not available to be selected: Although the Path can be seen if you open the details pane:…

Continue ReadingSharePoint Document Library – show Path column in the view and make it clickable to open that path

SharePoint Column Formatting – customize the look of Hyperlink columns and their Display Text

There is nothing wrong with how SharePoint Hyperlink columns display information by default. However, some users believe that the look is too generic, hard to bring attention to, which I myself tend to agree with. Let's see how it looks by default: The issues in my opinion are: the Display Text is grey and no different than any other column if Display Text needs to always be the same (e.g. CLICK HERE), then it has to be typed in that way in every single list item. We will address both issues. 1. KEEP THE ORIGINAL DISPLAY TEXT AND CHANGE THE LOOK The following JSON code is applied to both Hyperlink columns: { "$schema": "http://columnformatting.sharepointpnp.com/columnFormattingSchema.json", "elmType": "a", "txtContent": "@currentField.desc", "style": { "color": "red", "font-weight": "bold" }, "attributes": { "target": "_blank", "href": "@currentField" } } 2. SHOW PREDEFINED DISPLAY TEXT AND CHANGE THE LOOK The following JSON code is applied to both…

Continue ReadingSharePoint Column Formatting – customize the look of Hyperlink columns and their Display Text

Script to get mailbox size and number of items info for all users or a single one

This script has two parts in it and depending on the selection it will either run it against a single specified mailbox or all of them at once. Note, running this script against a few hundred mailboxes takes several minutes. So if your company is large with thousands of mailboxes, expect it to take much longer. As part of the output it lists the following parameters - a user name, number of items in the mailbox, its current size, and a maximum allowed size. There is a downside of using this script when running it against all mailboxes. Because Get-MailboxStatistics outputs TotalItemSize as a string only, it makes it harder to search through and sort by. I wish Microsoft could change that and provide data in a number type format. $answer = Read-Host "Would you like to get statistics for all users ( y / n )?" While ("y","n" -notcontains $answer)…

Continue ReadingScript to get mailbox size and number of items info for all users or a single one

Microsoft Flow – 2 methods to not use Apply to Each action when only a single filtered item is expected

  • Post category:Flow
  • Post comments:14 Comments

In this post I will show you 2 methods when using Apply to each Flow action is not necessary. By not using them you make your Flows look cleaner, less complicated. Please note, these methods are mostly good when only a single item is expected after filtering an array. I created a SharePoint List with two text columns - Title and Color. Both columns are required. Title values are set to be unique (!). When using Get Items action, an array of items is returned regardless if it's a single item in it or not. The moment you try to use a Condition action on its result, the system will insert an Apply to Each action to go through every single possible item. Again, it's redundant when by design a single item is returned after filtering. In my test flow I'm using a very simple Filter Query on purpose - Title…

Continue ReadingMicrosoft Flow – 2 methods to not use Apply to Each action when only a single filtered item is expected