What i love about upgrades, installs, etc... is i flex parts of my troubleshooting skills that i've long since forgotten. Credit for this idea really goes to the engineers at a major financial solutions vendor... but hey i did the foot work and felt the pain.
New-Object : Exception calling ".ctor" with "2" argument(s): "The 'system.serviceModel/commonBehaviors' configuration section cannot be created. The machine.config file is missing information. Verify that this configuration section is properly registered and that you have correctly spelled the section name. For Windows Communication Foundation sections, run ServiceModelReg.exe -i to fix this error."
At C:\program files\my powershellscript.ps1+ $client = new-object <<<< MyNamespace.MyServiceClient($binding,$endpoint)
+ CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvocationException
+ FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.PowerShell.Commands.NewObjectCommand
basic solution: remove the web server role. re-install the web server role and all features you just uninstalled inadvertantly as dependants.
but when i went to go look at the machine.config to see what it put in there... this is what i found:
.... etc etc..