sqlagent007
asked on
Windows Server 2008 R2 - powershell: term 'Get-WebConfiguration' is not recognized as the name of a cmdlet, function, script file, or operable program
I am trying to automate some IIS tasks, and the commands I need to use are not working:
However when I run the Get-Module -ListAvailable, the WebAdministration show up
Even the basic command:
Please help me figure out what I need to do to get this working. I am using powershell as the local administrator.
Get-WebConfiguration $pathToSite | select *
set-WebConfigurationproperty $pathToValues -name username -value $taregtUser
set-WebConfigurationproperty $pathToValues -name password -value $taregtPWD
However when I run the Get-Module -ListAvailable, the WebAdministration show up
PS C:\Program Files\IIS> Get-Module -ListAvailable
ModuleType Name ExportedCommands
---------- ---- ----------------
Manifest ActiveDirectory {}
Manifest ADRMS {}
Manifest AppLocker {}
Manifest BestPractices {}
Manifest BitsTransfer {}
Manifest PSDiagnostics {}
Manifest ServerManager {}
Manifest TroubleshootingPack {}
Manifest WebAdministration {}
Even the basic command:
Get-WebConfiguration
returns an error:The term 'Get-WebConfiguration' 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.
At line:1 char:21
+ Get-WebConfiguration <<<<
+ CategoryInfo : ObjectNotFound: (Get-WebConfiguration:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Please help me figure out what I need to do to get this working. I am using powershell as the local administrator.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER