title: PowerShell Add-WindowsFeature unrecognized
body: <p>Thanks first of all for reviewing this.</p>
  
  <p>I've basically got a third-party agent software which allows me to execute PowerShell as LocalSystem. This allows me to easily run remote PowerShell commands without WinRM etc.</p>
  
  <p>The problem that i'm running into is that on some servers i'm not able to perform get-WindowsFeature or Add-WindowsFeature.</p>
  
  <p>An example of how i'm trying to achieve this is here:</p>
  
  <pre><code>Import-Module ServerManager;
  Get-WindowsFeature;
  </code></pre>
  
  <p>The output is as such:</p>
  
  <pre><code>The term 'Get-WindowsFeature' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
  </code></pre>
  
  <p>If I type those same commands into a PowerShell window, or call PowerShell.exe directly, it returns. I'm trying to figure out what we're not doing right within the application, but i'm the most familiar person with PowerShell here. </p>
  
  <p>Is there something special I need to do to load those cmdlets? Get-Module doesn't show anything, oddly.</p>
  
  <p>Thank you!</p>
  
  <hr>
  
  <p>In response to JBSmith:</p>
  
  <p>Yessir - looks like 2.0. Here are the results of the commands you mentioned</p>
  
  <pre><code>&gt;Name                           Value                                            
  &gt;----                           -----                                            
  &gt;CLRVersion                     2.0.50727.6407                                   
  &gt;BuildVersion                   6.1.7600.16385                                   
  &gt;PSVersion                      2.0                                              
  &gt;WSManStackVersion              2.0                                              
  &gt;PSCompatibleVersions           {1.0, 2.0}                                       
  &gt;SerializationVersion           1.1.0.1                                          
  &gt;PSRemotingProtocolVersion      2.1                                              
  &gt;
  &gt;Name : AppLocker
  &gt;Name : Appx
  &gt;Name : BestPractices
  &gt;Name : BitsTransfer
  &gt;Name : BranchCache
  &gt;Name : CimCmdlets
  &gt;Name : DirectAccessClientComponents
  &gt;Name : Dism
  &gt;Name : DnsClient
  &gt;Name : International
  &gt;Name : iSCSI
  &gt;Name : IscsiTarget
  &gt;Name : ISE
  &gt;Name : Kds
  &gt;Name : Microsoft.PowerShell.Diagnostics
  &gt;Name : Microsoft.PowerShell.Host
  &gt;Name : Microsoft.PowerShell.Management
  &gt;Name : Microsoft.PowerShell.Security
  &gt;Name : Microsoft.PowerShell.Utility
  &gt;Name : Microsoft.WSMan.Management
  &gt;Name : MMAgent
  &gt;Name : MsDtc
  &gt;Name : NetAdapter
  &gt;Name : NetConnection
  &gt;Name : NetLbfo
  &gt;Name : NetQos
  &gt;Name : NetSecurity
  &gt;Name : NetSwitchTeam
  &gt;Name : NetTCPIP
  &gt;Name : NetworkConnectivityStatus
  &gt;Name : NetworkTransition
  &gt;Name : MSFT_NfsMappedIdentity
  &gt;Name : NFS
  &gt;Name : PKI
  &gt;Name : PrintManagement
  &gt;Name : PSDiagnostics
  &gt;Name : PSScheduledJob
  &gt;Name : PSWorkflow
  &gt;Name : PSWorkflowUtility
  &gt;Name : RemoteDesktop
  &gt;Name : ScheduledTasks
  &gt;Name : SecureBoot
  &gt;Name : ServerCore
  &gt;Name : ServerManager
  &gt;Name : ServerManagerTasks
  &gt;Name : SmbShare
  &gt;Name : SmbWitness
  &gt;Name : Storage
  &gt;Name : TroubleshootingPack
  &gt;Name : TrustedPlatformModule
  &gt;Name : UserAccessLogging
  &gt;Name : VpnClient
  &gt;Name : Wdac
  &gt;Name : Whea
  &gt;Name : WindowsDeveloperLicense
  &gt;Name : WindowsErrorReporting
  &gt;Name : AWSPowerShell
  </code></pre>
  
  <p>I also noticed that GCM | ? { $_.ModuleName -eq 'ServerManager' }  returns nothing when I run it through there, but through a normal PS window it returns a command list as expected.</p>