Web Farm Framework 2.0 for IIS 7 cmdlets for Windows PowerShell
by Randall DuBois
You can use the Web Farm Framework cmdlets for Windows PowerShell to configure and manage your server farm. You must have Windows PowerShell installed on the web farm controller.
To use the Web Farm Framework cmdlets for Windows PowerShell
- On the controller server, open a command prompt.
To start the PowerShell console, enter the following command:
At the PowerShell prompt, enter the following command:
The Web Farm Framework snapin for Windows PowerShell is loaded.
At the PowerShell prompt, type the following command to display a list of the available WFF cmdlets:
The list is displayed as in the following image:
Viewing cmdlet Syntax and Help
To get help for each cmdlet, enter get-Help <cmdletName> -full. For example, to get help for the Get-ActiveOperation cmdlet, enter the following command.
Get-Help Get-ActiveOperation -full
Managing Servers Using the cmdlets
You can perform management tasks for the server farm or a specific server in the farm using the cmdlets. The following table lists the cmdlets for these tasks.
|Get-ActiveOperation||Returns the operations currently running on the server or server farm.|
|Get-AvailableOperation||Returns the operations available on the server or server farm.|
|Get-Server||Returns a list of servers in the farm, or, if you specify a signal server, it returns the specified server.|
|Get-ServerProcess||Returns a list of the processes currently running on the server or server farm.|
|Get-ServerRequest||Returns a list of the requests currently being processed on the server or server farm.|
|Get-TraceMessage||Returns a list of the trace messages from the server or server farm.|
|Get-WeNbFarm||Returns the name of the server farm or farms available.|
|Install-ServerProduct||Installs the specified product on the server or server farm.|
|New-CredentialStoreTarget||Adds a new target to the Windows credential store.|
|New-MiniDump||Returns dump information from the server.|
|New-Server||Adds a server to an existing server farm.|
|New-WebFarm||Creates a new server farm.|
|Remove-CredentialStoreTarget||Removes a target from the Windows credential store.|
|Remove-Server||Removes a server from the server farm.|
|Remove-WebFarm||Removes a server farm.|
|Run-Operation||Executes the specified operation on the server or server farm.|
|Start-Server||Starts the specified server.|
|Stop-Server||Stops the specified server.|
Creating a Server Farm Using the cmdlets
To create a server farm, at the PowerShell prompt, enter the following cmdlet:
Provide the name of the new web farm and your credentials as prompted.
To verify the server farm was created, use the Get-WebFarm cmdlet, as follows:
Adding a Server to a Server Farm Using the cmdlets
To add a server to an existing server farm, at the PowerShell prompt, enter the following command:
Provide the name of the web farm and server address as prompted.
To verify that the server was added, use the Get-Server Nmdlet as follows:
The servers in the farm are displayed.
Adding Credentials to Windows Credential Store
Using Window's credential store, users can store passwords and access credential stored password information via the command-line. This is very useful if you want keep your password from showing up in any log files that may capture command line input. The credential store saves a target along with your user name and password. The target is a string that is used to identify the credential information.
To add a new target to an existing server farm, at the PowerShell prompt, enter the following command:
Provide the target and your credentials as prompted.
Removing Credentials from Windows Credential Store
To remove an existing target (and therefore the associated credentials), at the PowerShell prompt, enter the following command:
Provide the target to be removed as prompted.