Tuesday, August 28, 2018

How to Get your Microsoft Teams to Appear for mail and calendar operations


Depending upon your settings and circumstances, there's a chance that groups created in Microsoft Teams might play so well together. 

Specifically, your team might not be available for email.  As it turns out, the teams ARE available... they're just hidden.  

and a little PowerShell is enough to coax them out. 

Our Example

In our example, the site is called Application Redevelopment and you can see from the screenshot that it appears in teams but not in outlook.


The PowerShell Commands

Session Setup

The setup is as per usual;
Start PowerShell in Administrator Mode.

Set-ExecutionPolicy RemoteSigned

Press Y and Enter.

$UserCredential = Get-Credential

Enter your user name and password.

Create the session.

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

and activate it.

Import-PSSession $Session

The relevant command.

The command we need to use is Set-UnifiedGroup and the format we're using is as follows.

Set-UnifiedGroup -Identity "GROUPNAME" -HiddenFromAddressListsEnabled:$false

Where GROUPNAME is either the name of the group or the email address of the group.

In this example, it's;

Set-UnifiedGroup -Identity "Application Redevelopment" -HiddenFromAddressListsEnabled:$false

You can use the groups email address if it's easier.
Note that you can hide a Teams Group from email by ending in $true

Tidying Up

As usual, a tidy person will alway clean up their session.

Remove-PSSession $Session

and

Exit


The Proof. 

The screen shot below is probably enough proof.


Friday, August 24, 2018

Nesting Groups in Office 365


Nesting Groups has been a bit of a pain in Office 365 for a while now but there's apparently a few answers (and some updates on the way).  

Here's a PowerShell method. 

The Setup

To start with, we're going to create a group in Office365 Admin. It should be a mail enabled security group.

In our example the group will be called;

GRP MotherGroup
and it will have an email address of MotherGroup@mydomain.com
(obviously the domain will be different at your location).

For the purposes of this exercise, you'll also want to create several groups to be nested.
These are distribution groups and their names and emails for the purposes of our demonstration will be;
GRP BabyGroup1  babygroup1@mydomain.com
GRP BabyGroup2  babygroup2@mydomain.com
GRP BabyGroup3  babygroup3@mydomain.com
GRP BabyGroup4  babygroup4@mydomain.com


The PowerShell Commands

As usual, you'll want to run PowerShell in Administrator Mode.

Set-ExecutionPolicy RemoteSigned
Press Y and Enter.

$UserCredential = Get-Credential
You'll be prompted to logon with your user name and password.  If you have multi-factor authentication enabled, you'll probably have a few extra hoops to jump through here.

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

This creates the session

Import-PSSession $Session

This activates the session.

The next command is specific to your group. It looks like this (boldfaced parts will be replaced).

Add-DistributionGroupMember -Identity -Member


If you're following our example, the commands would be as follows;
Add-DistributionGroupMember -Identity MotherGroup@mydomain.com -Member babygroup1@mydomain.com
Add-DistributionGroupMember -Identity MotherGroup@mydomain.com -Member babygroup2@mydomain.com
Add-DistributionGroupMember -Identity MotherGroup@mydomain.com -Member babygroup3@mydomain.com
Add-DistributionGroupMember -Identity MotherGroup@mydomain.com -Member babygroup4@mydomain.com


As usual, because we're neat people, we remove our session before exiting...
Remove-PSSession $Session
Exit

If you go into the Office 365 Admin console, you should be able to find your group, now with the nested subgroups below it. It's a painful process but it works.


Tuesday, August 14, 2018

What can OneDrive, Synch and SharePoint File Libraries offer Business?


I do a lot of reading on the Microsoft tech boards and I find the information that Microsoft provides around OneDrive to be both confusing and lacking in detail. I wrote this post as a means of clearing up some of the confusion.  

So, here's my interpretation and opinions on what OneDrive and File Libraries in SharePoint (via a proper Office 365 E3 or E5 subscription) can offer;

The Sync Client isn't all that Important

SharePoint file libraries can replace all of your networked drive needs and these facilities have come a long way in the last few years.

In fact, for the most part, SharePoint has finally eclipsed the need for the OneDrive Sync client. 

