justin_p.posh5
ansible-role-posh5
这个角色会将PowerShell/Windows管理框架更新到版本5.1,确保.NET应用程序使用强TLS,配置NuGet、PowerShell Gallery、PowerShellGet,并安装PSReadline模块。
这一切确保PowerShell在现代Windows系统中正常运行。这确保您可以使用Install-Module
,并通过win_psmodule
在旧版本的Windows上安装PowerShell模块或DSCs,而无需额外的手动配置。
支持的系统
- Windows Server 2019
- Windows Server 2016
- Windows Server 2012R2
- Windows Server 2012
尚未验证的系统
- Windows Server 2008R2
- Windows Server 2008 x64
- Windows Server 2008 x32
要求
不适用
角色变量
不适用
依赖关系
不适用
示例剧本
- hosts: posh5
roles:
- { role: justin_p.posh5 }
本地开发
这个角色包括一个Vagrantfile,可以在Virtualbox中启动一个本地Windows Server 2019虚拟机(VM)。 创建虚拟机后,将自动运行我们的角色。
开发要求
pip3 install pywinrm
使用方法
- 运行
vagrant up
命令创建虚拟机并运行我们的剧本 - 运行
vagrant provision
重新应用我们的剧本 - 运行
vagrant destroy -f && vagrant up
重新创建虚拟机并运行我们的剧本 - 运行
vagrant destroy
删除虚拟机
许可证
MIT
作者
- Justin Perdok (@justin-p), Orange Cyberdefense
贡献
欢迎提出问题,贡献代码并提交您的拉取请求。您也可以在推特上联系我 (@JustinPerdok)。
关于项目
Upgrade to WMF/PowerShell 5.1
安装
ansible-galaxy install justin_p.posh5
许可证
mit
下载
344
拥有者
IT Geek, Ethical Hacker, DevOps Nut, PowerShell Fanatic and lover of beers :beers: