Thursday, March 27, 2014

Control remote services with PowerShell

Dear Readers

Have you ever become so extremely lazy that you don't even want to use RDP to logon to your server so that you can start a service on it? It might just be me then, but either way PowerShell is just a great tool for remote admin.

In order to start a service on a remote machine:

get-service -displayname *<partofservicedisplayname>* -computername <machine> | set-service -status "Running"

Obviously you can stop a service similary by setting the status to "Stopped". Please note that you can also use parameters like -name (name of service).

Also please note that the "start-service" cmdlet will try to start the service on your local machine. The set-service cmdlet seemed to have done the trick for me.


Enjoy!


Hermann

Monday, March 10, 2014

Microsoft.SharePoint dll location (SharePoint 2013)

Hi folks

Just FYI, the location for the Microsoft.SharePoint dll (that you need for development purposes) is located at C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\ISAPI
on the server where SharePoint is installed.

Regards

Hermann

Use SharePoint PowerShell to find out your web's template

Good morning, readers!

By far the easiest way (in my experience) to do this is to use the following code:


This might return a template code that is not self-explanatory. In that case, please reference the excellent guide at: http://www.sharepointcolumn.com/sharepoint-2013-webtemplates/

Happy coding!

Hermann