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

แก้ไข "ไม่มีการเชื่อมต่อ ใช้ Connect-SPOService ก่อนที่จะเรียกใช้ CmdLet นี้" เกิดข้อผิดพลาดใน SharePoint Online PowerShell!


ปัญหา: ได้รับข้อผิดพลาดนี้ “ไม่มีการเชื่อมต่อ ใช้ Connect-SPOService ก่อนที่จะเรียกใช้ CmdLet นี้” ในขณะที่พยายามเชื่อมต่อ SharePoint Online ผ่าน PowerShell ผ่าน SharePoint Online Management Shell

สารละลาย:

คุณต้องเชื่อมต่อกับ SharePoint Online Service โดยใช้ Connect-SPOService PowerShell cmdlet ก่อนที่จะดำเนินการ cmdlet อื่นๆ สำหรับ SharePoint Online


#Step: 1: Connect to SharePoint Online
Connect-SPOService -url "https://Crescent-admin.sharepoint.com"

#Step 2: Run Cmdlet for SharePoint Online
Get-SPOUser -Site "https://Crescent.sharepoint.com/sites/marketing"

ในการรัน Connect-SPOService cmdlet คุณจะได้รับแจ้งให้ป้อนข้อมูลประจำตัว เมื่อการเชื่อมต่อสำเร็จ คุณสามารถดำเนินการเรียกใช้ cmdlets ที่ต้องการได้ อย่าลืมแทนที่ URL ผู้ดูแลระบบของผู้เช่า “https://Crescent-admin.sharepoint.com” ด้วย “https://YOURDOMAIN-admin.sharepoint.com”

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