How to connect Powershell to an Office 365 Tenant

Step 1: Install required software

These steps are only required once on each computer you will be running powershell from, not every time you connect.

Run this to connect:

$LiveCred = Get-Credential$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell/ -Credential $LiveCred -Authentication Basic -AllowRedirection

Import-PSSession $Session

Then to remove it:

Remove-PSSession $Session

If you close the Windows PowerShell window without disconnecting from the server-side session, your connection will remain open for 15 minutes. Your account can have only three connections to the server-side session at one time.

 

Hope it helps

dw

Advertisements

Mail Routing During a Dell-Quest Migration Manager Migration to O365

This describes mail routing during a Dell Quest Migration Manager Migration from On-Prem Exchange to Microsoft Office 365

Co-existence routing during the migration.

Step 1, add the user to the Dell Active directory Migration tool (DMA).

This step creates the GAL and sets initial mail routing.

When a user is added to the Dell Active directory Migration tool (DMA). A mailuser (similar to a contact) is added to Office 365 and the ExternalEmailAddress attribute set. This tells Office 365 to send the mail externally (back to on-prem) through a connector in O365 scoped to on-prem.

 

image

Step 2 Add the user to a Quest Mail or Calendar Sync

In office 365

Once the user is put into a Dell Migration Manager mail or calendar sync, they become licensed in O365 (licensing creates a mailbox).The Exchange Migration Manager (EMM) then adds an address using the users GUID to the ForwardingSmtpAddress in office 365. This forwards all mail back to on-prem from users in Office 365. (No outside mail is arriving in O365 yet)

The DeliverToMailboxAndForward attribute is left at “False” (default).

image

On-prem

On-prem the Exchange Migration Manager (EMM) adds a proxy address using the users GUID on-prem (same address that is stamped in the ForwardingSmtpAddress attribute in Office 365)

Note: if routing is not working for a user, verify these addresses match. This is mail from Office 365 to on-prem.

This can be set by running the following command in an Office 365 shell.

image

Mail from on-prem to office 365 is handled by the Dell Exchange Migration Manager. This allows for more than just mail forwarding, but also deletes, moves etc and keeps the mailbox in sync.

Step 3 Flip the user

In Office 365

When a user is “flipped” or switched as it is referred to in the tool, Dell Exchange Migration Manager removes the forwarding address in Office 365. All mail now remains in Office 365.

image

On-Prem

Once a user is flipped EMM sets the targetAddress attribute to the USI user account. This can be the GUID@mydomain.onmicrosoft.com or the username@mydomain.onmicrosoft.com, but the address in the targetAddress must be in the proxy list in O365. If routing for this user is an issue, make sure the addresses match. Check this with adsiedit.msc in USI.

Or

Get-QADUser username -IncludeAllProperties | select name,targetaddress

 

 

image

image

The Microsoft’s Consultant’s Road to Azure

CloudRanger’s Microsoft Azure Training (70-533): https://www.youtube.com/playlist?list=PLPie5drlGW25NnMjef7HRdSAqEjxz66Ky

These are well worth watching.

______________________________________

Intune and Exchange ActiveSync
http://www.msexchange.org/articles-tutorials/exchange-server-2013/mobility-client-access/intune-and-exchange-activesync-part1.html

______________________________________

Deploying a Highly Available AD FS 3.0 Solution in Windows Azure for Single Sign-on with Office365

http://office365support.ca/deploying-a-highly-available-ad-fs-3-0-solution-in-windows-azure-for-single-sign-on-with-office365/

______________________________________

Rights Management

Protecting documents with Azure Rights Management

https://blogs.technet.microsoft.com/msuspartner/2016/04/19/azure-partner-community-protecting-documents-with-azure-rights-management/

Azure Rights Management deployment roadmap

https://docs.microsoft.com/en-us/rights-management/plan-design/deployment-roadmap

______________________________________

Skype for cloud links

Skype for Business Cloud Connector Edition

http://blog.get-csjosh.com/2016/04/introducing-skype-for-business-cloud-connector-edition.html

____________________________________________

Latest updates and releases for Skype for Business

https://blogs.office.com/2016/03/09/expanding-the-reach-of-skype-for-business-meetings-and-voice-services-in-office-365/#.VuBJ80zzsRk.linkedin#DKXDvHYtj4x9rmy1.97

____________________________________________

Step By Step: Install and configure Skype for Business 2015 Edge Server

