共用方式為


Remove-SPOUser

從網站集合或群組移除使用者或安全性群組。

語法

Default (預設值)

Remove-SPOUser
    -Site <SpoSitePipeBind>
    -LoginName <String>
    [-Group <String>]
    [<CommonParameters>]

Description

您必須至少是 SharePoint Online 系統管理員,而且必須是網站集合管理員,才能執行 Cmdlet Remove-SPOUser

如需有關適用於 SharePoint Online 的 Windows PowerShell 權限和最新資訊,請參閱位於 SharePoint Online Management Shell 簡介的線上文件。

範例

Remove-SPOUser -Site https://contoso.sharepoint.com/sites/sc1 -LoginName joe.healy@contoso.com -Group "SC1 Owners"

此範例會從網站集合中的SC1擁有者群組中移除具有電子郵件地址 joe.healy@contoso.com 的使用者 https://contoso.sharepoint.com/sites/sc1.

參數

-Group

適用:SharePoint Online

指定要移除使用者的群組。 若未指定,此 Cmdlet 將會從所有群組移除該使用者。

參數屬性

類型:System.String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:False
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-LoginName

適用:SharePoint Online

指定使用者名稱。

參數屬性

類型:System.String
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

-Site

適用:SharePoint Online

指定要移除使用者的網站集合。

參數屬性

類型:Microsoft.Online.SharePoint.PowerShell.SpoSitePipeBind
預設值:None
支援萬用字元:False
不要顯示:False

參數集

(All)
Position:Named
必要:True
來自管線的值:False
來自管線按屬性名稱的值:False
來自剩餘引數的值:False

CommonParameters

此 Cmdlet 支援一般參數:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 如需詳細資訊,請參閱 about_CommonParameters