Category: Exchange Management Shell

Powershell Commands to remember for the Microsoft 70-347 Exam

Powershell Commands to remember for the Microsoft 70-347 Exam

70-347
Office 365 70-347

Powershell Cmdlets to remember for the Microsoft 70-347: Enabling Office 365 Services Exam

I am currently studying for the Microsoft 70-347: Enabling Office 365 Services exam. Below is a list of PowerShell commands and their purpose for reference. More commands will be added to the below as I learn them.

Also, some useful flashcards for the 70-347 exam can be found here:
Flashcards – Cram.com

Exchange Online PowerShell Cmdlets:

How to check and enable OAuth2 in Exchange Online:
Get-OrganizationConfig | Select *OAuth*
Set-OrganizationConfig -OAuth2ClientProfileEnable $true

How to check and enable OAuth2 in Skype for Business Online:
Get-CsOAuthConfiguration | select *adal*
Set-CsOAuthConfiguration -ClientAdalAuthOverride Allowed

OAuth Notes:
– Because Skype for Business Online and Exchange Online are linked, its best to have the same OAuth configuration on both services
– The OAuth configuration for Sharepoint Online is enabled by default

Skype for Business Online PowerShell Cmdlets:

The Skype for Business Online PowerShell cmdlet for displaying all policies applied to a particular user:
Get-CsOnlineUser sip@address | select *policy*

SharePoint Online PowerShell Cmdlets:

How to disable Sharepoint Online External user Sharing Globally:
Set-SPOTenant -SharingCapability Disabled

How to disable Sharepoint Online External user Sharing per Site Collection:
Set-SPOSite -identity 'https://sitecollectionurl' -SharingCapability Disabled

How do you remove an External Users access to SharePoint Online via PowerShell?
Get-SPOExternalUser
$RemoveUser = Get-SPOExternalUser -Filter testuser
Remove-SPOExternalUser -UniqueIds @($RemoveUser.UniqueId)

Grant the Site Collection Administrator Role to a user:
Set-SPOUser -Site -Login -IsSiteCollectionAdmin $true

Change the Primary Site Collection Administrator of a site:
Set-SPOSite -Identity -Owner

Set the Server Resource Quota for a specific site collection:
Set-SPOSite -Identity -ResourceQuota -ResourceQuotaWanrningLevel

set the Storage Quota limits on a Sharepoint Site Collection:
Set-SPOSite -Identity -StorageQuota -StorageQuotaWarningLimit

Create a new Sharepoint Site Collection:
New-SPOSite -Title Test1 -url https://testing.sharepoint.com/sites/Test1 -LocalID 2057 -Template "STS#0" -Owner [email protected] -StorageQuota 1024

*Note(s) on creating a new Site Collection ID*:
– LocalID is the Language ID – See here for a List> Microsoft Local ID Library
– StorageQuota is in MB
– Here is a Link to the different Sharepoint Online Template IDs> Sharepoint Template IDs

Get a list of Sharepoint Online Local ID’s and Templates:
Get-SPOWebTemplate

Remove a Sharepoint online Site:
Remove-SPOSite -Identity

Restore a delete Sharepoint Online Site:
Restore-SPOSite -Identity

Security and Compliance:

Connect to the Office365 Security and Compliance Centre:
$Cred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.compliance.protection.outlook.com/powershell-liveid/ -Credential $Cred =Authentication Basic -AllowRedirection
Import-PSSession $Session

Create a new eDiscovery Compliance Case:
New-ComplianceCase

Get information on a current eDiscovery Compliance Case:
Get-ComplianceCase

Remove a current eDiscovery Compliance Case:
Remove-ComplianceCase

Make changes to a current eDiscovery Compliance Case:
Set-ComplianceCase

[amazon_link asins=’1509304789,1509300678,B0160FHBZA’ template=’ProductGrid’ store=’412294wp-21′ marketplace=’UK’ link_id=’7217c19d-5844-11e8-8a53-330f239b92e1′]

Collection of useful Powershell commands for Server Administration

Collection of useful Powershell commands for Server Administration

Below is a list of useful Powershell commands that I use day to day – This list will be built upon over time:

Windows Server:

Get a list of running services:
Get-Service | Where-Object {$_.Status -eq "Running"}

Microsoft Exchange Server

Connect to Office 365 Exchange Online:
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session

Get list of permissions on a users Mailbox Calendar:
get-MailboxFolderPermission -Identity [email protected]:\Calendar

Add a permission onto a users Mailbox Calendar:
Add-MailboxFolderPermission -Identity [email protected]:\calendar -User [email protected] -AccessRights Editor

Office 365 Administration

Connect to Office 365 via Powershell:
$UserCredential = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection
Import-PSSession $Session
Connect-MsolService -Credential $UserCredential

Other Articles that may interest you:
Powershell Cmdlets to remember for the Microsoft 70-346: Managing Office 365 Identities and Requirements Exam

Powershell Cmdlets to remember for the Microsoft 70-347: Enabling Office 365 Services Exam

Installing an SSL Certificate in Exchange 2007 / 2010 and assigning it to Exchange Services

Installing an SSL Certificate in Exchange 2007 / 2010 and assigning it to Exchange Services

SSL Prerequisite(s):

You will have generated a CSR (Certificate Signing Request), prior to this. For an easy way to generate the EMS CSR Command, see here:

Exchange 2007 EMS CRS Command Generator: Exchange 2007 CSR
Exchange 2010 EMS CRS Command Generator: Exchange 2010 CSR

You will have Installed your Intermediate Certificate (via mmc) prior to the below.

——————————————————————————————–

How to Import the SSL Certificate

From an elevated Exchange Management Shell, run the following command to import the SSL Certificate into Exchange 2007 \ 2010:

Import-ExchangeCertificate -FileData ([Byte[]]$(Get-Content -Path c:\certificates\YOUR_CERTIFICATE.cer -Encoding byte -ReadCount 0))

Note: Replace “c:\certificates\YOUR_CERTIFICATE.cer” with the path of your Certificate location

——————————————————————————————–

To enable the Certificate and assign it to the relevant services, run the following command:

Assign Certificate in Exchange 2007:
Enable-ExchangeCertificate -Thumbprint *Insert Thumbprint* -Services “POP,IMAP,SMTP,IIS”

Note: replace *Insert Thumbprint* with $your_Thumbprint (you will see this in the output of the previous command).

Assign Certificate in Exchange 2010:
Enable-ExchangeCertificate -Thumbprint *Insert Thumbprint* -Services POP,IMAP,SMTP,IIS

Note: replace *Insert Thumbprint* with $your_Thumbprint (you will see this in the output of the previous command).

Original Source:
https://support.comodo.com/index.php?/Knowledgebase/Article/View/712/37/certificate-installation-exchange-2010-powershell