Parameter-based data

Parameter-based data can be passed as parameters to a configuration block, as follows:

    configuration FooBar
{
param([switch]$foo,$bar)

if($foo){
WindowsFeature InstallIIS
{
Name = "Web-Server"
}
}elseif($bar){
WindowsFeature InstallHyperV
{
Name = "Microsoft-Hyper-V"
}
}
}

FooBar -Foo
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset