Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
Param (
[string] $Topology
function ConvertTo-CompressedBase64String {
Param (
[ValidateScript( {
if (-Not ($_ | Test-Path)) {
throw "The file or folder $_ does not exist"
if (-Not ($_ | Test-Path -PathType Leaf)) {
throw "The Path argument must be a file. Folder paths are not allowed."
return $true
[string] $Path
$fileBytes = [System.IO.File]::ReadAllBytes($Path)
[System.IO.MemoryStream] $memoryStream = New-Object System.IO.MemoryStream
$gzipStream = New-Object System.IO.Compression.GzipStream $memoryStream, ([IO.Compression.CompressionMode]::Compress)
$gzipStream.Write($fileBytes, 0, $fileBytes.Length)
$compressedFileBytes = $memoryStream.ToArray()
$encodedCompressedFileData = [Convert]::ToBase64String($compressedFileBytes)
return $encodedCompressedFileData
# retrieve the current script path
$scriptPath = Split-Path $MyInvocation.MyCommand.Path
ConvertTo-CompressedBase64String -Path $scriptPath\..\resources\license.xml | Out-File -Encoding ascii -NoNewline -Confirm -FilePath $scriptPath\..\sitecore\k8s\$Topology\secrets\sitecore-license.txt