Skip to main content

New-ASDistributionConnectionEx

AdminStudio 2025 R2 | 30.0

note

Starting in AdminStudio 2020, New-ASDistributionConnection is obsolete and New-ASDistributionConnectionEx should used instead.

AdminStudio has a generic platform API, New-ASDistributionConnectionEx, to support creating distribution connections.It accepts XML as an input parameter.

Example

New-ASDistributionConnectionEx -XmlPath "C:\test data\ConfigMgr.xml"

Example XML Input Files

The following are examples of XML input files for different distribution platforms:

Configuration Manager

<?xml version="1.0" encoding="utf-8" ?>
<ConfigMgr>
<DistributionInformation>
<PluginId>EDFBE09C-E305-4ABF-BEEB-77032335ACB7</PluginId>
<Name></Name>
<Server></Server>
<SiteCode></SiteCode>
</DistributionInformation>
<DistributionSystemAuthentication>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
</DistributionSystemAuthentication>
<ScriptInformation>
<ScriptFile>path of PS1 file</ScriptFile>
<ScriptParameters>-ServerName [Server],-Site [SiteCode],-ProductName [ProductName],-Version [Version],-Vendor [Vendor],-SetupType [SetupType],-language [Language],-Install [InstallCmdLine],-UnInstall [UnInstallCmdLine],-Platform [Platform],-Icon [IconPath],-PublishFolder [PackagePublishFolder],-Transform [TransformFilePath],-PublishPath [PackagePublishPath],-Repair [RepairCommandLine]
</ScriptParameters>
</ScriptInformation>
<ShareInformation>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
<ShareFolderPath></ShareFolderPath>
</ShareInformation>
</ConfigMgr>

Intune

note

The UseClientSecret switch is false by default.

<?xml version="1.0" encoding="utf-8" ?>
<ConfigMgr>
<DistributionInformation>
<PluginId>EDFBE09C-E305-4ABF-BEEB-77032335ACB7</PluginId>
<Name></Name>
<Server></Server>
<SiteCode></SiteCode>
</DistributionInformation>
<DistributionSystemAuthentication>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
</DistributionSystemAuthentication>
<ScriptInformation>
<ScriptFile>path of PS1 file</ScriptFile>
<ScriptParameters>-ServerName [Server],-Site [SiteCode],-ProductName [ProductName],-Version [Version],-Vendor [Vendor],-SetupType [SetupType],-language [Language],-Install [InstallCmdLine],-UnInstall [UnInstallCmdLine],-Platform [Platform],-Icon [IconPath],-PublishFolder [PackagePublishFolder],-Transform [TransformFilePath],-PublishPath [PackagePublishPath],-Repair [RepairCommandLine]
</ScriptParameters>
</ScriptInformation>
<ShareInformation>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
<ShareFolderPath></ShareFolderPath>
</ShareInformation>
</ConfigMgr>

WorkSpace ONE

<?xml version="1.0" encoding="utf-8" ?>
<ConfigMgr>
<DistributionInformation>
<PluginId>EDFBE09C-E305-4ABF-BEEB-77032335ACB7</PluginId>
<Name></Name>
<Server></Server>
<SiteCode></SiteCode>
</DistributionInformation>
<DistributionSystemAuthentication>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
</DistributionSystemAuthentication>
<ScriptInformation>
<ScriptFile>path of PS1 file</ScriptFile>
<ScriptParameters>-ServerName [Server],-Site [SiteCode],-ProductName [ProductName],-Version [Version],-Vendor [Vendor],-SetupType [SetupType],-language [Language],-Install [InstallCmdLine],-UnInstall [UnInstallCmdLine],-Platform [Platform],-Icon [IconPath],-PublishFolder [PackagePublishFolder],-Transform [TransformFilePath],-PublishPath [PackagePublishPath],-Repair [RepairCommandLine]
</ScriptParameters>
</ScriptInformation>
<ShareInformation>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
<ShareFolderPath></ShareFolderPath>
</ShareInformation>
</ConfigMgr>

Altiris

<?xml version="1.0" encoding="utf-8" ?>
<ConfigMgr>
<DistributionInformation>
<PluginId>EDFBE09C-E305-4ABF-BEEB-77032335ACB7</PluginId>
<Name></Name>
<Server></Server>
<SiteCode></SiteCode>
</DistributionInformation>
<DistributionSystemAuthentication>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
</DistributionSystemAuthentication>
<ScriptInformation>
<ScriptFile>path of PS1 file</ScriptFile>
<ScriptParameters>-ServerName [Server],-Site [SiteCode],-ProductName [ProductName],-Version [Version],-Vendor [Vendor],-SetupType [SetupType],-language [Language],-Install [InstallCmdLine],-UnInstall [UnInstallCmdLine],-Platform [Platform],-Icon [IconPath],-PublishFolder [PackagePublishFolder],-Transform [TransformFilePath],-PublishPath [PackagePublishPath],-Repair [RepairCommandLine]
</ScriptParameters>
</ScriptInformation>
<ShareInformation>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
<ShareFolderPath></ShareFolderPath>
</ShareInformation>
</ConfigMgr>

