00:00Hey everyone, welcome back to the MailStudy channel.
00:13In today's video, we will be diving into how you can connect Office 365 with PowerShell
00:19and efficiently access your mailboxes.
00:22Whether you are an admin looking to automate tasks or just exploring PowerShell capabilities,
00:27we have got you covered. Let's get started.
00:30First, you need to install PowerShell. If it is not available, so download it.
00:35Now, to connect to Office 365, we need to install the necessary PowerShell module.
00:40Open the PowerShell run it administrator.
00:48Click yes.
00:51To install the Exchange Online PowerShell module, if you haven't already, run the following command.
00:56To install the module.
01:05This will install the Exchange Online Management module,
01:08which is used for managing Exchange Online.
01:10Now, import the module after installation.
01:13This ensures the module is loaded into your session. Once the module is installed and imported,
01:26you can connect to your Office 365 environment. For that, run the connection command.
01:30If multi-factor authentication is enabled, a sign-in prompt will appear like this.
01:50If you are not aware about how to enable and disable the multi-factor authentication in Office 365,
01:56then check out this video or click on the I button.
02:02Now, enter your credential.
02:12Here, you can see the connection will be set up successfully.
02:16We can also verify this session by running this command,
02:20This command will list mailboxes in your Exchange Online organization,
02:36confirming a successful connection.
02:39And that's how you can connect with Office 365 with PowerShell.
02:42Now, we are moving to understand how to fetch user data for that.
02:46Run this command.
02:47We use this command to retrieve all mailboxes in your Exchange Online environment.
03:03By default, PowerShell limits the result to 1000 mailboxes.
03:07Adding results as unlimited ensures you get a complete list,
03:11regardless of how many mailboxes exist in your organization.
03:14When you run GetMailboxResultUnlimited, you will get a list of with the several columns,
03:20including name, alias name, database, probited, send coda, external directory, objective.
03:31Let's move on and access individual mailboxes.
03:34To get detail for a specific mailbox, use this command with either the name or alias name.
03:41Here's an example.
03:42Here's an example.
03:42To get the detail for the user with the alias Abhishekwaran,
03:48this command.
03:54Or if you want the mailbox for admin,
03:56This will show detailed information about the specific mailboxes.
04:07If you just want to see a list of mailboxes with their name and alias,
04:12You can use this command.
04:22This simplifies your output and lets you focus only on the names and alias.
04:30Once you have identified a mailbox, you might want to view its statics,
04:35like size or last login time.
04:37To do that, run this command.
04:42This will give you detailed static on the mailbox, like item count and mailbox size.
04:54If you want to check who has permission on a mailbox, you can use this command.
04:58This will show all the users who have permission on that mailbox.
05:13Lastly, if you need to filter mailboxes based on certain criteria,
05:16like mailbox starting with the alias name, alias shared, you can do this.
05:28This command will list all mailboxes with alias that start with shared.
05:37And that's how it is in this video.
05:39I hope you found this guide helpful in learning how to connect to Office 365 with PowerShell
05:44and access users with mailboxes.
05:46Thanks for watching, if you enjoyed the video, don't forget to like, share,
05:51subscribe and hit the bell icon for more tutorials from Mailsteading.
Comments