惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Schneier on Security
有赞技术团队
有赞技术团队
T
The Blog of Author Tim Ferriss
F
Fortinet All Blogs
D
DataBreaches.Net
F
Full Disclosure
腾讯CDC
博客园 - 【当耐特】
MyScale Blog
MyScale Blog
Stack Overflow Blog
Stack Overflow Blog
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
爱范儿
爱范儿
The GitHub Blog
The GitHub Blog
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
SegmentFault 最新的问题
The Register - Security
The Register - Security
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
J
Java Code Geeks
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy International News Feed
酷 壳 – CoolShell
酷 壳 – CoolShell
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cyber Attacks, Cyber Crime and Cyber Security
T
Tor Project blog
博客园 - 三生石上(FineUI控件)
Know Your Adversary
Know Your Adversary
AWS News Blog
AWS News Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
CERT Recently Published Vulnerability Notes
O
OpenAI News
Project Zero
Project Zero
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Application and Cybersecurity Blog
Application and Cybersecurity Blog
云风的 BLOG
云风的 BLOG
N
News and Events Feed by Topic
MongoDB | Blog
MongoDB | Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Microsoft Security Blog
Microsoft Security Blog
Cisco Talos Blog
Cisco Talos Blog
P
Palo Alto Networks Blog
Schneier on Security
Schneier on Security

博客园 - 咒语

Azure OAuth2 PostMan 授权代码 跨线程 操作Winform 主UI时的扩展方法 每当双11来时,商家与京东的那些骚操作,京东30天保价不能信 Microsoft.Extensions.DependencyInjection 阅读笔记 EasyToLearnDesignPattern C#中关于表达式与委托在EF中的不同表现总结 软件开发中的版本号 The specified type member 'Date' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported. ABP项目依赖图,根据自已生在的Demo项目分析而得 学习ELk之----02. Elastic Search操作入门 学习ELK之----01.建立ELK测试项目 一目了然呀的VS2017 Live Test 在Hyper-V上安装RemixOS 的Android模拟器 配置Asp.Net Web项目NLog配置文件的位置 测试EntityFramework,Z.EntityFramework.Extensions,原生语句在不同的查询中的表现。原来池化与非池化设定是有巨大的影响的。 消费RabbitMQ时的注意事项,如何禁止大量的消息涌到Consumer RabbitMQ调试与测试工具-v1.0.1 -提供下载测试与使用 安装TFS2015后启用生成功能 log4net在Realse下有个好大的坑呀。
配置WinRM的Https
咒语 · 2016-09-05 · via 博客园 - 咒语

2016-09-05 17:02  咒语  阅读(2851)  评论()    收藏  举报

1. 打开IIS管理器,选中IIS服务根节点,然后在主内容页选中IIS条目下的服务器证书双击;

2. 在新出现的服务器证书面板下点右边一列的创建自签名证书

3. 证书名称是:名称(这里强调一下,证书的名称Subject必须为hostName。具体到域环境中,比如机器test加入了域cszi.com,那这个HostName应当为test.cszi.com。具体到Azure环境中,应当就是host service name 域名,比如cszitest.cloudapp.net。),类型为个人。

4. 列出所有证书

PS C:\Users\Test> ls Cert:\LocalMachine\My\


目录: Microsoft.PowerShell.Security\Certificate::LocalMach


Thumbprint Subject
---------- -------
91E236AF70EE5649C90B63560FD9638947A84E7E CN=Server-001

5. 配置winrm使用HTTPS

(注意:在PS中执行可能会出错,可以在CMD.exe中执行)

winrm create winrm/config/Listener?Address=*+Transport=HTTPS @{Port="5986" ;Hostname="Server-001" ;CertificateThumbprint="91 E2 36 AF 70 EE 56 49 C9 0B 63 56 0F D9 63 89 47 A8 4E 7E"}

运行结果:

ResourceCreated
Address = http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous
ReferenceParameters
ResourceURI = http://schemas.microsoft.com/wbem/wsman/1/config/listener
SelectorSet
Selector: Address = *, Transport = HTTPS



6. 检测一下安装的结果:

C:\Users\Test>winrm e winrm/config/listener
Listener
Address = *
Transport = HTTP
Port = 5985
Hostname
Enabled = true
URLPrefix = wsman
CertificateThumbprint
ListeningOn = 127.0.0.1, 192.168.1.11, ::1, 2001:0:5ef5:79fd:28e6:3665:3f57:fef4, fe80::5efe:192.168.1.11%13, fe80::
28e6:3665:3f57:fef4%14, fe80::9dc7:100:ede1:b458%12

Listener
Address = *
Transport = HTTPS
Port = 5986
Hostname = Server-001
Enabled = true
URLPrefix = wsman
CertificateThumbprint = 91 E2 36 AF 70 EE 56 49 C9 0B 63 56 0F D9 63 89 47 A8 4E 7E
ListeningOn = 127.0.0.1, 192.168.1.11, ::1, 2001:0:5ef5:79fd:28e6:3665:3f57:fef4, fe80::5efe:192.168.1.11%13, fe80::
28e6:3665:3f57:fef4%14, fe80::9dc7:100:ede1:b458%12


7. 连入时会如下:enter-pssession –computername Server-001 –Credentrial Server-001\TFSServer

但是会提示如下异常:

改正如下:
先设定信息列表
Set-Item wsman:\localhost\Client\TrustedHosts -value 192.168.1.*
注意上面的大小写,千万注意。

注意:下面的错误提示,就是你的密码不对。