Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

add-pssnapin WebAdministration - Need assistance new to PowerShell

$
0
0

Hi I am studying for 70-643 and on the ISS portion.  The text book stated to do the following items listed at the bottom of the page in qoutes. I have ran into a problem.  I cannot get the following command in power shell to work: add-pssnapin WebAdministration 

I did some research and came to this website on here, It explained how to turnon scripts which I did.   I then tried the command again but got the following error

----------------------------------------------------------------------------------------------------------------------------------------

PS C:\Users\Administrator> add-pssnapin webadministration
dd-pssnapin : The Windows PowerShell snap-in 'webadministration' is not installed on this computer.
t line:1 char:1
 add-pssnapin webadministration
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   + CategoryInfo          : InvalidArgument: (webadministration:String) [Add-PSSnapin], PSArgumentException
   + FullyQualifiedErrorId : AddPSSnapInRead,Microsoft.PowerShell.Commands.AddPSSnapinCommand

-------------------------------------------------------------------------------------------------------------------

I then looked on this website and someone said something about getting the module information so I typed that in and got the informaton below.

I really cannot practice those commands they give fromthe MCTS Self-Paced book because they are not working. Any idea on why?  I am running Server 2008 R2 virtual machines and have installed the IIS basic roles.

--------------------------------------------------------------------------------------------------------------------

PS C:\Users\Administrator> get-module -listavailable


    Directory: C:\Windows\system32\WindowsPowerShell\v1.0\Modules


ModuleType Name                                ExportedCommands
---------- ----                                ----------------
Manifest   ActiveDirectory                     {Get-ADRootDSE, New-ADObject, Rename-ADObject, Move-ADObject...}
Manifest   ADRMS                               {Update-ADRMS, Uninstall-ADRMS, Install-ADRMS}
Manifest   AppLocker                           {Set-AppLockerPolicy, Get-AppLockerPolicy, Test-AppLockerPolicy, Get-...
Manifest   BestPractices                       {Get-BpaModel, Invoke-BpaModel, Get-BpaResult, Set-BpaResult}
Manifest   BitsTransfer                        {Add-BitsFile, Remove-BitsTransfer, Complete-BitsTransfer, Get-BitsTr...
Manifest   CimCmdlets                          {Get-CimAssociatedInstance, Get-CimClass, Get-CimInstance, Get-CimSes...
Manifest   GroupPolicy                         {Backup-GPO, Copy-GPO, Get-GPInheritance, Get-GPO...}
Script     ISE                                 {New-IseSnippet, Import-IseSnippet, Get-IseSnippet}
Manifest   Microsoft.PowerShell.Diagnostics    {Get-WinEvent, Get-Counter, Import-Counter, Export-Counter...}
Manifest   Microsoft.PowerShell.Host           {Start-Transcript, Stop-Transcript}
Manifest   Microsoft.PowerShell.Management     {Add-Content, Clear-Content, Clear-ItemProperty, Join-Path...}
Manifest   Microsoft.PowerShell.Security       {Get-Acl, Set-Acl, Get-PfxCertificate, Get-Credential...}
Manifest   Microsoft.PowerShell.Utility        {Format-List, Format-Custom, Format-Table, Format-Wide...}
Manifest   Microsoft.WSMan.Management          {Disable-WSManCredSSP, Enable-WSManCredSSP, Get-WSManCredSSP, Set-WSM...
Manifest   NetworkLoadBalancingClusters        {Add-NlbClusterNode, Add-NlbClusterNodeDip, Add-NlbClusterPortRule, A...
Script     PSDiagnostics                       {Disable-PSTrace, Disable-PSWSManCombinedTrace, Disable-WSManTrace, E...
Binary     PSScheduledJob                      {New-JobTrigger, Add-JobTrigger, Remove-JobTrigger, Get-JobTrigger...}
Manifest   PSWorkflow                          {New-PSWorkflowExecutionOption, New-PSWorkflowSession, nwsn}
Manifest   PSWorkflowUtility                   Invoke-AsWorkflow
Manifest   ServerManager                       {Get-WindowsFeature, Add-WindowsFeature, Remove-WindowsFeature}
Manifest   TroubleshootingPack                 {Get-TroubleshootingPack, Invoke-TroubleshootingPack}
Manifest   WebAdministration                   {Start-WebCommitDelay, Stop-WebCommitDelay, Get-WebConfigurationLock,...


PS C:\Users\Administrator>

----------------------------------------------------------------------------------------------------------------------------------------------

" Using Windows PowerShell
In addition to using the AppCmd utility, web server administrators can use the command shell and scripting language, Windows PowerShell. In Windows Server 2008 R2, Windows PowerShell 2.0 is installed and enabled by default. Windows PowerShell enables you to write and create powerful scripts for performing many common administration operations.

Windows Server 2008 R2 includes a module that contains many new cmdlets for IIS administration. You can add this IIS Module manually by typing add-pssnapin WebAdministration at a Windows PowerShell prompt.

The following Windows PowerShell cmdlets are useful for IIS administration.

Get-PSProvider Verifies that the WebAdministration PowerShell module is installed.

Get-ChildItem IIS:\ Displays a list of items in the root of the IIS namespace.

Get-ChildItem IIS:\Site\ Displays a list of websites on the server.

Install-ADServiceAccount This cmdlet is not specific to the IIS module, but it is useful for IIS administration. It installs an existing Active Directory managed service account on the computer on which the cmdlet is run. The password of the service account is then periodically reset without user interaction."

    =========================================

    Any help is appreciated.


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>