![]() ![]() $BackupFileName = $CentralXmlFile.Replace(". Write-Host "Current Version of Central Xml File: $CurrentVersion" $MinorVersion = ($CurrentVersion.Split(".")) $MajorVersion = ($CurrentVersion.Split(".")) $NodeToRead = $CentralConfig.SelectSingleNode($XPath) # Load central xml file (for backup and reading the current version number) $CentralXmlFile = 'P:\Centrally Managed Files\config.xml', ![]() $PersonalXmlFile = (Join-Path $env:appdata "Quest Software\PowerGUI\config.xml"), To update your central config: just make the modifications within PowerGUI and then run this function. It even saves a backup copy of your central config file in case you mess up ? It assumes you use a simple x.y version number, so please start out with 2.0 when setting up your config. All without having to edit the complex xml file manually. Browse other questions tagged powershell powergui or ask your own question. The following function increments the version number for you and even allows you to store the new file to the central location at the same time. The Windows PowerShell 2.0 Engine is intended to be used only when an existing script or host program cannot run because it is incompatible with Windows PowerShell 4.0, Windows PowerShell 3.0, or Microsoft. Whenever you want to update the central configuration xml file, you need to increment the version number in order to push this change out to your colleagues. If you are using PowerGUI (which you should) and some of your colleagues do too, you might want to use a central configuration. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |