Sign in
|
Join PowerShell.com!
|
Help
Home
PowerTips
Ask the Experts
Forums
Webcasts
Blogs
eBookV2
Script Library
Twitter Grid
Modules
QuickClick
Scripts
Snippets
Videos
Library
»
Script Library
»
SharePoint
»
Get-SPAdminAppPath
Get-SPAdminAppPath
Share
|
Browse Library
Module Library
QuickClick Library
Script Library
Active Directory
BizTalk
Citrix
Clustering
Desktop
Exchange Server 2003
Exchange Server 2007
File System
Group Policy
Internet Information Server (IIS)
Local Accounts
Logs
Microsoft Office
Microsoft Team Foundation Server
MySQL
Networking
Registry
Remote Desktop Services
Remoting
Security
SharePoint
SQL Server
System Center Virtual Machine Manager
System Center Configuration Manager
System Center Operations Manager
Tutorial
Terminal Server
Using .Net
Virtual Server
VMware
Windows 7
Windows HPC
Windows Server 2000
Windows Server 2003
Windows Server 2008
Windows XP
WMI
Misc
Snippet Library
Video Library
Members Only
Tags
Administration
AppPath
Content Type
Content Types
Developer Dashboard
Development
Documents
Export
Fabulous 40
KLBase
KnowledgeLake
Libraries
Library
List
Lists
Management
Reporting
SharePoint
Sites
Solution
Solution Management
Solutions
Templates
Troubleshooting
Upgrade
View more
Previous
|
Next
|
View all files
|
View Slideshow
Download
posted by
Richard Giles
10-06-2008
Downloads: 453
File size: 979 B
Views: 1,255
Embed
Get-SPAdminAppPath
## =====================================================================
## Title
: Get-SPAdminAppPath
## Description : Retrieve web site administrative application path
## Author
: Idera
## Date
: 8/5/2008
## Input
: -verbose -debug
## Output
: Central administration web path
## Usage
: PS> . Get-SPAdminAppPath -v -d
## Notes
: Attributed to Serge van den Oever
## Tag
: PowerShell, Sharepoint
## =====================================================================
param
(
[
switch
]
$verbose
,
[
switch
]
$debug
)
function
main()
{
if
(
$verbose
) {
$VerbosePreference
=
"Continue"
}
if
(
$debug
) {
$DebugPreference
=
"Continue"
}
Get-SPAdminAppPath
}
function
Get-SPAdminAppPath
()
{
[
void
][
reflection.assembly
]::
LoadWithPartialName
(
"Microsoft.SharePoint"
)
[
Microsoft.SharePoint.Administration.SPAdministrationWebApplication
]::
Local.IisSettings.get_Item
(0).
Path.FullName
}
main
Filed under:
AppPath
,
SharePoint
Retrieve web site administrative application path.
Copyright 2012 PowerShell.com. All rights reserved.