Microsoft AppV Server

<?xml version="1.0" encoding="utf-8" ?>
<ConfigMgr>
<DistributionInformation>
<PluginId>EDFBE09C-E305-4ABF-BEEB-77032335ACB7</PluginId>
<Name></Name>
<Server></Server>
<SiteCode></SiteCode>
</DistributionInformation>
<DistributionSystemAuthentication>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
</DistributionSystemAuthentication>
<ScriptInformation>
<ScriptFile>path of PS1 file</ScriptFile>
<ScriptParameters>-ServerName [Server],-Site [SiteCode],-ProductName [ProductName],-Version [Version],-Vendor [Vendor],-SetupType [SetupType],-language [Language],-Install [InstallCmdLine],-UnInstall [UnInstallCmdLine],-Platform [Platform],-Icon [IconPath],-PublishFolder [PackagePublishFolder],-Transform [TransformFilePath],-PublishPath [PackagePublishPath],-Repair [RepairCommandLine]
</ScriptParameters>
</ScriptInformation>
<ShareInformation>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
<ShareFolderPath></ShareFolderPath>
</ShareInformation>
</ConfigMgr>

Citrix XenApp

<?xml version="1.0" encoding="utf-8" ?>
<ConfigMgr>
<DistributionInformation>
<PluginId>EDFBE09C-E305-4ABF-BEEB-77032335ACB7</PluginId>
<Name></Name>
<Server></Server>
<SiteCode></SiteCode>
</DistributionInformation>
<DistributionSystemAuthentication>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
</DistributionSystemAuthentication>
<ScriptInformation>
<ScriptFile>path of PS1 file</ScriptFile>
<ScriptParameters>-ServerName [Server],-Site [SiteCode],-ProductName [ProductName],-Version [Version],-Vendor [Vendor],-SetupType [SetupType],-language [Language],-Install [InstallCmdLine],-UnInstall [UnInstallCmdLine],-Platform [Platform],-Icon [IconPath],-PublishFolder [PackagePublishFolder],-Transform [TransformFilePath],-PublishPath [PackagePublishPath],-Repair [RepairCommandLine]
</ScriptParameters>
</ScriptInformation>
<ShareInformation>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
<ShareFolderPath></ShareFolderPath>
</ShareInformation>
</ConfigMgr>

Custom Distribution System

<?xml version="1.0" encoding="utf-8" ?>

<Custom>

<DistributionInformation>

<PluginId>05FC292E-A55B-4944-AC35-242378C68453</PluginId>

<Name>Custom Dist 5</Name>

</DistributionInformation>

<ScriptInformation>

<ScriptFile>E:\Documents\ConfigMgrCustomScript.ps1</ScriptFile>

<ScriptParameters>-ProductName [ProductName],-Version [Version],-Vendor [Vendor],-SetupType [SetupType],-language [Language],-Platform [Platform]</ScriptParameters>

</ScriptInformation>

<ShareInformation>

<UseWindowsAuthentication>

false

</UseWindowsAuthentication>

<UserName>ar\</UserName>

<Password></Password>

<ShareFolderPath>\\XX.XX.XXX.XX\Publish\</ShareFolderPath>

</ShareInformation>

</Custom>

Example XML Template for Configuration Manager

The following is an example of how a populated template for Configuration Manager would look like.

<?xml version="1.0" encoding="utf-8" ?>
<ConfigMgr>
<DistributionInformation>
<PluginId>EDFBE09C-E305-4ABF-BEEB-77032335ACB7</PluginId>
<Name></Name>
<Server></Server>
<SiteCode></SiteCode>
</DistributionInformation>
<DistributionSystemAuthentication>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
</DistributionSystemAuthentication>
<ScriptInformation>
<ScriptFile>path of PS1 file</ScriptFile>
<ScriptParameters>-ServerName [Server],-Site [SiteCode],-ProductName [ProductName],-Version [Version],-Vendor [Vendor],-SetupType [SetupType],-language [Language],-Install [InstallCmdLine],-UnInstall [UnInstallCmdLine],-Platform [Platform],-Icon [IconPath],-PublishFolder [PackagePublishFolder],-Transform [TransformFilePath],-PublishPath [PackagePublishPath],-Repair [RepairCommandLine]
</ScriptParameters>
</ScriptInformation>
<ShareInformation>
<UseWindowsAuthentication>
true
</UseWindowsAuthentication>
<UserName></UserName>
<Password></Password>
<ShareFolderPath></ShareFolderPath>
</ShareInformation>
</ConfigMgr>
note

Though AdminStudio supports Casper distribution server and a connection to the same can be created from the Application Manager user interface, creating a connection to Casper using AdminStudio PowerShell APIs aren't supported.