- Add-PSSnapin "microsoft.Sharepoint.Powershell"
- $webservice = [System.Type]::GetType("Microsoft.SharePoint.Administration.SPIisWebServiceSettings, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c")$Instance = $webservice::Default$Method = $webservice.GetMethod("ProvisionLocal", "Instance, NonPublic", $null, @(), $null)
- $instance = $webservice::Default
- $method = $webservice.GetMethod("ProvisionLocal", "instance, NonPublic", $null, @(), $null)
- $method.invoke($instance, $null)
- $method = $webservice.GetMethod("Provision", "instance, Public", $null, @(), $null)
- $method.invoke($instance, $null)
This code snippet for Security Token Service Could Not be Activated in SharePoint