Though Remote PowerShell turn on Remote Desktop

#$cred = Get-Credential # Enter credentials for the remote system

$session = New-PSSession -ComputerName WDPHL19AVA01 #-Credential $cred

Invoke-Command -Session $session -ScriptBlock {

    Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name 'fDenyTSConnections' -Value 0

    Enable-NetFirewallRule -DisplayGroup 'Remote Desktop'

Exit-PSSession}


Comments

Popular posts from this blog

How to step by step in detail install ssh on cachyos

Reset Login and Password for Web on ZimaOS

The error "Failed to update AutoStart - VMware Workstation