Create your first automation in just a few minutes.Try Studio Web →
by Sopra Steria Ltd.
0
Snippet
<100
Summary
Summary
This snippet will connect and disconnect network drive on the basis of the input supplied. It uses PowerShell scripts to achieve the purpose.
Overview
Overview
This software project will connect the network drive using the Drive Name, network path, username and password to connect to a particular drive. If the drive is already connected it will disconnect it.
For disconnecting network drive it uses only drive name and no username and password are required.
The above piece of code will use PowerShell scripts to connect or disconnect the drive.
This project includes two xaml files & powershell scripts as mentioned below:
Map_Network_Drive: This xaml file is used to connect the network drive and it takes as input parameter username, password,network path and the name of the drive.
Disconnect_Network_Drive: This xaml is used to disconnect the network drive if it is already connected. If no network drive is connected it will display the details in log messages.
Map_Network_Drive: This text file contains the PowerShell commands required to connect the network drive. This PowerShell script is used by Map_Network_Drive.xaml to connect to the network drive. It requires username, password, network drive and drive name.
Disconnect_Network_Drive: This text file is used to disconnect the network drive if already connected. It will check the details on the basis of the input parameter supplied which is the name of the drive.
All of the above code is designed without hard coding and the code is dynamic, which requires only input parameters so that it can run without any issues.
The above design of xaml code was done to meet the requirements where different processes need to access different paths and files. So by connecting to different network paths, different processes have access to different folders and files. This will achieve the objective of meeting security approvals which may be required in different projects/clients.
Features
Features
The above script will benefit the robots to have correct network drive mapped and help to achieve security audits. So the robots will access only the folders and paths which are required for that process.
Additional Information
Additional Information
Dependencies
It is depended only on UiPath system activities and automation activities
Code Language
Visual Basic
License & Privacy
Apache
Privacy Terms
Technical
Version
1.0.1Updated
April 5, 2021Works with
Studio: 20.10 - 22.10
Certification
Silver Certified
Support
UiPath Community Support
Resources