ค้นหาเว็บไซต์

จัดการกล่องจดหมายของห้องโดยใช้ PowerShell | ออฟฟิศ 365


ในบทความปัจจุบัน เราจะทบทวนวิธีใช้คำสั่ง PowerShell สำหรับจัดการกล่องจดหมายของห้องในสภาพแวดล้อม Exchange Online

เชื่อมต่อกับ Exchange Online PowerShell

เพื่อให้สามารถเรียกใช้คำสั่ง PowerShell ที่ระบุในบทความปัจจุบัน คุณจะต้องเชื่อมต่อกับ Exchange Online PowerShell

เริ่ม Windows PowerShell ในฐานะผู้ดูแลระบบ และเรียกใช้ cmdlet Connect-ExchangeOnline

Connect-ExchangeOnline

กล่องจดหมายของทรัพยากร

Resource Mailbox เป็น Mailbox ชนิดพิเศษที่ใช้สำหรับการจัดการห้องประชุมและอุปกรณ์ กล่องจดหมายของทรัพยากรไม่จำเป็นต้องมีใบอนุญาต

การจัดการกล่องจดหมายของทรัพยากรสามารถนำไปใช้ได้ โดยใช้ตัวเลือกใดตัวเลือกหนึ่งต่อไปนี้:

  1. การจัดการตนเอง: กล่องจดหมายของทรัพยากรจะได้รับการกำหนดค่าสำหรับการยอมรับการเรียกประชุมโดยอัตโนมัติ (หรือปฏิเสธการเรียกประชุมหากการเรียกประชุมก่อนหน้านี้ตั้งค่าไว้แล้ว)
  2. ผู้รับมอบสิทธิ์กล่องจดหมายทรัพยากร: ผู้รับมอบสิทธิ์คือบุคคลที่จะยอมรับการเรียกประชุม และอนุมัติหรือปฏิเสธการเรียกประชุม

คำว่า “กล่องจดหมายของทรัพยากร” ประกอบด้วยกล่องจดหมายสองประเภท:

  1. ห้องกล่องจดหมาย
  2. ตู้ไปรษณีย์อุปกรณ์

มีความแตกต่างเล็กน้อยระหว่างกล่องจดหมายทรัพยากรทั้งสองประเภท แต่การใช้งานและวัตถุประสงค์ค่อนข้างคล้ายกัน (ตัวอย่างส่วนใหญ่จะเกี่ยวข้องกับกล่องจดหมายของห้อง)

1. การสร้างกล่องจดหมายของทรัพยากร

การสร้างกล่องจดหมายห้อง (ทรัพยากร)

ไวยากรณ์คำสั่ง PowerShell:

New-Mailbox -Name "<Identity>" -Room

ตัวอย่างคำสั่ง PowerShell:

New-MailBox -Name "FL ROOM1" -Room

สร้างกล่องจดหมายอุปกรณ์ใหม่

ไวยากรณ์คำสั่ง PowerShell:

New-Mailbox -Name "<Name>" -Equipment

ตัวอย่างคำสั่ง PowerShell:

New-Mailbox -Name "Projector 01" -Equipment

2. การจัดการกล่องจดหมายของห้อง

ตัวเลือกการจอง: เปิดใช้งานการจองอัตโนมัติสำหรับกล่องจดหมายของห้อง

ไวยากรณ์คำสั่ง PowerShell:

Set-CalendarProcessing "<Identity>" -AutomateProcessing AutoAccept

ตัวอย่างคำสั่ง PowerShell:

Set-CalendarProcessing "FL ROOM1" -AutomateProcessing AutoAccept

ตัวเลือกการจอง: เปิดใช้งานการจองอัตโนมัติสำหรับกล่องจดหมายทรัพยากรทั้งหมด (โหมดจำนวนมาก)

ตัวอย่างคำสั่ง PowerShell:

Get-MailBox | Where {$_.ResourceType -eq "Room"} | Set-CalendarProcessing -AutomateProcessing:AutoAccept

ตัวเลือกการจอง: กำหนดผู้รับมอบสิทธิ์ที่ได้รับอนุมัติ (ปฏิทินกล่องจดหมายของห้อง)

