Can not Stop-Computer in powershell 6.0
1
PS C:\Program Files\PowerShell\6.0.0-beta.6> Stop-Computer
Stop-Computer : Failed to stop the computer WASYGSHA01-1020 with the following error message: The client cannot connect
to the destination specified in the request. Verify that the service on the destination is running and is accepting re
quests. Consult the logs and documentation for the WS-Management service running on the destination, most commonly IIS
or WinRM. If the destination is the WinRM service, run the following command on the destination to analyze and configur
e the WinRM service: "winrm quickconfig"..
At line:1 char:1
+ Stop-Computer
+ ~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (WASYGSHA01-1020:String) [Stop-Computer], InvalidOperationException
+ FullyQualifiedErrorId : StopComputerException,Microsoft.PowerShell.Commands.StopComputerCommand
2
PS C:\Program Files\PowerShell\6.0.0-beta.6> get-service winrm
Status Name DisplayName
------ ---- -----------
Stopped WinRM Windows Remote Management (WS-Manag...
2.1 Start-Service winrm
3 winrm quickconfig(first time)
PS C:\Program Files\PowerShell\6.0.0-beta.6> winrm quickconfig
WinRM is not set up to receive requests on this machine.
The following changes must be made:
Start the WinRM service.
Set the WinRM service type to delayed auto start.
Make these changes [y/n]? y
WinRM has been updated to receive requests.
WinRM service type changed successfully.
WinRM service started.
WinRM is not set up to allow remote access to this machine for management.
The following changes must be made:
Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
Enable the WinRM firewall exception.
4 winrm quickconfig(second time)
PS C:\Program Files\PowerShell\6.0.0-beta.6> winrm quickconfig
WinRM service is already running on this machine.
WinRM is not set up to allow remote access to this machine for management.
The following changes must be made:
Create a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
Enable the WinRM firewall exception.
Make these changes [y/n]? y
WinRM has been updated for remote management.
Created a WinRM listener on HTTP://* to accept WS-Man requests to any IP on this machine.
WinRM firewall exception enabled.
5 verify it
PS C:\Program Files\PowerShell\6.0.0-beta.6> winrm e winrm/config/listener
Listener
Address = *
Transport = HTTP
Port = 5985
Hostname
Enabled = true
URLPrefix = wsman
CertificateThumbprint
ListeningOn = 127.0.0.1, 169.254.76.188, 169.254.141.162, 169.254.187.252, 172.31.212.20, ::1, fe80::5efe:172.31.212.20%6, fe80::4841:a122:e4e4:bbfc%11, fe80::51ba:2dc7:d1bf:8da2%3, fe80::543f:76ba:7341:4cbc%2, fe80::8557:8e2d:f82d:ab5a%10
Can not Stop-Computer in powershell 6.0的更多相关文章
- Book Review: PowerShell 3.0 Advanced Administration Handbook
Recently I read a book, PowerShell 3.0 Advanced Administration Handbook, which I found really worthy ...
- 基于PowerShell 3.0的web接口测试
对于web接口测试,做一下总结. 接口测试总结 1. 接口url格式:http://www.xxx.com/a/bbb.html: 2. 接口url后面接的参数格式:“?参数名=参数值&参数名 ...
- Azure PowerShell 1.0.0以上版本在中国Azure使用的注意事项
随着Azure PowerShell 1.0.0+的推出,越来越多的客户开始使用新的版本的Azure PowerShell.此版本的PowerShell最大的改变在于将原先的Switch-AzureM ...
- powershell V6.0登基之:《瘸腿脚本大帝进攻linux!》
------[前言]------ 每个ps大版本发布,我都会写个消息. 这次的,主标题就叫:powershell v6.0登基副标题就叫:<瘸腿脚本大帝进攻linux!> ------[p ...
- 1分钟试用PowerShell 5.0新功能PowerShellGet安装Script Browser和Script Analyzer
微软PowerShell 产品组上周发布了PowerShell 5.0 PowerShellGet功能.有了它,IT 人员可以方便地搜索,安装,更新PowerShell Module.在这篇博客中,我 ...
- Win7中安装Windows PowerShell 3.0
win7内置的powershell是2.0,现在已经明显落伍了,但win系统软件更新,需要解决依赖问题,so,按下面步骤安装即可. 1. 安装Microsoft .NET Framework 4.0的 ...
- 在win7下安装PowerShell 5.0遇到的坑
升级安装 安装.NET Framework 4.6.2下载NDP462-KB3151800-x86-x64-AllOS-ENU.exe,进行安装 安装PowerShell 4.0(5.0依赖4.0) ...
- 不支持PowerShell 2.0版本(don't support PowerShell version 2.0. )
在“程序包管理器控制台”使用命令“update-database”会提示:The Entity Framework Core Package Manager Console Tools don't s ...
- Windows7 PowerShell 2.0升级到 PowerShell 5.1
Windows7 sp1内置的PowerShell的版本是v2.0,现需要将其升级到v5.1,过程中有一个环节需要引起注意,为了以后查阅的方便,现将其记录下来. 1 查看PowerShell版本 Wi ...
随机推荐
- 【转】工具系列:IntelliJ IDEA (Mac) 运行速度优化
转自工具系列:IntelliJ IDEA (Mac) 运行速度优化 感谢该作者解决了我使用idea debug很慢的问题 背景 IDEA 下运行程序,经常假死 5 s,作为 Mac 怎么能允许暂停 5 ...
- linux文件与用户和群组
文件基本属性 在图片中alogrithm的文件属性为drwxrwxr-x,其中d代表此文件为目录. 后面rwx,rwx,r-x分别代表文件所属者(ower),组(group),其他用户(other)的 ...
- python学习之--安装IDE(eclipse+pydev)
First steps download eclipse url:http://www.eclipse.org/downloads/ select Help -> Install New Sof ...
- 剑指offer面试题26-复杂链表的复制
题目: 请实现函数ComplexListNode* Clone(ComplexListNode* pHead).复制一个复杂链表. 在复杂链表中.每个节点除了一个m_pNext指针指向下一个节点外,另 ...
- HDU 5353 Average
Problem Description There are n soda sitting around a round table. soda are numbered from 1 to n and ...
- JAVA性能优化的五种方式
一,JAVA性能优化之设计优化 设计优化处于性能优化手段的上层.它往往须要在软件开发之前进行.在软件开发之前,系统架构师应该就评估系统可能存在的各种潜在问题和技术难点,并给出合理的设计方案,因为软件设 ...
- vue 路由demo2
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- luogu 2308添加括号
添加括号 传送门 题目大意 现在要添上n-1对括号,加法运算依括号顺序进行,得到n-1个中间和,求出使中间和之和最小的添括号方法. 这道题其实是一个很简单的区间dp,中间和的意思是括号里面的和,也就是 ...
- POJ 3693 后缀数组+RMQ
思路: 论文题 后缀数组&RMQ 有一些题解写得很繁 //By SiriusRen #include <cmath> #include <cstdio> #includ ...
- ie浏览器下get方式获取数据无效问题
在ie浏览器用get方式获取数据时因为发送得到参数地址都是一样的,所以浏览器会优先从缓存获取数据,而不去服务器请求数据,post由于参数不同所以不会影响. 解决方法: 1. Internet选项-- ...