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

Wednesday, February 26, 2014

Understanding SQL Server Page Sizes

Dear Readers

I'm not going to claim this article as my own since it isnt! :)

Nevertheless, for those of you that want to know the intricate details behind the Microsoft SQL Server page sizes, I have found an excellent article:

http://www.sqlskills.com/blogs/paul/inside-the-storage-engine-anatomy-of-a-page/

Happy coding and have a great day!

Hermann


Thursday, February 20, 2014

The power of association

Dear readers

This post (unfortunately ;) ) has nothing to do with programming; however I thought it worth sharing since it can speak to many of us and deals with being successful (which I sincerely hope that many of my readers want to be!).

Here it is:

The Power of Association is too real: The less you associate with some people, the more your life will improve. Any time you tolerate mediocrity in others, it increases your mediocrity. An important attribute in successful people is their impatience with negative thinking and negative acting people. As you grow, your associates will change. Some of your friends will not want you to go on. They will want you to stay where they are. Friends that don't help you climb will want you to crawl. Your friends will stretch your vision or choke your dream. Those that don't increase you will eventually decrease you.

Consider this: Never receive counsel from unproductive people. Never discuss your problems with someone incapable of contributing to the solution, because those who never succeed themselves are always first to tell you how. Not everyone has a right to speak into your life. You are certain to get the worst of the bargain when you exchange ideas with the wrong person. Don't follow anyone who is not going anywhere and most importantly, don’t follow anyone who is running away from your life. With some people you spend an evening: with others you invest it. Be careful where you stop to inquire for directions along the road of life. Wise is the person who fortifies his life with the right friendships. If you run with wolves, you will learn how to howl, but if you associate with eagles, you will learn how to soar to great heights.

"A mirror reflects a man's face, but what he is really like is shown by the kind of friends he chooses." The simple but true fact of life is that you become like those with whom you closely associate - for the good and the bad. Note: Be not mistaken. This is applicable to family as well as friends. 

“When I compliment you, I compliment myself, because I am who I associate with.”
~ Jarod Kintz

Tuesday, February 18, 2014

Macro for batch converting in Excel

Hi folks

Today I needed to batch convert over a hundred Excel file from the old extension (.xls) to the new extension (.xlsx). By far the easiest way was to record a macro while doing one file and then adapting the code to run for all the files in the specific directory.

Here follows the code:

Happy coding!

Hermann

Tuesday, February 4, 2014

Microsoft File Transfer Manager not working

Morning everyone

I just want to mention a quick workaround for an issue with Microsoft File Transfer Manager not working in IE11 (please also note that it seems to not be working in any 64-bit browser from Microsoft).

For IE11, press F12 to bring up the developer console and then scroll down on the left to get to the Emulation console. From here choose the Document Mode 9 and the Internet Explorer 9 as the User agent string. Your Microsoft subscription page will then reload and once this has finished, try to download the file again. This time, FTM should pop up.

Good luck. Sorry for the short post without explaining the reasons behind the issues. No time today :)

Happy coding!

Hermann