ไวยากรณ์คำสั่ง PowerShell:

Set-CalendarProcessing "<Identity>" -ResourceDelegates "<Identity>"

ตัวอย่างคำสั่ง PowerShell:

Set-CalendarProcessing "FL ROOM1" -ResourceDelegates "John"

กำหนดสิทธิ์การเข้าถึงแบบเต็มของผู้จัดการกล่องจดหมายของห้อง

ไวยากรณ์คำสั่ง PowerShell:

Add-MailBoxPermission "<Identity>" -User "<Identity>" -AccessRights FullAccess

ตัวอย่างคำสั่ง PowerShell:

Add-MailBoxPermission "FL ROOM1" -User "John" -AccessRights FullAccess

กำหนดผู้จัดการกล่องจดหมายของห้อง - การมอบหมายสิทธิ์ส่งเป็น

ไวยากรณ์คำสั่ง PowerShell:

Add-RecipientPermission "<Identity>" -Trustee "<Identity>" -AccessRights SendAs -Confirm:$False

ตัวอย่างคำสั่ง PowerShell:

Add-RecipientPermission "FL ROOM1" -Trustee "John" -AccessRights SendAs -Confirm:$False

ตั้งค่าการอนุญาตเริ่มต้นของปฏิทินเป็น: ตัวแก้ไขการเผยแพร่

ไวยากรณ์คำสั่ง PowerShell:

Set-MailBoxFolderPermission "<Room:\Calendar>" -User default -AccessRights PublishingEditor

ตัวอย่างคำสั่ง PowerShell:

Set-MailBoxFolderPermission "FL-ROOM1:\Calendar" -User default -AccessRights PublishingEditor

อนุญาตให้มีการประชุมที่ขัดแย้งกันเมื่อใช้ตัวเลือกการจองอัตโนมัติ

ไวยากรณ์คำสั่ง PowerShell:

Set-CalendarProcessing "<Room name>" -AllowConflicts $True

ตัวอย่างคำสั่ง PowerShell:

Set-CalendarProcessing "FL-ROOM1" -AllowConflicts $True

3. แสดงข้อมูลเกี่ยวกับกล่องจดหมายของห้อง

แสดงรายการกล่องจดหมายของห้อง

ตัวอย่างคำสั่ง PowerShell:

Get-Mailbox -Filter '(RecipientTypeDetails -eq "RoomMailBox")' | Select Name,Alias

แสดงรายการกล่องจดหมายอุปกรณ์

ตัวอย่างคำสั่ง PowerShell:

Get-Mailbox -Filter '(RecipientTypeDetails -eq "quipmentMailBox")' | Select Name,Alias

แสดงการตั้งค่าปฏิทินกล่องจดหมายของห้อง

ไวยากรณ์คำสั่ง PowerShell:

Get-Mailbox "<Identity>" | Select ResourceType,RejectMessagesFrom,RejectMessagesFromDLMembers,RejectMessagesFromSendersOrMembers,SendModerationNotifications

ตัวอย่างคำสั่ง PowerShell:

Get-Mailbox "FL ROOM1" | Select ResourceType,RejectMessagesFrom,RejectMessagesFromDLMembers,RejectMessagesFromSendersOrMembers,SendModerationNotifications

กล่องจดหมายห้องแสดง: การตั้งค่าการประมวลผลปฏิทิน

ไวยากรณ์คำสั่ง PowerShell:

Get-Mailbox "<Identity>" | Get-CalendarProcessing | FL

ตัวอย่างคำสั่ง PowerShell:

Get-Mailbox "FL ROOM1" | Get-CalendarProcessing | FL

สิทธิ์กล่องจดหมายของห้องแสดง: กลั่นกรองโดย

ไวยากรณ์คำสั่ง PowerShell:

Get-Mailbox <Room Name> | FT -Property ModerationEnabled,ModeratedBy,GrantSendOnBehalfTo -AutoSize

ตัวอย่างคำสั่ง PowerShell:

Get-Mailbox "FL ROOM1" | FT -Property ModerationEnabled,ModeratedBy,GrantSendOnBehalfTo -AutoSize

