My Software Notes

Useful things I discover

Archive for April 2012

ApplicationPoolIdentity where are you?

leave a comment »

ApplicationPoolIdentity is the default username you see assigned to an application pool in IIS 7.x. The only trouble with it is that Windows can’t find it when you try to assign permissions to it, such as when you want to read some files in a folder outside of your website.

Open up the Properties dialog on a folder or file and try to add ApplicationPoolIdentity to the user list on the Security tab.  Ain’t gonna happen, Windows can’t find it.

But do not despair, dear reader, the answer is given here: How to assign permissions to ApplicationPoolIdentity account.

The short version: use the name “IIS APPPOOL\DefaultAppPool” and Windows will find it.

It works – I just tried it.

Hope that helps.

Written by gsdwriter

April 26, 2012 at 11:13 am

Posted in IIS, Security

Launch a Powershell console with Administrator rights from a Powershell console without Administrator rights

leave a comment »

That title is a mouthfull, but the good news is that the Powershell command to do it takes less characters.

It’s really simple once you have hunted around on the net for a while:

Start-Process "$psHome\powershell.exe" -Verb Runas

That’s it.

Open a regular PS console and type that.

I’ve only tried it on my own machine where I am an admin and I have UAC turned on. When I try it I get the UAC prompt, followed by a nice PS admin console.

I got it from this: Re-launch Powershell Script Elevated

—-

This is bad, but I couldn’t resist it.  I’m a big fan of “Young Frankenstein“, one of the funniest movies of all time,  and there is a joke in it about “elevate me” (go to this page and search for “elevate”), so I created the “Elevate-Me” function:

function Elevate-Me ()
{
    echo "Inga:            ""Now? Right here?"""
    echo "Dr Frankenstein: ""Yes, yes.  Raise the platform"""
    echo "Inga:            ""Oh. Ze platform. Oh, zat, yah, yah ... yes"""
    Start-Process "$psHome\powershell.exe" -Verb Runas
}

Just add it to your profile and let the elevating begin 🙂

BTW: I know “Elevate” is not an approved verb, but it’s worth it for the homage to the brilliance of Mel & Gene (and Teri).

—–

Written by gsdwriter

April 20, 2012 at 8:00 am

Posted in Humor, Powershell, Tools