automate client cert mapping for a web app.

automate client cert mapping for a web app.

am 17.02.2007 23:41:24 von erick

I am attempting to automate the process of setting up client cert
authentication for a web app. Basically, I need to automate setting “Accept
client certificate” for a particular web app and enable client cert mapping
for that web app and setup the certificate to account mapping. From the
research I have done I think that the proper wmi/adsi object is
IIsCertMapper in terms of mapping a particular cert to an account (I just
need a 1 to 1 mapping)

My problem is that when (in powershell) I use the following:
gwmi –list –n “root/microsoftiisv2”
I see the IIsCertMapper class but when I gwmi IIsCertMapper –n
“root/microsoftiisv2” the object returned seems to be null (i.e. passing it
to get-member produces an error).

I have a feeling that I need to first create an instance of the
IIsCertMapper that is attached/contained by the webapp but I haven’t
figured out how to do that.
I would prefer to use powershell and wmi to get the job done but at this
point I'll take anything that works.

If anyone has any insight in how to automate this process or an example of
how to properly use IIsCertMapper I would greatly appreciate it.

Thanks
eric