ตู้ไปรษณีย์ของห้องแสดง: การอนุญาตปฏิทิน

ไวยากรณ์คำสั่ง PowerShell:

Get-MailBoxFolderPermission <Room:\Calendar> | Select FolderName,User,AccessRights

ตัวอย่างคำสั่ง PowerShell:

Get-MailBoxFolderPermission "FL-ROOM1:\Calendar" | Select FolderName,User,AccessRights

4. การตั้งค่าทั่วไปสำหรับกล่องจดหมายของทรัพยากร

ตั้งค่าปฏิทินห้องให้แสดง 'ผู้จัด' และ 'หัวข้อ' ของการประชุม

ไวยากรณ์คำสั่ง PowerShell:

Set-CalendarProcessing <Room Name> -AddOrganizerToSubject $True -DeleteComments $False -DeleteSubject $False

ตัวอย่างคำสั่ง PowerShell:

Set-CalendarProcessing "FL ROOM1" -AddOrganizerToSubject $True -DeleteComments $False -DeleteSubject $False

ตั้งค่าปฏิทินห้องเพื่อแสดง 'รายละเอียดจำกัด'

ไวยากรณ์คำสั่ง PowerShell:

Set-MailBoxFolderPermission -AccessRights LimitedDetails <Room:\Calendar> -User default

ตัวอย่างคำสั่ง PowerShell:

Set-MailBoxFolderPermission -AccessRights LimitedDetails "FL ROOM1":\Calendar -User default

กำหนดค่าหน้าต่างการจองเป็นวัน

ไวยากรณ์คำสั่ง PowerShell:

Get-Mailbox <Room:\Calendar> | Set-CalendarProcessing -BookingWindowInDays

ตัวอย่างคำสั่ง PowerShell:

Get-MailBox "FL ROOM1" | Set-CalendarProcessing -BookingWindowInDays 200

แสดงการตั้งค่า “กรอบเวลาการจองเป็นวัน” ของกล่องจดหมายของห้อง

ไวยากรณ์คำสั่ง PowerShell:

Get-Mailbox <Room:\Calendar> | Get-CalendarProcessing | FL Identity,BookingWindowInDays

ตัวอย่างคำสั่ง PowerShell:

Get-Mailbox "FL ROOM1" | Get-CalendarProcessing | FL Identity,BookingWindowInDays

สร้างรายการห้องใหม่

ไวยากรณ์คำสั่ง PowerShell:

New-DistributionGroup -Name <Group Name> -RoomList

ตัวอย่างคำสั่ง PowerShell:

New-DistributionGroup -Name "FL ROOM1" -RoomList

5. แปลงกล่องจดหมาย

แปลงกล่องจดหมายธรรมดาเป็นกล่องจดหมายในห้อง

ไวยากรณ์คำสั่ง PowerShell:

Set-Mailbox <Identity> -Type Room

ตัวอย่างคำสั่ง PowerShell:

Set-Mailbox "John" -Type Room

แปลงกล่องจดหมายของห้องเป็นกล่องจดหมายปกติ

ไวยากรณ์คำสั่ง PowerShell:

Get-Mailbox <Room:\Calendar> | Set-Mailbox -Type Regular

ตัวอย่างคำสั่ง PowerShell:

Get-Mailbox "FL ROOM1" | Set-Mailbox -Type Regular

6. ลบกล่องจดหมายของห้อง

ซอฟท์ลบกล่องจดหมายห้อง

ไวยากรณ์คำสั่ง PowerShell:

Remove-Mailbox -Identity "<Room Identity>" -Confirm:$false

ตัวอย่างคำสั่ง PowerShell:

Remove-Mailbox -Identity "FL ROOM1" -Confirm:$false

ลบกล่องจดหมายห้องแบบนุ่มนวลจำนวนมาก

ตัวอย่างคำสั่ง PowerShell:

Get-Mailbox -Filter '(RecipientTypeDetails -eq "RoomMailBox")' -ResultSize Unlimited | Remove-Mailbox -Confirm:$false

บทความที่เกี่ยวข้อง