Cách mở PowerShell ở thư mục hiện tại trong Windows

Thêm tùy chọn Open PowerShell Here vào menu ngữ cảnh trên Windows cho phép bạn mở thư mục hiện tại trong cửa sổ PowerShell.
Cách mở PowerShell ở thư mục hiện tại trong Windows

I. Các cách thực hiện

Cách 1: Sử dụng Registry Editor

HKEY_CLASSES_ROOT\Directory\Shell\Open PowerShell Here
powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -Command "Set-Location $PSScriptRoot"

Cách 2: Sử dụng Windows PowerShell (Admin)

New-ItemProperty -Path "HKCU:\Software\Classes\Directory\Shell\Open PowerShell Here" -Name "Command" -Value "powershell.exe -NoProfile -ExecutionPolicy RemoteSigned -Command 'Set-Location $PSScriptRoot'" -PropertyType String

Sau khi thực hiện một trong hai cách trên, tùy chọn Open PowerShell Here sẽ xuất hiện trong menu ngữ cảnh khi bạn nhấp chuột phải vào một thư mục.

II. Một số lưu ý

Ngoài ra, bạn có thể sử dụng các công cụ của bên thứ ba như PowerShell ISE hoặc Explorer++ để thêm tùy chọn "Open PowerShell Here" vào menu ngữ cảnh.

Tham khảo thêm: Các thủ thuật Registry hữu ích cho người dùng Windows

Thông tin bài viết

Bài viết liên quan

Cách sửa lỗi MSVCR110.dll is missing from your computerCách quay màn hình máy tính MacCách đổi tên file hàng loạt trên máy tính WindowsCách buộc thoát ứng dụng bị treo trên MacCách tập trung làm việc bằng công cụ Focus Assist trên WindowsKhôi phục tệp tin đã xóa trên Windows với Lịch sử Phiên Làm Việc