Remote powershell connection and powershell connection
Recently, I have looked at powershell-related knowledge for my work. I have summarized some of the steps required for remote powershell connection and hope to help others.
Remote connection using powershell requires
Device Configuration:
1. enable remote ps management: enable-psremoting-force
(If prompted, Press y to press Enter)
2. Request to enable wrm: winrm quickconfig
Client Configuration:
Add host trust: Set-Item wsman: \ localhost \ Client \ TrustedHosts-value *
If the message 'change the network connection type to domain or private, and then try again 'appears,
Remember to change the network type of the device to private network or work network.
Set-ExecutionPolicy RemoteSigned
(Prompt: Press y to press Enter)
After running the above steps, you can connect to powershell remotely. However, in versions earlier than win8, powershell is not configured in the environment by default. We need to manually configure it.
Run powershell on the cmd terminal.
Cmd powershell
If 'not an internal processing command' appears, you need to configure the environment variable under path.
1. Add at the end of path
; % SYSTEMROOT % \ System32 \ WindowsPowerShell \ v1.0 \
Restart the cmd terminal,
Cmd powershell
The system still prompts "not an internal processing command". You need to manually add the powershell function to the computer,
Enter
CompMgmtLauncherEnter
Go to"Server Manager", Click"Function"Button,
ClickAdd feature
"Net Framework 3.0 features"-------- Check
"Windows PowerShell"----------- Check
After that, restart the terminal and enter powershell to enter the powershell interface.
At this time, you can enter the link script in the powershell Administrator running.
I will not write the link script in detail here. I can find many links on google. This is the first time I used this item and won't add images. It will be a little troublesome for everyone to look at. Sorry.