TcXaeMgmt Version 7.X | about_AdsFileProvider 6 TcXaeMgmt Version 7.X | TcXaeMgmt Version 7.X This is the Platform independent version of the ‘TcXaeMgmt’ Module. This can run on all Platforms that are supported by ‘Microsoft Powershell’ and ‘Windows Powerhell’ >= Version 5. Differences between Microsoft Powershell and Windows Powershell are documented here . Supported TwinCAT Versions are TwinCAT 3.1.4024 and newer. If an older Version of TwinCAT is installed locally, please use the Version 3.X series of the ‘TcXaeMgmt’ module.
6.1 about_AdsFileProvider | about_AdsFileProvider The AdsFileProvider is a PowerShell provider that enables browsing and managing files on remote TwinCAT devices via ADS. SHORT DESCRIPTION PowerShell provider for browsing and managing files on remote TwinCAT devices via ADS. LONG DESCRIPTION The AdsFileProvider is a PowerShell NavigationCmdletProvider that maps the file system of a remote TwinCAT target to a PSDrive. Once a drive is created, standard PowerShell file commands (Get-ChildItem, Set-Location, Get-Content, New-Item, Remove-Item, Copy-Item) can be used to browse, read, create, and delete files and directories on the device.
The provider also implements IContentCmdletProvider (enabling Get-Content / Set-Content) and IPropertyCmdletProvider (enabling Get-ItemProperty). DRIVE INITIALIZATION When TwinCAT is running locally, the provider automatically creates default drives for every registered route (including the local system). Additional drives can be created manually with New-PSDrive. AUTOMATIC DRIVES On module import, the AdsFileProvider queries the local TwinCAT router for all registered routes (the same list returned by Get-AdsRoute) and creates a PSDrive for each one. A drive for the local system (named after the local host) is always created first, followed by one drive per remote route.
If the TwinCAT System Service is not running, no automatic drives are created. LISTING AVAILABLE DRIVES Use Get-PSDrive with the -PSProvider filter to list all AdsFileProvider drives: PS> Get-PSDrive -PSProvider AdsFileProvider Name Used (GB) Free (GB) Provider Root CurrentLocation ---- --------- --------- -------- ---------- --------------- IPC_01234 AdsFileProvider \TargetDir CX_01234 AdsFileProvider \TargetDir CX_05678 AdsFileProvider \TargetDir The first drive (IPC_01234 in this example) is the local machine, named after Environment.MachineName. The remaining drives correspond to the route names from Get-AdsRoute:
PS> Get-AdsRoute Name Address NetId Transport IsActive ---- ------- ----- --------- -------- CX_01234 192.168.1.10 192.168.1.10.1.1 TCP/IP True CX_05678 192.168.1.20 192.168.1.20.1.1 TCP/IP True TE1000 33 Version: 1.5.0