forked from haavarstein/Evergreen
-
Notifications
You must be signed in to change notification settings - Fork 0
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
c6a5165
commit 31b660b
Showing
8 changed files
with
118 additions
and
103 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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
@@ -1,8 +1,36 @@ | ||
Function Get-XenServerTools { | ||
$Uri = "https://pvupdates.vmd.citrix.com/updates.latest.tsv" | ||
$TempFile = New-TemporaryFile | ||
Invoke-WebRequest -Uri $Uri -OutFile $TempFile | ||
$RawContent = Get-Content $TempFile | ||
$Table = $RawContent | ConvertFrom-Csv -Delimiter "`t" -Header "Uri", "Version", "Size", "Architecture", "Index" | ||
Write-Output $Table | ||
<# | ||
.SYNOPSIS | ||
Get the current version and download URL for the XenServer tools. | ||
.NOTES | ||
Site: https://stealthpuppy.com | ||
Author: Aaron Parker | ||
Twitter: @stealthpuppy | ||
.LINK | ||
https://github.com/aaronparker/Get.Software | ||
.EXAMPLE | ||
Get-XenServerTools | ||
Description: | ||
Returns the current version and download URLs for XenServer tools. | ||
#> | ||
[CmdletBinding()] | ||
Param() | ||
|
||
#region Get XenServer tool details | ||
$Content = Invoke-WebContent -Uri $script:resourceStrings.Applications.XenServerTools.Uri -Raw | ||
$Table = $Content | ConvertFrom-Csv -Delimiter "`t" -Header "Uri", "Version", "Size", "Architecture", "Index" | ||
ForEach ($row in $Table) { | ||
$PSObject = [PSCustomObject]@{ | ||
Version = $row.Version | ||
Architecture = $row.Architecture | ||
URI = $row.Uri | ||
Size = $row.Size | ||
} | ||
Write-Output $PSObject | ||
} | ||
#endregion | ||
} |