fullPath = "$RoleInstallPath\Bin\Microsoft.Exchange.Management.Recipient.dll.config"; $pswsHostUrl = $RoleDatacenterPswsHostName; ...

$fullPath = "$RoleInstallPath\Bin\Microsoft.Exchange.Management.Recipient.dll.config";            $pswsHostUrl = $RoleDatacenterPswsHostName;            set-appconfigvalue -ConfigFileFullPath:$fullPath -Element:configuration/appSettings -AppSettingKey:PswsHostServerName -NewValue:"$pswsHostUrl";