Fixing the installation check. It was throwing the following error:

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

This has now been taken care of by adding in the correct expression