Jan 6, 2023

PowerShell : Command Line

PowerShell Command for Windows 10 22H2. 

1) Enable/Install SMB v1 Client Protocol.

Enable-WindowsOptionalFeature -Online -FeatureName "SMB1Protocol-Clinet" -All


2) Mount ISO image file.

Mount-DiskImage -ImagePath "%ISO_FILE_PATH%"


3) Unmount/Eject ISO Image file.

Dismount-DiskImage -ImagePath "%ISO_FILE_PATH%"


4) To run a PowerShell Script File (.ps1) inside a Batch File.

POWERSHELL.EXE -NoProfile -ExecutionPolicy Bypass -Command "& {Start-Process PowerShell -ArgumentList '-NoProfile -ExecutionPolicy Bypass -File ""%POWERSHELL_SCRIPT_FILE%""' -Verb RunAs}"


!!! HAPPY COMPUTING !!!


No comments:

Post a Comment