<?xml version="1.0" encoding="utf-8"?> <configuration> . . . <microsoft.identityModel> <service saveBootstrapTokens="true"> <audienceUris> <add value="https://server01.mydomain.com/myApp"/> </audienceUris> <federatedAuthentication> <wsFederation passiveRedirectEnabled="true" issuer="https://server01.mydomain.com/STS/issue/wsfed" realm="https://server01.mydomain.com/myApp" requireHttps="true"/> <cookieHandler requireSsl="true" domain=""/> </federatedAuthentication> . . . </configuration>
I have the following web.config file and I want to modify the server name. I started with this and although it modified the server name I received the following error message.
$webConfig = 'C:\Scripts\Web.config' $doc = (Get-Content $webConfig) -as [Xml] $obj = $doc.microsoft.identityModel.service.audienceUris.add $obj.value = 'https://server02.mydomain.com/myApp' $doc.Save($webConfig)
The property 'value' cannot be found on this object. Verify that the property exists and can be set.
At line:7 char:1
+ $obj.value = 'https://server02.mydomain.com/myApp'
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : PropertyNotFound
Could someone help with this and is there an easier way to change the next two references to the server name?
Thanks for any help.