http://www.rtcpedia.com/Blogs/Action?blogId=10039&blogURL=StepByStepInstallEdgeServer

____________________________________________

Microsoft Test Lab Guides

http://blogs.technet.com/b/tlgs/

____________________________________________

The first 3-way TLG: Exchange Server 2013 TLG for Windows Server 2012 R2

http://blogs.technet.com/b/tlgs/archive/2014/06/25/the-first-3-way-tlg-exchange-server-2013-tlg-for-windows-server-2012-r2.aspx

____________________________________________

Skype for Business Cloud Connector Infrastructure Requirements Part I

https://insidemstech.com/2016/04/23/skype-for-business-cloud-connector-infrastructure-requirements-part-i/

____________________________________________

Exchange Server build numbers

Product name

Release date

Build number

Exchange Server 2016 RTM  (2013 SP1)

2015-Oct-01

15.01.0225.042

Exchange Server 2016 Preview (2013 SP1 Beta)

2015-Jul-22

15.01.0225.016

Exchange Server 2013 CU10

2015-Sep-15

15.00.1130.007

Exchange Server 2013 CU9

2015-Jun-17

15.00.1104.005

Exchange Server 2013 CU8

2015-Mar-17

15.00.1076.009

Exchange Server 2013 CU7

2014-Dec-09

15.00.1044.025

Exchange Server 2013 CU6

2014-Aug-26

15.00.0995.029

Exchange Server 2013 CU5

2014-May-27

15.00.0913.022

Exchange Server 2013 SP1

2014-Feb-25

15.00.0847.032

Exchange Server 2013 CU3

2013-Nov-25

15.00.0775.038

Exchange Server 2013 CU2

2013-Jul-09

15.00.0712.024

Exchange Server 2013 CU1

2013-Apr-02

15.00.0620.029

Exchange Server 2013 RTM

2012-Dec-03

15.00.0516.032

Update Rollup 11 for Exchange Server 2010 SP3

2015-Sep-15

14.03.0266.002

Update Rollup 10 for Exchange Server 2010 SP3

2015-Jun-17

14.03.0248.002

Update Rollup 9 for Exchange Server 2010 SP3

2015-Mar-17

14.03.0235.001

Update Rollup 8v2 for Exchange Server 2010 SP3

2014-Dec-12

14.03.0224.002

Update Rollup 8v1 for Exchange Server 2010 SP3 (recalled)

2014-Dec-09

14.03.0224.001

Update Rollup 7 for Exchange Server 2010 SP3

2014-Aug-26

14.03.0210.002

Update Rollup 6 for Exchange Server 2010 SP3

2014-May-27

14.03.0195.001

Update Rollup 5 for Exchange Server 2010 SP3

2014-Feb-24

14.03.0181.006

Update Rollup 4 for Exchange Server 2010 SP3

2013-Dec-09

14.03.0174.001

Update Rollup 3 for Exchange Server 2010 SP3

2013-Nov-25

14.03.0169.001

Update Rollup 2 for Exchange Server 2010 SP3

2013-Aug-08

14.03.0158.001

Update Rollup 1 for Exchange Server 2010 SP3

2013-May-29

14.03.0146.000

Exchange Server 2010 SP3

2013-Feb-12

14.03.0123.004

Update Rollup 8 for Exchange Server 2010 SP2

2013-Dec-09

14.02.0390.003

Update Rollup 7 for Exchange Server 2010 SP2

2013-Aug-03

14.02.0375.000

Update Rollup 6 for Exchange Server 2010 SP2

2013-Feb-12

14.02.0342.003

Update Rollup 5v2 for Exchange Server 2010 SP2

2012-Dec-10

14.02.0328.010

Update Rollup 5 for Exchange Server 2010 SP2

2012-Nov-13

14.03.0328.005

Update Rollup 4v2 for Exchange Server 2010 SP2

2012-Oct-09

14.02.0318.004

Update Rollup 4 for Exchange Server 2010 SP2

2012-Aug-13

14.02.0318.002

Update Rollup 3 for Exchange Server 2010 SP2

2012-May-29

14.02.0309.002

Update Rollup 2 for Exchange Server 2010 SP2

2012-Apr-16

14.02.0298.004

Update Rollup 1 for Exchange Server 2010 SP2

2012-Feb-13

14.02.0283.003

Exchange Server 2010 SP2

2011-Dec-04

14.2.247.5

Update Rollup 8 for Exchange Server 2010 SP1

2012-Dec-10

14.01.0438.000

