1

Given MS Server 2008 r2, IIS 7.0 upgraded to 7.5 Powershell 2.0 upgraded to 3.0

Execute command import-module WebAdministration It completes without errors. Then call get-command -module WebAdministration It discovers that only two commands are exposed by module:

CommandType Name
----------- ----
Alias Begin-WebCommitDelay
Alias End-WebCommitDelay

So no any other method like Get-WebSite for example.

Why powershell does not see all available cmdlets that has to be contained in WebAdministration?

I have my development Win7 machine and everything works good. Have access to all what I need.

UPD as was suggested in comment provide you with output of importing run with debug switch:

PS C:\Windows\System32\WindowsPowerShell\v1.0> import-module WebAdministration -
Force -Debug
VERBOSE: Loading module from path
'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WebAdministration\WebAdmini
stration.psd1'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help
(default is "Y"):y
VERBOSE: Loading 'Assembly' from path
'C:\Windows\assembly\GAC_MSIL\Microsoft.IIS.PowerShell.Framework\7.5.0.0__31bf3
856ad364e35\Microsoft.IIS.PowerShell.Framework.dll'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help
(default is "Y"):
VERBOSE: Loading 'TypesToProcess' from path
'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WebAdministration\iisprovid
er.types.ps1xml'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help
(default is "Y"):
VERBOSE: Loading 'FormatsToProcess' from path
'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WebAdministration\iisprovid
er.format.ps1xml'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help
(default is "Y"):
VERBOSE: Loading module from path
'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WebAdministration\Microsoft
.IIS.PowerShell.Provider.dll'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help
(default is "Y"):
VERBOSE: Loading module from path
'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WebAdministration\WebAdmini
strationAliases.ps1'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help
(default is "Y"):
VERBOSE: Dot-sourcing the script file
'C:\Windows\system32\WindowsPowerShell\v1.0\Modules\WebAdministration\WebAdmini
strationAliases.ps1'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help
(default is "Y"):
VERBOSE: Exporting alias 'Begin-WebCommitDelay'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help
(default is "Y"):
VERBOSE: Exporting alias 'End-WebCommitDelay'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help
(default is "Y"):
VERBOSE: Importing alias 'Begin-WebCommitDelay'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help
(default is "Y"):
VERBOSE: Importing alias 'End-WebCommitDelay'.

Confirm
Continue with this operation?
[Y] Yes  [A] Yes to All  [H] Halt Command  [S] Suspend  [?] Help

UPD2: Seems problems related with version of Powershell, that is 3.0. When I run powershell with -version 2 WebAdmininstration's cmdlets work properly. But why 3.0 misses WebAdministration's commands, that's question.

DotNetter
  • 426
  • 2
  • 6
  • 19

0 Answers0