-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bbf46ea
commit e0878d9
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
function Get-CitrixShareFile { | ||
<# | ||
.SYNOPSIS | ||
Returns the current Citrix ShareFile for Windows releases. | ||
.NOTES | ||
Author: Tschuegy | ||
Twitter: | ||
#> | ||
[OutputType([System.Management.Automation.PSObject])] | ||
[CmdletBinding(SupportsShouldProcess = $false)] | ||
param ( | ||
[Parameter(Mandatory = $false, Position = 0)] | ||
[ValidateNotNull()] | ||
[System.Management.Automation.PSObject] | ||
$res = (Get-FunctionResource -AppName ("$($MyInvocation.MyCommand)".Split("-"))[1]) | ||
) | ||
|
||
# Read the Citrix ShareFile for Windows for updater feed | ||
$params = @{ | ||
Uri = $res.Get.Update.Uri | ||
} | ||
$UpdateFeed = Invoke-RestMethodWrapper @params | ||
|
||
# Walk through each node to output details | ||
if ($null -ne $UpdateFeed) { | ||
|
||
# Select the latest version | ||
$Latest = $UpdateFeed | ` | ||
Sort-Object -Property @{ Expression = { [System.Version]$_.Version }; Descending = $true } -ErrorAction "SilentlyContinue" | ` | ||
Select-Object -First 1 | ||
|
||
# Create the output object | ||
$PSObject = [PSCustomObject] @{ | ||
Version = $Latest.enclosure.version | ||
Date = ConvertTo-DateTime -DateTime $($Latest.pubDate) -Pattern $($res.Get.Update.DatePattern) | ||
Size = $(if ($Latest.enclosure.length) { $Latest.enclosure.length } else { "Unknown" }) | ||
Hash = $Latest.enclosure.dsaSignature | ||
URI = $Latest.enclosure.url | ||
} | ||
Write-Output -InputObject $PSObject | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"Name": "Citrix ShareFile for Windows", | ||
"Source": "https://www.citrix.com/downloads/sharefile/clients-and-plug-ins/citrix-files-for-windows.html", | ||
"Get": { | ||
"Update": { | ||
"Uri": "http://www.sf-cdn.net/downloads/cfwin/updates.xml", | ||
"DatePattern": "ddd, dd MMM yyyy HH:mm:ss zzzz" | ||
} | ||
}, | ||
"Install": { | ||
"Setup": "CitrixFilesForWindows*.exe|ShareFileForWindows*.exe", | ||
"Physical": { | ||
"Arguments": "/install /quiet /norestart", | ||
"PostInstall": [] | ||
}, | ||
"Virtual": { | ||
"Arguments": "/install /quiet /norestart", | ||
"PostInstall": [] | ||
} | ||
} | ||
} |