KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a PS script: script.ps1 [System.Xml.XmlDocument] $Config; function Get-ScriptDirectory { Split-Path $script:MyInvocation.MyCommand.Path } function Load-Config { $configPath = Join-Path (Get-ScriptDirectory) config.xml $global:Config = [xml](gc $configPath) } Load-Config config.xml <Configuration> </Configuration> Later in the script I'm working with $Config variable. When I run this script it writes the output to the console, which contains the root element of the xml. Something like: Configuration -------------- Is there exists any way how to suppress this output? Thanks.
Tags (comma-separated)
Save Edits
Cancel