Manage users and assigned subscription information on the Office365

Source: Internet
Author: User

Manage users and assigned subscription information on the Office365

When it comes to Office365 users, we know that there are two types, one is the global administrative user of online created on Office365, the other is a user who synchronizes the local ad user to online with the dirsync tool. Whether it's a user created online or a user on-premises to online, how we manage user information, how we manage the subscriptions that our users assign, we all know that if you sync your on-premises AD users to online, And for local ad users to be able to use the corresponding service on online, we need to assign the relevant subscription service to the user. So let's talk about how to manage the online users and the assigned subscription information and export related information; there are two ways to manage it, one for the portal page, the other for PowerShell, and, of course, for all products, Using the command line to view information is always easier and more detailed than using PowerShell to view the information, for example, take the user information on the Office365 described today, if you use the portal to view the words can not be exported, can only view the list, Of course, using PowerShell to see the words can be viewed in detail, and can be exported, so PowerShell is relatively convenient, of course, PowerShell is also divided into two types, one is the local PowerShell, one is the azure Module tool Powerhell, use a little difference, we will be detailed introduction, see below:

Let's start by using the portal to view the user list information on online:

650) this.width=650; "title=" clip_image002 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image002" src= "http://s3.51cto.com/wyfs02/M01/77/D7/wKioL1ZvnNjSLOOCAACFQX1FBd0632.jpg" height= "302"/>

If you want to see the user's assigned subscription, we need to look at it, it is inconvenient to use.

650) this.width=650; "title=" clip_image004 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image004" src= "http://s3.51cto.com/wyfs02/M01/77/D7/wKioL1ZvnNmg_250AABah5HZoJM610.jpg" height= "/>"

650) this.width=650; "title=" clip_image006 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image006" src= "http://s3.51cto.com/wyfs02/M02/77/D7/wKioL1ZvnNqAF5BMAABZgRwzuc0815.jpg" height= "229"/>

If you use PowerShell to see, then it is not so laborious, can be very intuitive to view the relevant information; we need to download the relevant Azure Powerhell module tool for connection viewing before viewing;

Before we do this, let's take a look at the management rules on online and see if those users can assign licenses

https://support.office.com/zh-cn/article/%e5%88%86%e9%85%8d%e6%88%96%e5%8f%96%e6%b6%88%e5%88%86%e9%85% 8d-office-365-%e5%95%86%e4%b8%9a%e7%89%88%e9%80%82%e7%94%a8%e7%9a%84%e8%ae%b8%e5%8f%af%e8%af% 81-997596b5-4173-4627-b915-36abac6786dc? Correlationid=3974992c-890d-43d2-b0b8-8a626e77edbc&ui=zh-cn&rs=zh-cn&ad=cn

650) this.width=650; "title=" clip_image008 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image008" src= "http://s3.51cto.com/wyfs02/M00/77/D8/wKiom1ZvnNTTALo0AADdoiLY7I8983.jpg" height= "434"/>

After understanding, we need to know clearly if you use the local Powersell to connect to online and then manage users of the online user Exchange service,

The specific connection method can refer to

Note: After you connect to Office365 with local PowerShell, only the Exchange services on online can be managed.

2.1 Open the Local level calculation on Windows PowerShell, run the following command

Set-executionpolicy remotesigned Allow signature

650) this.width=650; "title=" clip_image010 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image010" src= "http://s3.51cto.com/wyfs02/M01/77/D8/wKiom1ZvnNeCZH4-AAEBrULfUEo187.jpg" height= "317"/>

$UserCredential = get-credential

In the Windows PowerShell Credential Request dialog box, type your Office 365 user name and password, and then click OK

650) this.width=650; "title=" clip_image012 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image012" src= "http://s3.51cto.com/wyfs02/M02/77/D7/wKioL1ZvnODzqxmkAAGITPBrQ6g755.jpg" height= "384"/>

2.2

$Session = New-pssession-configurationname Microsoft.exchange-connectionuri https://outlook.office365.com/ Powershell-liveid/-credential $UserCredential-authentication basic-allowredirection

If you are a Chinese Office 365 customer operating by century interconnect, use the following values for the connectionuri parameter: Https://partner.outlook.cn/PowerShell.

Because our environment is a century-interconnected

