Showing posts with label PowerShell. Show all posts
Showing posts with label PowerShell. Show all posts

Sunday, April 19, 2015

Service Token Failure In SharePoint 2013 Farm

Service Token Failure


--





cls
 
 
# This command loads the Microsoft.SharePoint.PowerShell DLL.

# This DLL is required if you are using Windows PowerShell.
 
 
[string]$Snapin="Microsoft.SharePoint.PowerShell"

if ((Get-PSSnapin $Snapin -ErrorAction SilentlyContinue) -eq $null)



{
 
Write-Host "Loading Snapin: $Snapin";

Add-PSSnapin $Snapin



}
 
else
 
 
{
 
Write-Host "Snapin already loaded: $Snapin";



}
 
$h = Get-SPServiceHostconfig




 
$h.Provision()




 
$services = Get-SPServiceApplication




 
foreach ($service in $services) { $service.provision();

write-host $service.name}



Monday, March 09, 2015

Start Central Administration Via PowerShell

Start the Central Administration via PowerShell

To list the Central Admin list in Farm

Get-SPServiceInstance | Where-Object {$_.TypeName –eq ‘Central Administration’}


 following code will start the Central Admin if its not started, if its started and online already it will show you a warning message.

cls
# This command loads the Microsoft.SharePoint.PowerShell DLL.
# This DLL is required if you are using Windows PowerShell.
[string]$Snapin="Microsoft.SharePoint.PowerShell"
if ((Get-PSSnapin $Snapin -ErrorAction SilentlyContinue) -eq $null)
{
Write-Host "Loading Snapin: $Snapin";
Add-PSSnapin $Snapin
}
else
{
Write-Host "Snapin already loaded: $Snapin";
}

Get-SPServiceInstance | Where-Object {$_.TypeName –eq ‘Central Administration’} | Start-SPServiceInstance

Hope this helps.  

ASP.NET MVC - Sport Facility Booking system

  The project relies on some external service providers. Thus accessing them via their API requires authentication. An API Key need to be su...