- Trending Categories
- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to mount the ISO file using PowerShell?
To mount the ISO file in Windows using PowerShell, we can use the Mount−DiskImage command. The below command will mount the image file stored at the C:\ISO location.
Mount−DiskImage −ImagePath "C:\ISOs\Windows_Server_2016_Datacenter_EVAL_en−us_14393_refresh (1).ISO"
Output
Attached : True BlockSize : 0 DevicePath : \.\CDROM0 FileSize : 6972221440 ImagePath : C:\ISOs\Windows_Server_2016_Datacenter_EVAL_en-us_14393_refresh (1).ISO LogicalSectorSize : 2048 Number : 0 Size : 6972221440 StorageType : 1 PSComputerName :
You can also check from Windows Explorer that the disk is mounted.
To mount on the remote computer, we can use CIMSession as a remote session and mount the disk.
$sess = New−CimSession −ComputerName Labmachine2k12 Mount−DiskImage −CimSession $sess −ImagePath F:\Windows_Server_2016_Datacenter.iso
In the above example, Disk Image file ISO will be mounted on the remote computer LabMachine2k12 which is available on the same server (LabMachine2k12) on the F: path.
Advertisements