Cool Powershell script

Published Tue, May 20 2008 23:59 | William

I can't take credit for this, I came across it in Windows Communication Foundation Unleashed - but it's very helpful for administering Windows Communication Foundation...

In the <diagnostics> tag of your service's configuration, two available options are wmiProviderEnabled and performanceCounters.  So ideally you'll want to set both, but if you just need to identify the endpoint then only the first one is necessary:

<system.serviceModel>

          <diagnostics

                   wmiProviderEnabled="true"

                   performanceCounters="ServiceOnly"/>

</system.ServiceModel>

After you have that in place for your service(s), you can use the following Powershell script

PS C:\Windows\System32> get-wmiobject endpoint -n root\ServiceModel | ft name

I don't know if I love Powershell more than Windows Communication Foundation or WCF more than Powershell, but few things are cooler than using them together and this is one script you'll undoubtedly find helpful.

Search

This Blog

Tags

Community

Archives

News

My other sites

Cool Stuff

Book Stuff

Security

ORM

Data Access

Funny Stuff

Compact Framework Stuff

Web Casts

My KnowledgeBase Articles

My MVP Profile

Design Patterns

Performance

Debugging

Remoting

My Fellow Authors

My Books

LINQ

Misc

Speech

Syndication

Email Notifications