Update Rollup 7 v3 for Exchange Server 2010 SP1

2012-Nov-13

14.01.0421.003

Update Rollup 7 v2 for Exchange Server 2010 SP1

2012-Oct-10

14.01.0421.002

Update Rollup 7 for Exchange Server 2010 SP1

2012-Aug-08

14.01.0421.000

Update Rollup 6 for Exchange Server 2010 SP1

2011-Oct-27

14.01.0355.002

Update Rollup 5 for Exchange Server 2010 SP1

2011-Aug-23

14.1.339.1

Update Rollup 4 for Exchange Server 2010 SP1

2011-Jul-27

14.1.323.6

Update Rollup 3 for Exchange Server 2010 SP1

2011-Apr-06

14.01.0289.007

Update Rollup 2 for Exchange Server 2010 SP1

2010-Dec-09

14.01.0270.001

Update Rollup 1 for Exchange Server 2010 SP1

2010-Oct-04

14.1.255.2

Exchange Server 2010 SP1

2010-Aug-23

14.01.0218.015

Update Rollup 5 for Exchange Server 2010

2010-Dec-13

14.0.726.0

Update Rollup 4 for Exchange Server 2010

2010-Jun-10

14.0.702.1

Update Rollup 3 for Exchange Server 2010

2010-Apr-13

14.0.694.0

Update Rollup 2 for Exchange Server 2010

2010-Mar-04

14.0.689.0

Update Rollup 1 for Exchange Server 2010

2009-Dec-09

14.0.682.1

Exchange Server 2010

2009-Nov-09

14.00.0639.021

Update Rollup 17 for Exchange Server 2007 SP3

2015-Jun-17

08.03.0417.001

Update Rollup 16 for Exchange Server 2007 SP3

2015-Mar-17

08.03.0406.000

Update Rollup 15 for Exchange Server 2007 SP3

2014-Dec-09

08.03.0389.002

Update Rollup 14 for Exchange Server 2007 SP3

2014-Aug-26

08.03.0379.002

Update Rollup 13 for Exchange Server 2007 SP3

2014-Feb-24

08.03.0348.002

Update Rollup 12 for Exchange Server 2007 SP3

2013-Dec-09

08.03.0342.004

Update Rollup 11 for Exchange Server 2007 SP3

2013-Aug-13

08.03.0327.001

Update Rollup 10 for Exchange Server 2007 SP3

2013-Feb-11

08.03.0298.003

Update Rollup 9 for Exchange Server 2007 SP3

2012-Dec-10

08.03.0297.002

Update Rollup 8-v3 for Exchange Server 2007 SP3

2012-Nov-13

08.03.0279.006

Update Rollup 8-v2 for Exchange Server 2007 SP3

2012-Oct-09

08.03.0279.005

Update Rollup 8 for Exchange Server 2007 SP3

2012-Aug-13

08.03.0279.003

Update Rollup 7 for Exchange Server 2007 SP3

2012-Apr-16

08.03.0264.000

Update Rollup 6 for Exchange Server 2007 SP3

2012-Jan-26

8.03.0245.002

Update Rollup 5 for Exchange Server 2007 SP3

2011-Sep-21

8.03.0213.001

Update Rollup 4 for Exchange Server 2007 SP3

2011-May-28

8.03.0192.001

Update Rollup 3-v2 for Exchange Server 2007 SP3

2011-Mar-30

8.03.0159.002

Update Rollup 2 for Exchange Server 2007 SP3

2010-Dec-10

8.03.0137.003

Update Rollup 1 for Exchange Server 2007 SP3

2010-Sep-09

8.03.0106.002

Exchange Server 2007 SP3

2010-Jun-07

8.03.0083.006

Update Rollup 5 for Exchange Server 2007 SP2

2010-Dec-07

8.2.305.3

Update Rollup 4 for Exchange Server 2007 SP2

2010-Apr-09

8.2.254.0

Update Rollup 3 for Exchange Server 2007 SP2

2010-Mar-17

8.2.247.2

Update Rollup 2 for Exchange Server 2007 SP2

2010-Jan-22

8.2.234.1

Update Rollup 1 for Exchange Server 2007 SP2

2009-Nov-19

8.2.217.3

Exchange Server 2007 SP2

2009-Aug-24

8.02.0176.002

Update Rollup 10 for Exchange Server 2007 SP1

2010-Apr-13

8.1.436.0

Update Rollup 9 for Exchange Server 2007 SP1

