Şöyle yaparız
$currentDir = Get-Location # Save for setting back laterSet-Location ......Set-Location $currentDir
$currentDir = Get-Location # Save for setting back laterSet-Location ......Set-Location $currentDir
1. Enter mountvol to list all the volumes. D should look something like -\\?\Volume{b77a3ed1-0651-5gdf-90b1-d1a3672d96e4}\D:\You should remember which one was D for later.2. Enter mountvol D: /p which will unmount D.3. Enter diskpart4. Enter list volume and note volume D's index in the ### column. Let's say it's 1.5. Enter sel vol 1 to select volume D.6. Enter att vol set readonly yo make D read only.7. Enter det vol to see the volume's info and confirm that D is now read only.8. Enter exit to go back to the command prompt.9. Enter mountvol D: \\?\Volume{b77a3ed1-0651-5gdf-90b1-d1a3672d96e4}\ to remount D. Of course, replace the gibberish address from this example with the one you have listed in mountvol.10. reboot.
To remember a folder, you could use the pushd command together with the popd command.To remember a folder :pushdTo return to the remembered folder :popdThese commands use a stack that can remember more than one folder.
> Test-NetConnection -ComputerName 172.18.17.215 -Port 30324ComputerName : 172.18.17.215RemoteAddress : 172.18.17.215RemotePort : 30324InterfaceAlias : OpenVPN TAP-Windows6SourceAddress : 172.31.252.65TcpTestSucceeded : True
if (!(Test-Path -Path $PROFILE)) {New-Item -ItemType File -Path $PROFILE -Force}
notepad $PROFILE
Import-Module PSReadLine
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -HistoryNoDuplicates
Set-PSReadLineOption -Colors @{InlinePrediction = 'DarkGreen' }
# Browse history
Set-PSReadLineKeyHandler -Key UpArrow -Function HistorySearchBackward
Set-PSReadLineKeyHandler -Key DownArrow -Function HistorySearchForward