XIA Configuration - Feature
PowerShell
Use PowerShell to view and export the configuration of your IT infrastructure

PowerShell Support

Use web services and PowerShell to programmatically execute many of the processes within XIA Configuration including search, viewing information, making changes and exporting data to PDF or XML.

This example demonstrates how to perform a basic search in XIA Configuration using PowerShell.

Connect to the web service

# Connect to the configuration web service.
$url = "http://localhost/xiaconfiguration/webservice/xiaconfiguration.asmx";
Write-Host "Connecting to configuration web service at" $url;
$xia = New-WebServiceProxy -UseDefaultCredential -Uri $url;
Write-Host "Connected as" $xia.GET_AuthenticatedUserName();

Perform a basic search

$searchResults = $xia.DO_PerformBasicSearch("DEMO-DHCP*")
foreach ($searchResult in $searchResults.SearchResult)
{
    Write-Host $searchResult.Name "-" $searchResult.ItemID;
}

Output

The search results which match the specified criteria are returned:

Screenshot of XIA Configuration search results in PowerShell
Execute a search in XIA Configuration using PowerShell

Please view the administrator's guide for more information on performing a basic search.

Example - Generate a PDF

This example demonstrates how to generate a PDF in XIA Configuration using PowerShell.

Connect to the web service

# Connect to the configuration web service.
$url = "http://localhost/xiaconfiguration/webservice/xiaconfiguration.asmx";
Write-Host "Connecting to configuration web service at" $url;
$xia = New-WebServiceProxy -UseDefaultCredential -Uri $url;
Write-Host "Connected as" $xia.GET_AuthenticatedUserName();

Generate a PDF

# Generate the PDF as a byte array.
$data = $xia.GET_PDFOutputBasic(1000);

# Write the PDF to a file.
Write-Host "Saving PDF file...";
$filename = "c:\temp\sample.pdf";
[IO.File]::WriteAllBytes($filename,$data);

# Display the file.
[System.Diagnostics.Process]::Start($filename);

Output

The PDF is generated for the specified item:

Screenshot of XIA Configuration search results in PowerShell
Generate a PDF using PowerShell

Please view the administrator's guide for more information on documentation output.

For more information about using PowerShell and the XIA Configuration API, please view the administrator's guide.

Try XIA Configuration for free