Stop User Profile Synchronization service Or User Profile Synchronization service stuck on Starting or Stopping
Follow below script when User Profile Synchronization service stuck on Starting or Stopping:
Add-PSSnapin Microsoft.SharePoint.Powershell
$TypeName = “User Profile Synchronization Service”
$ServerName = “SERVERNAME” #Replace with your server name where the service is stuck on Starting
$Serviceinstance = Get-SPServiceInstance | where-object {$_.TypeName -eq $TypeName -and $_.Server.Address -eq $ServerName}
$Serviceinstance.Unprovision()
Read-Host -Prompt “Press Enter to exit”
Or
Get-SPServiceInstance | Where-Object {$_.TypeName -eq ‘User Profile Synchronization Service’} Stop-SPServiceInstance GUID