February 2013
Intermediate to advanced
304 pages
8h 26m
English
Scenario/Problem: You need to remove a web application from the current server configuration.
Solution: Use the Remove-SPWebApplication cmdlet with a web application variable.
The Remove-SPWebApplication cmdlet enables you to remove a specific web application from the current server. Use this in conjunction with the Get-SPWebApplication cmdlet (explained in a previous section), as shown in Listing 5.3, or just use the web application identity directly in line, as shown in Listing 5.4.
Listing 5.3. Removing a Web Application Using a Variable Example
$webApp = Get-SPWebApplication -Identity "PSWebApp"Remove-SPWebApplication $webApp
Listing 5.4. Removing a Web Application Directly
Remove-SPWebApplication -Identity ...
Read now
Unlock full access