การใช้ Powershell เข้า Office 365 (Exchage Online)


สามารถใข้ power shell ต่อไป Office 365 ( Exchange Online) ได้โดย Windows 8.1 , 10

Run > พิมพ์ PowerShell    จากนั้น คลิ๊ก ขวา ให้ Run as Administrator



จะได้หน้าจอสีน้ำเงินขึ้นมา
จากนั้นพิมพ์ $Cred = Get-Credential


จะมีหน้าจอให้ login   ให้ใส่ Office 365 Account ที่เป็น admin 


จากนั้น
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://ps.outlook.com/powershell -Credential $cred -Authentication Basic –AllowRedirection

ต่อด้วย
Import-PSSession $s


ต่อสำเร็จให้ลอง พิมพ์  Get-mailbox      ถ้าได้แสดงว่าต่อสำเร็จแล้ว

ถ้าจะออก ก็  พิมพ์  Remove-PSSession $s




Get-Mailbox -Identity "xxx@xxxx"| Select-Object *
Get-MailboxStatistics -Identity "xxxxx@xxxxx"| Select-Object *
Get-LogonStatistics -Identity "xxxxxx" | Select-Object *

Comments

Popular posts from this blog

โดนเอาเลขบัตรเครติดไปใช้ออนไลน์

แนะนำเว็บไซต์ Thaiwaterpump.com