PowerShell Tip #13 - Get Application Pool status remotely

by rahul 6/6/2013 3:23:00 PM
If you are in charge of an IIS server, one of the common issues you would have noticed is “Service Unavailable”. This is an outcome if the Application Pool is disabled, OR it crashed multiple times [default setting is 5 times in 5 minutes. It means, if your application pool has crashed 5 times in 5 ... [More]


Logparser Scenario 10:Find out the count of an Event Log on a daily basis

by rahul 5/28/2013 6:47:21 PM
This post is a continuation of this article. Scenario 10: What if you see a specific Event log entry and want to check on which date it is happening? Is it happening every day, weekly, or what? The following script can help you get that information. Answer: LogParser "select Quantize(TimeWri... [More]


Windows Phone - Play a music in the background across pages

by rahul 4/5/2013 11:42:23 PM
Developing for Windows Phone can be fun and rewarding at the same time. While working on Kidculator, I thought it would be better to have an app with a modern UI and some music playing in the background. I found two minor roadblocks which I would like to share with you today [in case you get stuck t... [More]


PowerShell Tip #12 - Create a file with time stamp

by rahul 3/13/2013 2:22:47 PM
While working with PowerShell scripts, quite frequently you may find a need to create a file to store information. The following lines can help you in creating a file name with TimeStamp. "MyLogFile-$(get-date -uformat '%Y-%m-%d-%H-%M-%S-%p').log" The output is something like... ... [More]


PowerShell Tip #11 - Restart a service on a bunch of servers from a PowerShell script

by rahul 2/14/2013 11:56:03 AM
Restarting a service is not fun. Especially if you have to do it every now and then for "that" service which is giving you a lot of headache. Since services do not have an automatic recycle option out of the box... you may like to use the following PowerShell script to make your life easie... [More]


Smart Dialer for Windows Phone - Update

by rahul 1/26/2013 5:39:20 AM
Smart Dialer is the best dialer you would find for Windows Phone. Ok... ok... ok... that was such a cheap and common pitch! May be it is not the best dialer! But for what it is worth, here are some of its features and what you can do with it. If you like these, give it a shot and download it on your... [More]


Some wallpapers for you - Black is Black!

by rahul 1/22/2013 6:22:07 AM
I like wallpapers that are black, so I made a few. Perhaps, black with a little text and graphics is less boring than total black . If you like it, feel free to share. Probably, I will add more to this post as it time goes by.   Cheers, Rahul   Quote of the da... [More]


PowerShell Tip #10 - Read ExitCode from C# for a PowerShell script

by rahul 12/26/2012 11:56:26 AM
The requirement is that you need to set an ExitCode in your PowerShell script and act appropriately in C# code. Sounds quite simple initially, but it is a little bit tricky. Here is how to achieve this. Part 1: Modify your PowerShell code try { Your PowerShell Code here $host.SetShouldEx... [More]


PowerShell Tip #9 - Pass parameters correctly to a function and create a file with usefull functions

by rahul 12/18/2012 4:04:22 PM
You may want to keep your reusable functions organized. I keep a file called common.ps1 with my most used functions. This way, my new more focused scripts don't look cryptic while reading. function DoSomething([int]$x, [int]$y, [string]$Operation) { if($Operation -eq "+") { ... [More]


PowerShell Tip #8 - Create a function to log information

by rahul 12/17/2012 1:56:46 PM
This one is a no-brainer. Yet, I am posting it for the newbies. If you want to log some information throughout your PowerShell code, you can use this function. It should make your job a bit easier. $Log="FULL_FILE_PATH" function AddToLog($Message) { $Now = (Get-Date).ToString() ... [More]


Rahul Soni

Rahul Soni  Twitter

 LinkedIn

 Facebook

 Email me



Vivek Kumbhar

Vivek Kumbhar  Twitter

 LinkedIn

 Facebook

 Email me


Stack Exchange

profile for Vivek at Server Fault, Q&A for system administrators and IT professionals

profile for Rahul Soni at Stack Overflow, Q&A for professional and enthusiast programmers

Calendar

<<  June 2013  >>
MoTuWeThFrSaSu
272829303112
3456789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

All Items
Sign in

Visit Microsoft's Site

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2013, Rahul Soni

Powered by BlogEngine.NET 1.4.5.0