Open Notepad Copy the following cmdlets and edit as required: 3. Save the file as a PowerShell Script file. 4. Open Windows PowerShell 5. Run your script file 6. Enter your Office 365 admin credentials and click ok Access Rights Roles Author CreateItems, DeleteOwnedItems, EditOwnedItems, FolderVisible, ReadItems Contributor CreateItems, FolderVisible Editor CreateItems, DeleteAllItems, DeleteOwnedItems, EditAllItems, EditOwnedItems, […]
How to list Windows 10 Upgrades
Do you need to know when a particular upgrade for windows 10 was done? Open Powershell Open Windows PowerShell and run the following two cmdlets PS > $AllBuilds = $(gci “HKLM:\System\Setup” | ? {$_.Name -match “\Source\s”}) | % { $_ | Select @{n=”UpdateTime”;e={if ($_.Name -match “Updated\son\s(\d{1,2}\/\d{1,2}\/\d{4}\s\d{2}:\d{2}:\d{2}))$”) {[dateTime]::Parse($Matches[1],([Globalization.CultureInfo]::CreateSpecificCulture(‘en-US’)))}}}, @{n=”ReleaseID”;e={$_.GetValue(“ReleaseID”)}},@{n=”Branch”;e={$_.GetValue(“BuildBranch”)}},@{n=”Build”;e={$_.GetValue(“CurrentBuild”)}},@{n=”ProductName”;e={$_.GetValue(“ProductName”)}},@{n=”InstallTime”;e={[datetime]::FromFileTime($_.GetValue(“InstallTime”))}} }; PS > $AllBuilds | Sort UpdateTime […]
How to Export a List of Email Addresses from Office 365
To export the list of users and emails addresses from Office 365 along with the first and last name of the users: Start PowerShell Run the following commands $LiveCred = Get-Credential $Session = New-PSSession -ConfigurationName Microsoft.Exchange – ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred – Authentication Basic -AllowRedirection Import-PSSession $Session 3. To export Get-Mailbox -ResultSize Unlimited |Select-Object DisplayName,PrimarySmtpAddress, @{Name=”EmailAddresses”;Expression={$_.EmailAddresses |Where-Object {$_.PrefixString […]
How to Start a Manual Active Directory Sync to Office 365
By Default, Active directory synchronization happens every 30 minutes and it runs on the Server you Installed Azure AD on. Log In to the Server you’ve Installed Azure AD Sync and open PowerShell. In the PowerShell windows type the cmdlet below: Start-ADSyncSyncCycle -PolicyType Delta