Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - Help to get PowerShell to add/edit/delete IIS Manager Users IIS7/2

Reply
 
Old 12-17-2008   #1 (permalink)
Quark


 
 

Help to get PowerShell to add/edit/delete IIS Manager Users IIS7/2

I'm banging my head against the wall on this one...and hoping someone here
can assist!

I need to be able to add/edit/delete IIS Manager Users in IIS7 under Server
2008. I know that I need to use Microsoft.Web.Management and more
specifically ManagementAuthentication.CreateUser, SetPassword, DeleteUser and
such...

My problem is that I'm not sure how to invoke the right namespace/assembly
and then invoke the code under Powershell. The IIS Powershell Provider CTP2
doesn't seem to have a method.

Can someone more knowledgeable assist me, please and thank you!

Cheers,



My System SpecsSystem Spec
Old 12-18-2008   #2 (permalink)
Quark


 
 

Re: Help to get PowerShell to add/edit/delete IIS Manager Users II

Hi Marco --

Thanks for the reply.
Yes -- I had a look at that...
Quote:

> Says CreateUser() is a static method:
> PS>[reflection.assembly]::loadwithpartialname("Micosoft.Web.Management")
> PS>[microsoft.web.management.server.managementauthentication]::createuser("username","password")
Anytime I've tried to invoke it -- I get: Unable to find type
[microsoft.web.management.server.managementauthentication]:
make sure that the assembly containing this type is loaded.
Quote:

> I don't see anything in the provider either, but that doesn't mean it
> isn't there. Maybe I just don't know how to find it...
You and me both!

I'll keep banging away -- If anyone has any other thoughts, please feel free
to comment!

Cheers
My System SpecsSystem Spec
Old 12-18-2008   #3 (permalink)
Quark


 
 

Re: Help to get PowerShell to add/edit/delete IIS Manager Users II

Hi Marco --
Quote:

> You're saying my code sample isn't working for you? If not, can you
> copy and paste *exactly* what you're doing?
I pulled out the old magnifying glass and noticed that, in my diligence,
that I copy and pasted your example:
Quote:

>[reflection.assembly]::loadwithpartialname("Micosoft.Web.Management")
So, in being careful, I copied your spello! <grin> Now that I changed it to:

[reflection.assembly]::loadwithpartialname("Microsoft.Web.Management")

(note the "r") <grin> it now works.

You have made my day -- my week and possible my year!

You're the best, Marco -- spello aside!! LOL.

Cheers,



My System SpecsSystem Spec
Old 12-18-2008   #4 (permalink)
Marco Shaw [MVP]


 
 

Re: Help to get PowerShell to add/edit/delete IIS Manager Users II

> [reflection.assembly]::loadwithpartialname("Microsoft.Web.Management")
Quote:

>
> (note the "r") <grin> it now works.
Ooops! ;-)

I guess I should copy and paste also...
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Solved Task manager, registry edit and command promt disabled General Discussion
What no IIS7 PowerShell Examples (yet)? PowerShell
Creating an IIS7 application with PowerShell PowerShell
Need complete ability to add/delete/edit C:Users Vista account administration
Behaviour of elevation prompt for Standard Users On All Vista Edit Vista account administration


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46