The above script will deactivate feature in sitecollection or site level based on the URL provided.
But in both the cases while running the script it will prompt an Confirm alert.
Confirm
Are you sure you want to perform this action?
Performing operation "Disable-SPFeature" on Target "Farm Scope |ff48f7e6-2fa1-428d-9a15-ab154762043d". [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
To avoid the above confirm alert Run the below script to deactivate the feature without confirm alert.
Abhishek SahayPosted May 18, 2016, 8:12 AM
https://abhisheksahayblog.wordpress.com/2016/04/18/method-to-disable-spo-features-using-csom/
Kumaresh RajalingamPosted Feb 14, 2016, 5:13 AM
Nice share