how connect in sharepoint management shell of 1 site only without an access in https://org-admin.sharepoint.com, I have an site collection admin in 1 site of this sharepoint and i need to connect it in sharepoint management shell to remove content type under in _Hidden Group thanks.
0
Yes, you could do that.
Demo PowerShell code for your reference:
$adminUPN="xxx@xxx.onmicrosoft.com"
$userCredential = Get-Credential -UserName $adminUPN -Message "xxx"
Connect-PnPOnline -Url https://xxx.sharepoint.com/sites/wendy -Credentials $userCredential
#Get content type from _Hidden group
Get-PnPContentType|? { $_.Group -eq '_Hidden' }
#remove "ContentType1" content type
Remove-PnPContentType -Identity "ContentType1" -Force
Get-PnPContentType|? { $_.Group -eq '_Hidden' }
Note: $adminUPN could be just the site collection administrator of site collection, in my test, it could work well.