sabato 15 ottobre 2022
Cambiare porta RDP
UI
- Regedit
- HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp
- Modificare PortNumber
- Riavviare pc
PowerShell (come admin)
cambio porta regedit
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber" -Value xxxx
apertura porta firewall windows
New-NetFirewallRule -DisplayName 'RDP PORT TCP-In' -Profile 'Any'-Direction Inbound -Action Allow -Protocol TCP -LocalPort xxxx
New-NetFirewallRule -DisplayName 'RDP PORT UDP-In' -Profile 'Any'-Direction Inbound -Action Allow -Protocol UDP -LocalPort xxxx
Restart-Service TermService -ForceVerifica porta
Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name "PortNumber"
Aprire la nuova porta sul firewall aziendale e connettersi usando ip:portagiovedì 13 ottobre 2022
Ridurre un disco VHDX con PowerShell
Se il disco è in formato VHD deve essere prima convertito in VHDX tramite il seguente comando
- Convert-VHD path\drive.vhd path\drive.vhdx
1 - Montare il VHDX
- mount-vhd path\drive.vhdx -passthru | get-disk | get-partition | get-volume
2 - Ridurre la partizione
- resize-partition –driveletter E -size 250GB
3 - Scollegare il disco
- dismount-vhd path\drive.vhdx
4 - Ridimensionare il disco
- resize-vhd path\drive.vhdx -ToMinimumSize
Iscriviti a:
Post (Atom)
