Hallo everyone,
I am wondering if someone can point me in the right direction here. I am not sure what approach to take.
My intention is to generate a xml config file based on a hashtable.
My issue is how to do an update of just one of the config keys without affecting the rest of the config.
Is there a way i can do that with just one hashtable or perhpas if i need to split the config hashtable in smaller ones, not sure how i will do the merge properly. The final requirement is to have just one .xml config file.
Thanks in advance for your replies.
Jacobo
$PVSConfigurationSourceServerSession = New-PSSession -ComputerName server1 $Configuration = @{ customer=@{ ActiveDirectoryGC="server1:3268"; # GC stays for Global Catalog } script_info=@{ ConfiguratioVersion="1.0.0"; LastEditedby=$env:USERNAME LastEditedDate=(Get-Date) } microsoft_scvmm=@{ Address="server2"; TECAccounts="Test1","Test2"; }; microsoft_scvmm_hosts=@{ HypervVersion="6.3.9600.17729"; }; citrix_pvs=@{ Version = Invoke-Command -Session $PVSConfigurationSourceServerSession -ScriptBlock {Get-PvsVersion} Farm = Invoke-Command -Session $PVSConfigurationSourceServerSession -ScriptBlock {Get-PvsFarm} Sites = Invoke-Command -Session $PVSConfigurationSourceServerSession -ScriptBlock {Get-PvsSite} }; citrix_storefront=@{ WebConfig = invoke-command -computername server2 {Get-Content C:\inetpub\wwwroot\web.config }; } Export-Clixml -InputObject $Configuration -Path .\config\configuration.xml -Force