PowerShell Script Create/Configure Access Service Application
function AccessSACreationScript()
{
$saAppPool=read-host "Enter the Application Pool Name for the Access Service Application Configuration" `r`n
write-host "Application Pool Name Entered is :" $saAppPool `r`n
$saApp = Get-SPServiceApplicationPool -Identity $saAppPool -EA 0
if($saApp -ne $null)
{
Write-Host "Valid Application Pool..." `r`n
$serviceName=read-host "Enter the Service Name for Access Service Application :" `r`n
write-host "Access Service Application Name Enterd is :" $serviceName `r`n
$TempServiceName = Get-SPAccessServiceApplication -identity $serviceName -EA 0
if($TempServiceName -ne $null)
{
write-host "Access Service Application Already exist with this Name :" $TempServiceName.Name `r`n
}
else
{
New-SPAccessServiceApplication -Name $serviceName -ApplicationPool $saAppPool -Default
write-host "Access Service Application Created successfully with Name :" $serviceName `r`n
}
}
else
{
Write-Host "Entered the In-Valid Application Pool Name/No Application Exist with this Name." `r`n
}
}
AccessSACreationScript
function AccessSACreationScript()
{
$saAppPool=read-host "Enter the Application Pool Name for the Access Service Application Configuration" `r`n
write-host "Application Pool Name Entered is :" $saAppPool `r`n
$saApp = Get-SPServiceApplicationPool -Identity $saAppPool -EA 0
if($saApp -ne $null)
{
Write-Host "Valid Application Pool..." `r`n
$serviceName=read-host "Enter the Service Name for Access Service Application :" `r`n
write-host "Access Service Application Name Enterd is :" $serviceName `r`n
$TempServiceName = Get-SPAccessServiceApplication -identity $serviceName -EA 0
if($TempServiceName -ne $null)
{
write-host "Access Service Application Already exist with this Name :" $TempServiceName.Name `r`n
}
else
{
New-SPAccessServiceApplication -Name $serviceName -ApplicationPool $saAppPool -Default
write-host "Access Service Application Created successfully with Name :" $serviceName `r`n
}
}
else
{
Write-Host "Entered the In-Valid Application Pool Name/No Application Exist with this Name." `r`n
}
}
AccessSACreationScript