Add-PSSnapin citrix.*
$Pathtest=Test-Path "servers.csv"
If (!$Pathtest)
{
write-host -ForegroundColor Red "servers.csv file does not exit"
Exit
}
$ServerList = Import-Csv servers.csv -header "Servers"
$PubFolderPath = Read-Host "Enter the path in appcenter (ex:\Applications\FX PrimeVerify\)"
$application=Get-XAApplication -FolderPath $PubFolderPath | Sort-Object
foreach ($Server in $ServerList){
$Server = $Server -replace "@{servers=",""
$Server = $Server -replace "}",""
foreach($app in $application)
{
Add-XAApplicationServer -BrowserName $app.BrowserName -ServerNames $Server
}
}
$Pathtest=Test-Path "servers.csv"
If (!$Pathtest)
{
write-host -ForegroundColor Red "servers.csv file does not exit"
Exit
}
$ServerList = Import-Csv servers.csv -header "Servers"
$PubFolderPath = Read-Host "Enter the path in appcenter (ex:\Applications\FX PrimeVerify\)"
$application=Get-XAApplication -FolderPath $PubFolderPath | Sort-Object
foreach ($Server in $ServerList){
$Server = $Server -replace "@{servers=",""
$Server = $Server -replace "}",""
foreach($app in $application)
{
Add-XAApplicationServer -BrowserName $app.BrowserName -ServerNames $Server
}
}
No comments:
Post a Comment