This message was deleted.
# citrix-vad
s
This message was deleted.
j
I'd install the same version fresh on the a 3rd server, export configs+subscriptions from your existing servers, import onto 3rd config+subs, add 4th server to 3rd servers server group for new pair. Add 2 new server objects in NS, add to service group, down the old servers when you have an opportunity.
⤴️ 2
💯 1
r
Yea I do the same. Now I have don’t what you’re asking @Matt Nation but only in labs when I was in a hurry and it did work. But not in prod, I like my career :)
j
I was bored so I chatGPT'd this up... also a lot of Storefront questions lately. It takes the 4 operations from the documentation; Export Config, Export Subs, Import Config, Import Subs and makes it menu driven. Prompts for location to save exports, appends date time to files, import scans config export dir for *.zip's prints options for you to select, subscriptions scans for txts similarly. I did not go through the trouble of doing a param for password for encrypted exports...because write-host params would mean password would be logged in powershell audit and chatgpt barfed with i tried to capture the password otherwise.
Copy code
function Show-Menu {
    Clear-Host
    Write-Host "1. Export STF Config"
    Write-Host "2. Export Subscription Data"
    Write-Host "3. Import STF Config"
    Write-Host "4. Import Subscription Data"
    Write-Host "5. Exit"
}

function Export-STFConfig {
    param(
        [string]$targetFolder = (Read-Host "Enter target folder (default: $env:userprofile\desktop\)"),
        [string]$zipFileName = (Read-Host "Enter zip filename (default: CTXSFbackup)")
    )

    if ($targetFolder -eq "") { $targetFolder = "$env:userprofile\desktop\" }
    if ($zipFileName -eq "") { $zipFileName = "CTXSFbackup" }

    $dateTimeStamp = Get-Date -Format "yyyyMMdd_HHmm"
    $fullZipFileName = "${zipFileName}_${dateTimeStamp}.zip"

    Export-STFConfiguration -targetFolder $targetFolder -zipFileName $fullZipFileName -NoEncryption
}

function Export-SubscriptionData {
    param(
        [string]$storeName = (Read-Host "Enter Store Name, Example: <http://storefront.domain.com/Citrix/STORENAME%22|storefront.domain.com/Citrix/STORENAME">),
        [string]$subsExportLocation = (Read-Host "Enter subscription export location (default: $env:userprofile\desktop\)")
    )

    if ($subsExportLocation -eq "") { $subsExportLocation = "$env:userprofile\desktop\" }

    $dateTimeStamp = Get-Date -Format "yyyyMMdd_HHmm"
    $fullSubsFileName = "Subscriptions_${dateTimeStamp}.txt"

    $StoreObject = Get-STFStoreService -SiteID 1 -VirtualPath "/citrix/$storeName"
    Export-STFStoreSubscriptions -StoreService $StoreObject -FilePath (Join-Path $subsExportLocation $fullSubsFileName)
}

function Import-STFConfig {
    param(
        [string]$importLocation = (Read-Host "Enter import location for configuration")
    )

    $eligibleFiles = Get-ChildItem -Path $importLocation -Filter *.zip

    if ($eligibleFiles.Count -eq 0) {
        Write-Host "No eligible files found in the specified directory."
        return
    }

    Write-Host "Eligible files in $importLocation"
    $eligibleFiles | ForEach-Object { Write-Host $_.Name }

    $selectedFile = Read-Host "Select a file to import"
    # Add your Import-STFConfiguration command here using $selectedFile
}

function Import-SubscriptionData {
    param(
        [string]$importLocation = (Read-Host "Enter import location for subscription data"),
        [string]$storeName = (Read-Host "Enter Store Name, Example: <http://storefront.domain.com/Citrix/STORENAME%22|storefront.domain.com/Citrix/STORENAME">)
    )

    $eligibleFiles = Get-ChildItem -Path $importLocation -Filter *.txt

    if ($eligibleFiles.Count -eq 0) {
        Write-Host "No eligible text files found in the specified directory."
        return
    }

    Write-Host "Eligible text files in $importLocation"
    $eligibleFiles | ForEach-Object { Write-Host $_.Name }

    $selectedFile = Read-Host "Select a text file to import"
    $StoreObject = Get-STFStoreService -SiteID 1 -VirtualPath "/citrix/$storeName"
    Import-STFStoreSubscriptions -StoreService $StoreObject -FilePath (Join-Path $importLocation $selectedFile)
}

do {
    Show-Menu
    $choice = Read-Host "Enter your choice (1-5)"

    switch ($choice) {
        1 { Export-STFConfig }
        2 { Export-SubscriptionData }
        3 { Import-STFConfig }
        4 { Import-SubscriptionData }
        5 { break }
        default { Write-Host "Invalid choice. Please enter a number from 1 to 5." }
    }

    pause
} while ($choice -ne 5)
m
Gotcha. I was hoping to use the built in server group sync to add new and then remove old.
j
is your end goal to upgrade just OS? or OS and storefront?
m
Currently have two 2016 servers. I have stood up two new 2022 servers. The 2016s will be decommissioned as soon as new has been validated
r
I’m a phone call away :)
m
That’s what @Shane Kleinert used to say until he wasn’t a phone call away!
🙃 1
j
The Friday at 7pm ping 🍻
Brave man Matt 😆
m
And I have the old servers upgraded to new storefront now
Which was somewhat disastrous
r
Haha- Shane’s in some deep stuff man. Super busy
m
At home or work? 😂
We all know he’s up til 2am trimming that beard. @James Kindon can surely verify this
r
He does have a nice beard though
s
Ha!!! At the panthers game mate! seeing these messages! Friday night matt’s kicking off an upgrade like a boss. I usually do export / import method mentioned above in parallel. You’re in good hands with the guys! Gotta get Ray and I still waiting on you to hop on a call! :) Let’s hop on next week to catch up, been to long!
up all hours man, not on here to much, been balls deep in azure land lately. hopefully teams isn’t still kicking your ass Rays been kicking the new teams ass getting into the weeds
nothing like ray’s beard… he strokes it when on a call when he gets excited it’s the best to witness
🤣 1
m
Good to hear. Don’t neglect 11 22h3 multisession… that’s where the fun is
Can’t be as bad as rich gripping his biceps
😂 1
s
Nice, 23H2 land, curious how that went for ya, deff gotta catch up. Rays been in CPM container land nice deep dive him and oz have been doing
j
Confirmed. It’s a nice beard.
🙏 1
r
Yea man, Teams and CPM been deep in it. Haha, yea I started stroking my beard when thinking lmao. Never realized I did that until Shane said something, now I laugh when I do it, like master Shofu haha
😋 1