$Session = New-pssession-configurationname Microsoft.exchange-connectionuri https://partner.outlook.cn/ Powershell-liveid/-credential $UserCredential-authentication basic-allowredirection

650) this.width=650; "title=" clip_image014 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image014" src= "http://s3.51cto.com/wyfs02/M02/77/D8/wKiom1ZvnNyh8X3-AAHgb6iwXuo355.jpg" height= "464"/>

2.3

Import-pssession $Session

650) this.width=650; "title=" clip_image016 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image016" src= "http://s3.51cto.com/wyfs02/M00/77/D8/wKiom1ZvnN-wAVGcAAHyB_766L0376.jpg" height= "577"/>

Connection Successful

650) this.width=650; "title=" clip_image018 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image018" src= "http://s3.51cto.com/wyfs02/M01/77/D7/wKioL1ZvnOvCQwefAAL7_swrbig500.jpg" height= "570"/>

2.4

After the final operation is complete, we can use the following command to complete the disconnection of the remote PowerShell session link

Remove-pssession $Session

2.5

Confirm that the link is successful

Get-mailbox

650) this.width=650; "title=" clip_image020 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image020" src= "http://s3.51cto.com/wyfs02/M01/77/D8/wKiom1ZvnOfgmErbAAMFsj74QkU984.jpg" height= "573"/>

Once the connection is successful, all Exchange users and services on the Office365 can be managed. Specifically, not much to say.

If you want to manage users and services online, we need to download the PowerShell for Azure module separately, see below:

https://community.office365.com/zh-cn/f/835/p/269827/824743

650) this.width=650; "title=" clip_image022 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image022" src= "http://s3.51cto.com/wyfs02/M00/77/D7/wKioL1ZvnPDwu0xyAAB3PSzm3wg232.jpg" height= "199"/>

So we follow the prompts to download the required tools

http://www.microsoft.com/en-us/download/details.aspx?id=28177

Http://technet.microsoft.com/library/jj151815.aspx

650) this.width=650; "title=" clip_image024 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image024" src= "http://s3.51cto.com/wyfs02/M01/77/D7/wKioL1ZvnPGwl5TLAADW63Wgmbs613.jpg" height= "513"/>

Https://technet.microsoft.com/library/jj151815.aspx

After installation, we need to right-click to run Azure AD Module for Windows PowerShell as an administrator.

1. In the PowerShell command line interface, enter "connect-msolservice" and press ENTER to enter your username and password as admin in the dialog box that pops up.

2. After successful connection, enter "Get-msoluser | Export-csv <path>\user.csv"To export the list of all Office 365 users to Local. (e.g. Get-msoluser | Export-csv C:\Users\user.csv)

650) this.width=650; "title=" clip_image026 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image026" src= "http://s3.51cto.com/wyfs02/M02/77/D7/wKioL1ZvnPSwse7iAAD2XQHjFWk394.jpg" height= "505"/>

650) this.width=650; "title=" clip_image028 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image028" src= "http://s3.51cto.com/wyfs02/M00/77/D8/wKiom1ZvnPDDjDVkAAIlDjKWGTI318.jpg" height= "519"/>

We enter

Connect-msolservice

Then follow the prompts to enter office365 or Azure's central administration information to verify and log in

650) this.width=650; "title=" clip_image030 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image030" src= "http://s3.51cto.com/wyfs02/M00/77/D7/wKioL1ZvnPmTTaRvAAD1EsxQAh0616.jpg" height= "448"/>

Get-msoluser

You can view all users on the current office365

650) this.width=650; "title=" clip_image032 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image032" src= "http://s3.51cto.com/wyfs02/M01/77/D8/wKiom1ZvnPSApdcNAAECzfqHhbc351.jpg" height= "444"/>

We need to see the details, so we have to add the parameters

Get-msoluser | FL >c:\msoluser.txt

650) this.width=650; "title=" clip_image034 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image034" src= "http://s3.51cto.com/wyfs02/M01/77/D7/wKioL1ZvnPzxGs_fAAEBMSeLA1U470.jpg" height= "433"/>

When we come around, we can check

650) this.width=650; "title=" clip_image036 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image036" src= "http://s3.51cto.com/wyfs02/M01/77/D8/wKiom1ZvnPjTn1XtAAGeK_MpWQI324.jpg" height= "627"/>

We can add parameter filtering information