There's a few minor exceptions to this rule.

  • You still can't easily "link" files, so if you have an excel file which updates its data from other excel files, it a real pain to add and install those connections -- and it's much easier if you have a local synced connection.
  • Saving files in Office applications, Word, Excel, PowerPoint etc now works very well with pure SharePoint  (finally... after the July 2018 updates). Unfortunately, the same ease of use does not apply with non-Microsoft products, such as NitroPDF, PhotoShop, or any of the other programs that use the old style windows dialog boxes. You'll need local sync if you plan to use these too.
  • If you're often travelling and will need to work in places without an internet connection, then you're going to need your file available locally. For that you'll need OneDrive Sync.
  • My personal favourite reason for using the OneDrive sync application is to sync only the corporate templates folders (and point your local Word's Workplace Templates folder to the synced folder)
If, on the other hand, all of your work is in Office and/or the web browser and if you're only working in places where there's an internet connection then you can safely forget OneDrive file sync.


It's All About SharePoint

Having your files stored in SharePoint will allow you to access them via any PC, Mac, tablet or phone anywhere in the world without the need for dedicated security infrastructure such as a VPN.

Having your files there will also ensure that they are version controlled. This means that you can restore old versions of them if you overwrite or delete them -- up to about 90 days.  If you need longer, you'll have to invest in backup solution like Veem, StorageCraft or Veritas.

Internal and External sharing and Security can be achieved by storing your files in different SharePoint "sites" or in separate File libraries in a single SharePoint site, depending on how you set things up.

Essentially SharePoint's file library replaces all of your old-style network drives.

The OneDrive Sync Application

The OneDrive Sync Application will allow you to synchronise data between SharePoint File libraries and your computer.  This is important if you need to access and modify files on the go without an internet connection.  It's also a useful thing if you want to do local backups. 

Changes made to local OneDrive files will sync to the relevant SharePoint sites and to all other synched versions of the site (ie: to other people's synched copies on their own computers).  Deletes are also synched meaning that if someone deletes their synched files their own computer, it will delete them off the network and off all other computers. 

This makes the OneDrive sync application a bit of a liability -- and increases the importance of locking users out of the system once they leave employment. 

You can still restore files but prevention is better than a cure.

Until very recently (late July 2018), you really needed to sync your files because saving directly from Word to SharePoint was ridiculously difficult.  It's now changed and it's very easy, so the need for local OneDrive sync is drastically reduced.

Saving to SharePoint in Excel - Finding libraries has never been easier.

In my opinion, it's recommended that you don't sync if you can help it as sync provides malware (and accidents) with an easier path to data on your server.

The OneDrive Folder 

Not to be confused with the similarly named sync application, the OneDrive folder is actually for personal storage. If you have a home account like hotmail or outlook.com, you'll already have a personal OneDrive that you can use. 

If you're in a business with an Office 365 account, you'll also have a business-personal OneDrive. In the business, this is like your home drive on a network.  Nobody else can see it and it's a great place to store things that you're working on but aren't ready to release yet,

You can randomly share things out to other people from your home drive, so you have more flexibility than the old home drive concept.  Depending upon your organisation's settings, you can also share files and folders outside of your business making the security on your personal OneDrive much more flexible than a SharePoint document library.

Of course, just because you can, it doesn't mean that you should. Don't be tempted to use your OneDrive in place of your main business folders. SharePoint is a much better bet. 


Wednesday, August 01, 2018

How to Get the Members of an Office 365 Group via PowerShell

If you have a few big groups, you'll probably be asked to provide a list of their members on occasion. Like Notes, if you don't have a CRM on the front of your system, it's hard to get a list of group members that includes anything apart from their name... unless of course, you use PowerShell.

Note: If you're copying and pasting from this blog entry, it's worth pasting into notepad so that you can rejoin any lines before pasting into PowerShell. I only give you one command at a time, so it should all be on one line.

The Procedure

Start PowerShell (in Administrator Mode) and connect to Office 365

Set-ExecutionPolicy RemoteSigned

(and press Y )

$UserCredential = Get-Credential

Enter your email address and password.

If you're using 2 Factor Authentication...

You'll need to open the Microsoft Exchange Online Powershell Module which should be on your desktop if you've followed the instructions (see this post).

Enter the following command (changing the email address to be your own)

Connect-EXOPSSession -UserPrincipalName myemail@mydomain.com -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Authentication Basic -AllowRedirection

then...

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

then

Import-PSSession $Session

I got a lot error text at this point (WARNING: Proxy creation has been skipped for the following command -- followed by a large list of yellow commands). I think you can get around this by entering a session instead of importing it but my PowerShell experience doesn't really stretch that far -- and the command works in any case, so there's no need. (yet).

Make a note of your group's email address: mygroupemail@mydomain.com
and the path to a CSV file where you want to save the output. C:\temp\MemberList.csv

You'll want to change both of those bits in the next command.

Get-DistributionGroupMember -Identity "mygroupemail@mydomain.com" | Export-csv C:\temp\MemberList.csv -NoTypeInformation

Cleaning up afterwards

Exit the session...
Exit-PSSession

and then remove it. 
Remove-PSSession $Session

and then exit the PowerShell window.
Exit 

Looking at the Output

The output of your command will be a CSV file that you can open in Excel. At first glance, it's probably not going to look very nice. It's got columns from A-DH but they're mostly empty. Here's how to clean it up, obviously the columns are subject to change whenever Microsoft feels like it but it's probably worth creating a Macro for. 

  • Remove Columns A-C
  • Keep Column D and E (Identity and Alias)
  • Remove Columns F-G
  • Keep Column H (City)
  • Remove Column I
  • Keep Column J-L (Company,  Country and Postcode)
  • Remove Columns M-AP
  • Keep Column AQ (First Name)
  • Remove Columns AR-AS
  • Keep Column AT (Last Name)
  • Remove Columns AU-BC
  • Keep Column BD (Phone)
  • Remove Columns BE-BF
  • Keep Column BG (Email)
  • Remove Columns BH-BL 
  • Keep Column BM (State)
  • Remove Column BN
  • Keep Column BO (Position Title)
  • Remove Columns BP-CX
  • Optionally keep Columns CY-CZ (Create and Modify Dates)
  • Remove Columns DA-DH

The result should be a usable spreadsheet.