As a admin if you want to run some Power shell commands on user remote machine then and want to know some machine info silently so one of the way is psexec.exe power shell remote session.Many Engineers will not prefer execute psexec.exe on remote machine because of security beach issue.Some cases you don,t have any option to know the machine status .
here is the Basic Steps.
1. Download the psexec.exe on your machines.
2. Open Power shell Editor as admin in your machine.
3.Navigate to psexec.exe in PS console Execute below command
psexec.exe \\hostname -s -h -d powershell.exe "enable-psremoting" -force
4. After that Run below command to Enable PS Enable.
Enable-PSRemoting -Force
5. Final command to enter in PS remote session.
Enter-PSSession -ComputerName HostName
Note:- For running above command you must have Admin Access.
Note:- Please test script in your test environment before running in production directly.
here is the Basic Steps.
1. Download the psexec.exe on your machines.
2. Open Power shell Editor as admin in your machine.
3.Navigate to psexec.exe in PS console Execute below command
psexec.exe \\hostname -s -h -d powershell.exe "enable-psremoting" -force
4. After that Run below command to Enable PS Enable.
Enable-PSRemoting -Force
5. Final command to enter in PS remote session.
Enter-PSSession -ComputerName HostName
Note:- For running above command you must have Admin Access.
Note:- Please test script in your test environment before running in production directly.
No comments:
Post a Comment