Office 365 administrator တယောက်အနေနဲ့ တချို့ information တွေကို ကြည့်ချင်တဲ့အခါ web portal ကနေ ကြည့်ရတာ အဆင်မပြေပါဘူး။
ဒီတော့ powershell ကိုပဲ သုံးကြည့်ရတာပါပဲ။
အောက်မှာတော့ ကျတော် လေ့လာပြီးသလောက် user list, license list, mailbox list စတဲ့ powershell command တွေ စုပေးထားပါတယ်။
Display a list of office 365 Global Administrators
PowerShell command syntax: Get-MsolRoleMember –RoleObjectId
ဥပမာအနေနဲ့ :Get-MsolRoleMember -RoleObjectId “Power Administrator”.ObjectId | Select DisplayName,EmailAddress
Display Different type of recipients with a specific Domain name (Domain တစ်ခုထက်ပိုပြီး Admininstering လုပ်ရတဲ့ Admin တွေအတွက်ပါ။)
Users UPN with a specific domain name suffix
PowerShell command syntax: Get-MsolUser –DomainName
ဥပမာအနေနဲ့ : Get-MsolUser -DomainName ictformyanmar.com | ft -Property UserPrincipalName
Display a list of user from a specific department
PowerShell command syntax: Get-msoluser | Where {$_.Department -eq "
ဥပမာအနေနဲ့ : Get-msoluser | Where {$_.Department -eq "Mrkt"}
Display list of services assigned to user
PowerShell command syntax: Get-msoluser -all | ForEach-Object { "============="; $_.DisplayName; $_.licenses[0].servicestatus }
Display list of users and their currently License
PowerShell command syntax: Get-MsolUser | Where-Object {$_.isLicensed -eq "TRUE"} | select Displayname, Licenses
Export list of users and their currently License to a file
PowerShell command syntax: Get-MsolUser | Where-Object {$_.isLicensed -eq "TRUE"} | select Displayname, Licenses < Path & File Name>
ဥပမာအနေနဲ့ : Get-MsolUser | Where-Object {$_.isLicensed -eq "TRUE"} | select Displayname, Licenses > c:\temp folder\Licenses.txt
Export information about office 365 users mailbox to CSV file
PowerShell command syntax: Export list of all Mailboxes Get-mailbox | Export-Csv < Path & File Name>
ဥပမာအနေနဲ့ : Get-mailbox | Export-Csv c:\temp folder\allmailboxes.csv
Export list of all office 365 users
PowerShell command syntax: Get-MsolUser | select DisplayName,FirstName,LastName,UserPrincipalName,MobilePhone,PhoneNumber,Office,Fax,StreetAddress,PostalCode,City,Country,State,Department, IsLicensed ,PreferredLanguage , Title , UsageLocation | Export-Csv < Path & File Name>
ဥပမာအနေနဲ့ : Get-MsolUser | select DisplayName,FirstName,LastName,UserPrincipalName,MobilePhone,PhoneNumber,Office,Fax,StreetAddress,PostalCode,City,Country,State,Department, IsLicensed ,PreferredLanguage , Title , UsageLocation | Export-Csv c:\temp folder\allmailboxesusage.csv
Export list of all office 365 users with License
PowerShell command syntax: Get-MsolUser | Where-Object {$_.isLicensed -eq "TRUE"} | Export-Csv < Path & File Name>
ဥပမာအနေနဲ့ Get-MsolUser | Where-Object {$_.isLicensed -eq "TRUE"} | Export-Csv c:\temp folder\userslicenses.csv
Export list of all office 365 users without License
PowerShell command syntax: Get-MsolUser -UnlicensedUsersOnly | Export-Csv < Path & File Name>
ဥပမာအနေနဲ့ : Get-MsolUser -UnlicensedUsersOnly | Export-Csv c:\temp folder\userswithoutlicense.csv
Export list of all Distribution Groups
PowerShell command syntax: Get-DistributionGroup | Export-Csv < Path & File Name>
ဥပမာအနေနဲ့ : Get-DistributionGroup | Export-Csv c:\temp folder\listofdg.csv
အချိန်ရရင် နောက်ထပ် exchange online နဲ့ပတ်သက်တဲ့ powershell command တွေ ရေးပါအုံးမယ်။
ပျော်ရွှင်ပါစေဗျာ။
(Be knowledgeable, pass it on then)
Hi mate. Nice blog. I just stumble upon your blog from google.
ReplyDeleteDo you know how to recover deleted contacts/contact group from Public Folder in Office 365 (Exchange Online) Wave 15 version?
Cheers.
Tet
Hi Tet,
ReplyDeleteI believe you lost contact folder from Public Folder.
Run the following command in PS to get the list of folders not in the tree
Get-PublicFolder –Identity “\NON_IPM_SUBTREE” –Recurse | SELECT Identity
I think you definitely know what you need to do after running this command.
Thanks.