I'm following the most basic example on MSDN and I'm failing to get it to work. I've got my configuration defined as follows:
Configuration MyWebConfig
{
Param($ComputerName)
Node $ComputerName {
WindowsFeature MyRoleExample
{
Ensure = "Present"
Name = "Web-Server"
}
}
}
I'm trying to generate MOF with C:\Scripts> .\IisWithCompressionConfig.ps1 -ComputerName "localhost" -Outputpath C:\Scripts\localhost
(and couple other command line variants). I'm not getting any file output and no errors are reported (exit status code is also 0). I've tried a version without the $ComputerName
variable (and instead "localhost" hardcoded), still nothing. Yes, I'm running this in an elevated prompt.
I've made sure that I'm running PowerShell 4.0:
C:\Scripts> $PSVersionTable
Name Value
---- -----
PSVersion 4.0
WSManStackVersion 3.0
SerializationVersion 1.1.0.1
CLRVersion 4.0.30319.34003
BuildVersion 6.3.9600.16394
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0}
PSRemotingProtocolVersion 2.2
Any ideas what am I missing?