2009-Jul-16

8.1.393.1

Update Rollup 8 for Exchange Server 2007 SP1

2009-May-19

8.1.375.2

Update Rollup 7 for Exchange Server 2007 SP1

2009-Mar-18

8.1.359.2

Update Rollup 6 for Exchange Server 2007 SP1

2009-Feb-10

8.1.340.1

Update Rollup 5 for Exchange Server 2007 SP1

2008-Nov-20

8.1.336.1

Update Rollup 4 for Exchange Server 2007 SP1

2008-Oct-07

8.1.311.3

Update Rollup 3 for Exchange Server 2007 SP1

2008-Jul-08

8.1.291.2

Update Rollup 2 for Exchange Server 2007 SP1

2008-May-09

8.1.278.2

Update Rollup 1 for Exchange Server 2007 SP1

2008-Feb-28

8.1.263.1

Exchange Server 2007 SP1

2007-Nov-29

8.01.0240.006

Update Rollup 7 for Exchange Server 2007

2008-Jul-08

8.0.813.0

Update Rollup 6 for Exchange Server 2007

2008-Feb-21

8.0.783.2

Update Rollup 5 for Exchange Server 2007

2007-Oct-25

8.0.754.0

Update Rollup 4 for Exchange Server 2007

2007-Aug-23

8.0.744.0

Update Rollup 3 for Exchange Server 2007

2007-Jun-28

8.0.730.1

Update Rollup 2 for Exchange Server 2007

2007-May-08

8.0.711.2

Update Rollup 1 for Exchange Server 2007

2007-Apr-17

8.0.708.3

Exchange Server 2007

2007-Mar-08

8.0.685.25

Exchange Server 2003 post- SP2

2008-Aug-01

6.5.7654.4

Exchange Server 2003 post-SP2

2008-Mar-01

6.5.7653.33

Exchange Server 2003 SP2

2005-Oct-19

6.5.7683

Exchange Server 2003 SP1

2004-May-25

6.5.7226

Exchange Server 2003

2003-Sep-28

6.5.6944

Exchange 2000 Server build numbers

Product name

Release date

Build number

Exchange 2000 Server post-SP3

August 2008

6.0.6620.7

Exchange 2000 Server post-SP3

March 2008

6.0.6620.5

Exchange 2000 Server post-SP3

August 2004

6.0.6603

Exchange 2000 Server post-SP3

April 2004

6.0.6556

Exchange 2000 Server post-SP3

September 2003

6.0.6487

Exchange 2000 Server SP3

July 18, 2002

6.0.6249

Exchange 2000 Server SP2

November 29, 2001

6.0.5762

Exchange 2000 Server SP1

June 21, 2001

6.0.4712

Exchange 2000 Server

November 29, 2000

6.0.4417

Exchange Server 5.5 build numbers

Product name

Release date

Build number

Exchange Server version 5.5 SP4

November 1, 2000

5.5.2653

Exchange Server version 5.5 SP3

September 9, 1999

5.5.2650

Exchange Server version 5.5 SP2

December 23, 1998

5.5.2448

Exchange Server version 5.5 SP1

August 5, 1998

5.5.2232

Exchange Server version 5.5

February 3, 1998

5.5.1960

Exchange Server 5.0 build numbers

Product name

Release date

Build number

Exchange Server 5.0 SP2

February 19, 1998

5.0.1460

Exchange Server 5.0 SP1

June 18, 1997

5.0.1458

Exchange Server 5.0

May 23, 1997

5.0.1457

Exchange Server 4.0 build numbers

Product name

Release date

Build number

Exchange Server 4.0 SP5

May5, 1998

4.0.996

Exchange Server 4.0 SP4

March 28, 1997

4.0.995

Exchange Server 4.0 SP3

October 29, 1996

4.0.994

Exchange Server 4.0 SP2

July 19, 1996

4.0.993

Exchange Server 4.0 SP1

May 1, 1996

4.0.838

Exchange Server 4.0 Standard Edition

June 11, 1996

4.0.837

https://technet.microsoft.com/en-us/library/hh135098(v=exchg.150).aspx

Quest Migration Manager doesn’t see the Network

From within Quest Migration Manager I was getting the following error

“the list of servers for this workgroup is not currently available”

Wins was set up and working.

But when I would turn on Network Sharing, it would just turn off again.

To make it work I had to enable the 2 following services.

  • SSDP Discovery
  • UPnP Device Host

Once these were set I could turn on Network Discovery and Quest Migration Manager was happy.

