20 Ekim 2022 Perşembe

Powershell Set-Location - Change Directory İçindir

Örnek
Şöyle yaparız
$currentDir = Get-Location # Save for setting back later
Set-Location ...
...
Set-Location $currentDir


4 Ekim 2022 Salı

Windows msiexec komutu

/i seçeneği
Örnek
Şöyle yaparız
C:\> msiexec.exe /i https://awscli.amazonaws.com/AWSCLIV2.msi

3 Ekim 2022 Pazartesi

Oturum Açma Seçenekleri

Giriş
How to Remove PIN and Password on Lock Screen with Local Account.Without Programs videosundan öğrendim. Ayarlar/Hesaplar veya Settings/Accounts menüsünden Parola veya Password kaldırılıyor






15 Eylül 2022 Perşembe

Windows mountvol komutu

/p seçeneği - remove the volume
Örnek
Şöyle yaparız
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 diskpart
4. 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.

14 Temmuz 2022 Perşembe

Windows Batch pushd

Giriş
Açıklaması şöyle
To remember a folder, you could use the pushd command together with the popd command.

To remember a folder :

pushd
To return to the remembered folder :

popd
These commands use a stack that can remember more than one folder.

Powershell Test-NetConnection

Örnek
Şöyle yaparız
> Test-NetConnection -ComputerName 172.18.17.215 -Port 30324

ComputerName     : 172.18.17.215
RemoteAddress    : 172.18.17.215
RemotePort       : 30324
InterfaceAlias   : OpenVPN TAP-Windows6
SourceAddress    : 172.31.252.65
TcpTestSucceeded : True

27 Mayıs 2022 Cuma

PSReadline

Kurulum
Powershell 7'yi kurdum

Ayarlar
PSReadline etkin olarak gelmiyor. Önce halihazırda profile yoksa bir tane oluşturmak lazım. Şöyle yaparız
if (!(Test-Path -Path $PROFILE)) {
  New-Item -ItemType File -Path $PROFILE -Force
}
Profile dosyasını açmak için şöyle yaparız
notepad $PROFILE
Dosyaya şu satırları ekleriz
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
- Böylece "sağ ok" ile önerileri kabul ederiz
- Yukarı ve aşağı ok ile tarihçeyi dolaşırız