0 Replies Latest reply on Jul 10, 2017 10:46 AM by tfbissett

    PowerShell script to display Server Roles error Output Result "Not Defined"

    tfbissett

      I'm building a SAM template to display the Server Roles installed on a Windows Server I have PowerShell and WINRM configured, I have a script that runs within a PS command window I put it in a Template and it fail's with the Output Not Defined in the "Edit Script" window when the template is applied to a server it reports down

       

      Script text:

       

      Import-Module servermanager

      #Saves needed Properties to a variable with logic

      $ServerFeatures = Get-WindowsFeature | Select-Object -Property "Name","Installed","FeatureType" | Where-Object{$_.installed -eq $true}

      #Displays Output

      $ServerFeatures

       

      any thoughts or suggestions........