ansilbe托管windows节点配置及测试

以管理员身份运行powershell,否则会报错

clip_image002

clip_image004

以管理员身份运行命令提示符,然后运行以下命令,在powershell中运行会报错:

clip_image005

clip_image006

clip_image007

clip_image009

clip_image010

重启OS后

clip_image012

clip_image013

clip_image015

clip_image016

clip_image017

clip_image019

clip_image021

clip_image023

系统总内存:

ansible windows -m win_shell -a "(Get-WmiObject -Class Win32_ComputerSystem).TotalPhysicalMemory /1gb"

系统可用内存:

ansible windows -m win_shell -a "(Get-WmiObject -Class Win32_OperatingSystem).FreePhysicalMemory / (1mb)

clip_image025

clip_image027

cpu使用情况

ansible windows –m win_shell –a “(gwmi win32_processor).loadpercentage”

 

clip_image002[4]

posted @ 2018-06-26 21:57  cnmarkao  阅读(298)  评论(0编辑  收藏  举报