给定此简单配置文件:
Configuration MyDscConfiguration { Node "TEST-PC1" { WindowsFeature MyFeatureInstance { Ensure = "Present" Name = "RSAT" } WindowsFeature My2ndFeatureInstance { Ensure = "Present" Name = "Bitlocker" } } } MyDscConfiguration
运行时,为节点“test-pc1”生成的mof文件将放在名为, MyDscConfiguration .
MyDscConfiguration
我正在寻找将MOF输出到自定义目录位置的方法,例如 mofs\MyDscConfiguration\
mofs\MyDscConfiguration\
这有可能吗?
是的,您的配置有 -OutputPath 你能给它的参数。
-OutputPath
配置的功能和工作方式基本相同。
你甚至可以用 Get-Help MyDscConfiguration 查看它的所有参数(您可以定义自己的 param() 也用它来阻塞,就像对函数一样)。
Get-Help MyDscConfiguration
param()
桌棋类游戏 完成也可以,所以这是一个快速发现参数的方法。