image

Creating Users from a Spreadsheet with New-ADUser

Working in my lab, I needed a script to create some AD users. Here is what I came up with.

 

 

##################### Start of script ########################
#########################################################
#########################################################
#########################################################
### Written by Don Wilwol
###
### 3-2014
### atthedatacenter.wordpress.com
###
###Creates users from a CSV file
###Just add firstname, lastname and (important) header in the input file
###
###It logs to the log file path
###It sets the SamAccountName to first initial lastname
##It sets the UPN to the SamAccountName@domain
###It sets a primary Email address as the UPN
###It sets the SIP address as the UPN
###It surpresses the errors in the shell
###to see the errors rem out $ErrorActionPreference = "SilentlyContinue"
###Creation of a user with appended suffix is logged
###The script defaults to a password of P@ssw0rd" but the line can be changed
###Change the line with this on for "first initial, last initial, !12345"
# -AccountPassword(Convertto-Securestring -AsPlaintext ($_.Firstname.SubString(0,1) + $_.lastname.SubString(0,1) + "!12345") -Force)`

$date = (get-date).toString(‘yyyy-MM-dd’)

 

##Set input file path
$CSVPath ="c:\users.csv"

##Set YOUR domain name
$DomainN = "student.Source.lab"

##Set the OU Path you would like the users created
$Path = "OU=TestUsers,DC=Source,DC=Lab"

### Set the description for this group of users
$Description = "Student Account for Some Year, Maybe 2019"

###Set the log file path
$LogFile = "C:\$date-CreateUserlogfile.txt"

#########################################################
#########################################################
#########################################################

$ErrorActionPreference = "SilentlyContinue"

 

import-csv $CSVPath | foreach {

$SamAccountname = ($_.Firstname.SubString(0,1) + $_.lastname)
If(get-ADUser $SamAccountname) {$SamAccountname = $SamAccountname + "2";write-output "**Secondary SamAccountName**  $SamAccountName" >> $LogFile}
if(get-ADUser $SamAccountname) {$SamAccountname = $_.Firstname.SubString(0,1) + $_.lastname + "3";write-output "**3rd SamAccountName** $SamAccountName" >> $LogFile}
if(get-ADUser $SamAccountname) {$SamAccountname = $_.Firstname.SubString(0,1) + $_.lastname + "4";write-output "**4th SamAccountName** $SamAccountName" >> $LogFile}
if(get-ADUser $SamAccountname) {$SamAccountname = $_.Firstname.SubString(0,1) + $_.lastname + "5";write-output "**5th SamAccountName** $SamAccountName" >> $LogFile}
if(get-ADUser $SamAccountname) {$SamAccountname = $_.Firstname.SubString(0,1) + $_.lastname + "6";write-output "**6th SamAccountName** $SamAccountName" >> $LogFile}
if(get-ADUser $SamAccountname) {$SamAccountname = $_.Firstname.SubString(0,1) + $_.lastname + "7";write-output "**7th SamAccountName** $SamAccountName" >> $LogFile}
if(get-ADUser $SamAccountname) {$SamAccountname = $_.Firstname.SubString(0,1) + $_.lastname + "8";write-output "**8th SamAccountName** $SamAccountName" >> $LogFile}

 

$error.clear()
$UPN = $SamAccountname + "@$DomainN"
$Dname = ($_.Firstname + " " + $_.lastname)
new-aduser -Path $Path `
-Name $Dname -GivenName $_.Firstname`
-Surname $_.Lastname`
-AccountPassword(Convertto-Securestring -AsPlaintext "P@ssw0rd" -Force)`
-enabled $true `
-EmailAddress $UPN `
-SamAccountname $SamAccountname  `
-Description $Description `
-DisplayName $Dname `
-ChangePasswordAtLogon $True
write-host   ("Creating User (" + $SamAccountname + ")  " + $_.Firstname + " " + $_.lastname)
write-output "" >> $LogFile
write-output ("Creating User (" + $SamAccountname + ")  " + $_.Firstname + " " + $_.lastname) $error >> $LogFile
write-output "" >> $LogFile 

Set-Aduser -Identity $SamAccountname -Add @{userPrincipalName = $UPN;`
proxyAddresses = "SMTP:$UPN","SIP;$UPN";`
}
}

##################### End of script ########################

 

The spreadsheet is a very simple format.

firstname,lastname

Joe,Somebody

Harry,Helper

Fred,Flinstone