Closed lukesmith closed 10 years ago
I've just tried using this module and i'm encountering the following error when installing a feature
Where-Object : Cannot bind parameter 'FilterScript'. Cannot convert the "Instal lState" value of type "System.String" to type "System.Management.Automation.Scr iptBlock". At line:1 char:74 + Import-Module ServerManager; if((Get-WindowsFeature NET-Framework | where <<< < InstallState -eq 'Available').count-eq 0){ exit 1 } + CategoryInfo : InvalidArgument: (:) [Where-Object], ParameterBi ndingException + FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerSh ell.Commands.WhereObjectCommand
The command it's failing on is, and is reproducible running manually
powershell.exe -ExecutionPolicy RemoteSigned -Command "Import-Module ServerManager; if((Get-WindowsFeature NET-Framework | where InstallState -eq 'Available').count-eq 0){ exit 1 }"
I've had a look to see what the issue is and found that the following works but I'm surprised this hasn't caused an issue for anyone else?
powershell.exe -ExecutionPolicy RemoteSigned -Command "Import-Module ServerManager; if((Get-WindowsFeature NET-Framework | where { $_.InstallState -eq 'Available' }).count-eq 0){ exit 1 }"
MY apologies for thsi - it has been fixed in the latest version - i am just uploading this to the forge now. Version 0.1.2 is the package you want to cure this
I've just tried using this module and i'm encountering the following error when installing a feature
The command it's failing on is, and is reproducible running manually
I've had a look to see what the issue is and found that the following works but I'm surprised this hasn't caused an issue for anyone else?