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 ...
随机推荐
- Opencv 视频转为图像序列
本系列文章由 @YhL_Leo 出品,转载请注明出处. 文章链接: http://blog.csdn.net/yhl_leo/article/details/50283303 基于OpenCV的视频转 ...
- 一个通用Makefile的编写
作者:杨老师,华清远见嵌入式学院讲师. 我们在Linux环境下开发程序,少不了要自己编写Makefile,一个稍微大一些的工程下面都会包含很多.c的源文件.如果我们用gcc去一个一个编译每一个源文件的 ...
- Java程序命令行打包Jar
最近要跑爬虫程序,需要打包成jar发在linux服务器中运行.主要是第三方的lib包与配置文件,不进行打包,方便修改. 1.eclipse中src中源码编译后生成的源码在bin文件中,把里面源码单独拿 ...
- HDU5411CRB and Puzzle(矩阵高速幂)
题目链接:传送门 题意: 一个图有n个顶点.已知邻接矩阵.问点能够反复用长度小于m的路径有多少. 分析: 首先我们知道了邻接矩阵A.那么A^k代表的就是长度为k的路径有多少个. 那么结果就是A^0+A ...
- Maven传递依赖的时候,同名包不同版本号的包均会下载,可是编译的时候,仅仅会载入一个高版本号的。
描写叙述,在一个Maven项目中.同一时候依赖了spring-tomcat-weaver 和 struts-core 包.可是spring-tomcat-weaver 须要commons-dige ...
- RandomAccessFile操作文件
package file; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; ...
- kibana智能检索发送多次_msearch —— 配置index pattern,同时设置时间段,就知道到底是在哪些索引里去查找数据了
kibanasite/elasticsearch/log-*/_field_stats?level=indices 返回: {"_shards":{"total ...
- 大量文件时使用ls
有时一个目录下的文件实在太多, ls的时候就卡住了. 其实, 如果不加排序的话, 就可以迅速的显示文件. ls -f 解释: -f do not sort, enable -aU, disable - ...
- xBIM 基础07 创建WebBIM文件
系列目录 [已更新最新开发文章,点击查看详细] xBIM项目提供了一个IFC文件的Web查看器.当你想把IFC转换成紧凑的WexBIM时,需要 xBIM Essentials 和 xBIM G ...
- 解码URLDecode和编码URLEnCode
在前台往后台传递参数的时候,在前台进行编码,在后台接收参数的时候,用Decode进行解码: 如果url中包含特殊字符如:&.html标签 <tr><td>等导致url无 ...