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

Clearing DNS cache on vCenter Server Appliance

Repairing a virtual disk in Workstation (2019259)