Get-msoluser | FL displayname,proxyaddresses,signiname,usertype,licenses

650) this.width=650; "title=" clip_image038 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image038" src= "http://s3.51cto.com/wyfs02/M00/77/D8/wKiom1ZvnPqSdgZPAAFi_N3Iefw257.jpg" height= "/>"

We typically place the information we need in a CSV format

Get-msoluser | Export-csv C:\msoluser.csv

650) this.width=650; "title=" clip_image040 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image040" src= "Http://s3.51cto.com/wyfs02/M02/77/D8/wKiom1ZvnPyxHKutAABoODtSLNQ614.jpg" height= "109"/>

650) this.width=650; "title=" clip_image042 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image042" src= "http://s3.51cto.com/wyfs02/M00/77/D7/wKioL1ZvnQfyFBS_AAMHaxk8l9k958.jpg" height= "502"/>

We found that the user's detailed assignment subscription information could not be exported

The user information we need to see is whether the user is assigned Exchange online, Skype for business, or a SharePoint subscription

1. List all the Administrators

Get-msoluser | Select userPrincipalName | Foreach-object {$admin =get-msoluserrole-userprincipalname $_.userprincipalname; if ($admin. Name-ne $null) { Write-host $_.userprincipalname, ">", $admin. Name}}

Note: office365 cannot view the detailed administrator; The following command will show all administrator information; and the results cannot be exported.

650) this.width=650; "title=" clip_image044 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image044" src= "http://s3.51cto.com/wyfs02/M01/77/D7/wKioL1ZvnQiCh4yFAAC13uQ6SpY456.jpg" height= "209"/>

2, the personnel, whether to assign license export to CSV re-filter,

Get-msoluser | FL displayname,licenses > D:\test01.txt

can display online users and assigned subscription information

650) this.width=650; "title=" clip_image046 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image046" src= "http://s3.51cto.com/wyfs02/M01/77/D7/wKioL1ZvnQvxRFVYAAES9pO4h4U559.jpg" height= "398"/>

3.

Get-msoluser | Select Displayname,islicensed | Export-csv D:\test02.csv-Encoding UTF8

The result is true if license is assigned, FALSE is not assigned licenses

650) this.width=650; "title=" clip_image048 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image048" src= "http://s3.51cto.com/wyfs02/M02/77/D7/wKioL1ZvnQyAtUxTAACpOpHa27g739.jpg" height= "258"/>

So that we use PowerShell to assign subscriptions to the specified user

$user = get-msoluser-userprincipalname [email protected] $user. licenses[0].servicestatus second, what you need to explain is that the output

A user's license information can be implemented, the output of multiple user information will need to execute this command more than once, as to say other extension commands, such as one-time input of multiple users of information and output information exported to the local save, need other knowledge, the problem is beyond our technical support scope. You can refer to Microsoft Technical Support website: https://support.microsoft.com/zh-cn/allproducts, or Microsoft Official forum: https://community.office365.com/en-us/

If you have any other questions, please feel free to contact me.

650) this.width=650; "title=" clip_image050 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image050" src= "http://s3.51cto.com/wyfs02/M01/77/D8/wKiom1ZvnQvyvoZqAADgsvr9CVo412.jpg" height= "244"/>

$user = get-msoluser-userprincipalname [email protected] $user. licenses[0].servicestatus

650) this.width=650; "title=" clip_image052 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image052" src= "http://s3.51cto.com/wyfs02/M00/77/D7/wKioL1ZvnRTjdKcUAACtRQmJwpM187.jpg" height= "251"/>

650) this.width=650; "title=" clip_image054 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;margin:0px;padding-right:0px; "border=" 0 "alt = "clip_image054" src= "http://s3.51cto.com/wyfs02/M00/77/D7/wKioL1ZvnRbQvieGAADmnVFDdqg073.jpg" height= "462"/>

$user = get-msoluser-userprincipalname [email protected] $user. licenses[0].servicestatus

650) this.width=650; "title=" clip_image056 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px, "border=" 0 "alt=" clip_ image056 "src=" http://s3.51cto.com/wyfs02/M01/77/D7/wKioL1ZvnW-z34UGAAC8d4qwjHM881.jpg "height=" 257 "/>

This article from "Gao Wenrong" blog, declined reprint!

Manage users and assigned subscription information on the Office365

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.