About Me

My photo
HANUMANGARH, RAJASTHAN, India

Thursday, 4 August 2022

Update Single Registry Value through Powershell

 $server = Get-Content C:\Users\sunil\Desktop\Book1.xlsx


foreach($ser in $server){


Set-ItemProperty –Path HKLM:\System\CurrentControlSet\Control\Lsa –Name RestrictRemoteSAM -Value 'O:BAG:BAD:(A;;RC;;;LA)'


#Get-ItemProperty –Path HKLM:\System\CurrentControlSet\Control\Lsa –Name RestrictRemoteSAM


}

No comments:

Post a Comment

Extract Disk Info from Remote host

 # Define the remote hostname or IP address $remoteHost = Get-Content "C:\temp\RemoteServer.txt" # Define the output CSV file path...