[4] Window PowerShell DSC 学习系列----PowerShell DSC 5.x 提供了哪些有用好用的工具命令?
2017-01-23 14:08
393 查看
在使用PowerShell DSC的时候,我们经常需要使用 PSDesiredStateConfiguration的一些常用的命令去配置或者获取一些DSC的配置信息已经设置DSC的LCM的状态等信息;那么PowerShell DSC 5.x 提供了哪些功能和cmdlet?
我们通常可以用下面的命令列出所有的PSDesiredStateConfiguration的常规命令.
比如,我们可以用Get-DscResource 命令列出所有的DSC的resource的名字;也能具体列出某一个DSC resource的名字,以及
其具体的属性。
我们通常可以用下面的命令列出所有的PSDesiredStateConfiguration的常规命令.
PS C:\DSC> Get-Command -Module PSDesiredStateConfiguration CommandType Name Version Source ----------- ---- ------- ------ Function Configuration 1.1 PSDesiredStateConfiguration Function Disable-DscDebug 1.1 PSDesiredStateConfiguration Function Enable-DscDebug 1.1 PSDesiredStateConfiguration Function Get-DscConfiguration 1.1 PSDesiredStateConfiguration Function Get-DscConfigurationStatus 1.1 PSDesiredStateConfiguration Function Get-DscLocalConfigurationManager 1.1 PSDesiredStateConfiguration Function Get-DscResource 1.1 PSDesiredStateConfiguration Function New-DscChecksum 1.1 PSDesiredStateConfiguration Function Remove-DscConfigurationDocument 1.1 PSDesiredStateConfiguration Function Restore-DscConfiguration 1.1 PSDesiredStateConfiguration Function Stop-DscConfiguration 1.1 PSDesiredStateConfiguration Cmdlet Invoke-DscResource 1.1 PSDesiredStateConfiguration Cmdlet Publish-DscConfiguration 1.1 PSDesiredStateConfiguration Cmdlet Set-DscLocalConfigurationManager 1.1 PSDesiredStateConfiguration Cmdlet Start-DscConfiguration 1.1 PSDesiredStateConfiguration Cmdlet Test-DscConfiguration 1.1 PSDesiredStateConfiguration Cmdlet Update-DscConfiguration 1.1 PSDesiredStateConfiguration
比如,我们可以用Get-DscResource 命令列出所有的DSC的resource的名字;也能具体列出某一个DSC resource的名字,以及
其具体的属性。
PS C:\DSC> $gc = Get-DscResource -Name MSFT_xChrome ; $gc.Properties Name PropertyType IsMandatory Values ---- ------------ ----------- ------ DependsOn [String[]] False {} PsDscRunAsCredential [PSCredential] False {} Language [String] False {} LocalPath [String] False {}
相关文章推荐
- [5] Window PowerShell DSC 学习系列----如何生成一个DSC MOF文件?
- [9] Window PowerShell DSC 学习系列----错误诊断和分析
- [6] Window PowerShell DSC 学习系列----如何安装最新的PowerShell DSC 5.1 Pull Server?
- [29] Window PowerShell DSC 学习系列----如何备份数据库和解决一个MS Server 2008上的大坑?
- [30] Window PowerShell DSC 学习系列----如何解决跨节点(across computers)依赖?
- [10] Window PowerShell DSC 学习系列----目标节点和Pull 服务器底层通信原理剖析
- [27] Window PowerShell DSC 学习系列----DSC 5.x 查询节点注册和执行报告(Report)查询
- [2] Window PowerShell DSC 学习系列----DSC的资源(Resource)以及配置和格式(Configuration && Sytax )
- [8] Window PowerShell DSC 学习系列----MOF文件和DSC Module的部署
- [22]Window PowerShell DSC学习系列---- 如何用PowerShell脚本查看DSC服务器的执行报表(Report)
- [31] Window PowerShell DSC 学习系列----PowerShell DSC 专栏竟然在CSDN推荐的优秀专栏里面
- [7] Window PowerShell DSC 学习系列----如何被管理的设置节点注册到Pull Server?
- [3] Window PowerShell DSC 学习系列----如何在PowerShell DSC 5.x 安装最新的DSC Module?
- [32] Window PowerShell DSC 学习系列----使用DSC Package安装时,如何获取Product ID?
- [28] Window PowerShell DSC 学习系列----如何用Java调用PowerShell DSC 5.x的oData服务
- [1] Window PowerShell DSC 学习系列----DSC的定义和2种架构模式
- [25]Window PowerShell DSC学习系列----如何更换DSC Pull服务器数据库为Access数据库?
- [21]Window PowerShell DSC学习系列---- 在Window 2012 R2 安装DSC 5.0 Pull服务器报错的解决方案
- [11] Windows PowerShell DSC学习系列---如何定制一个基于PowerShell脚本实现的DSC Resource
- [14]Windows PowerShell DSC学习系列---如何Debug PowerShell DSC?