Test-EvergreenApp¶
SYNOPSIS¶
Validates target URIs passed to this function from Get-EvergreenApp
.
SYNTAX¶
Test-EvergreenApp [-InputObject] <PSObject> [-Proxy <String>] [-ProxyCredential <PSCredential>] [-Force]
[-NoProgress] [-WhatIf] [-Confirm] [<CommonParameters>]
DESCRIPTION¶
Evergreen includes the function Test-EvergreenApp
that can test whether the application installer URLs returned from Get-EvergreenApp
exist at the URL specified. Test-EvergreenApp
will enable you to quickly validate whether the application installer exists.
EXAMPLES¶
EXAMPLE 1¶
Get-EvergreenApp -Name "MicrosoftOneDrive" | Test-EvergreenApp
Description: Validates the URI properties for each object returned from Get-EvergreenApp -Name "MicrosoftOneDrive"
and returns a true or false result if the URI exists or does not exist.
PARAMETERS¶
-InputObject¶
Test-EvergreenApp
accepts the PSObject from Get-EvergreenApp
. Test-EvergreenApp
will test for the existence of at least these properties - Version and URI.
Type: PSObject
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-Proxy¶
Specifies a proxy server for the request, rather than connecting directly to the internet resource. Enter the URI of a network proxy server. Note - this is experimental support for proxies.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ProxyCredential¶
Specifies a user account that has permission to use the proxy server that is specified by the Proxy parameter. The default is the current user.
Type a user name, such as User01 or Domain01\User01, User@Domain.Com, or enter a PSCredential
object, such as one generated by the Get-Credential
cmdlet.
This parameter is valid only when the Proxy parameter is also used in the command. Note - this is experimental support for proxy servers and has not been extensively tested.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: [System.Management.Automation.PSCredential]::Empty
Accept pipeline input: False
Accept wildcard characters: False
-WhatIf¶
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm¶
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Force¶
{{ Fill Force Description }}
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-NoProgress¶
Test-EvergreenApp
uses Invoke-WebRequest
to validate target application installers. Progress is suppressed by default for faster tests; however, when -Verbose
is used, progress will be displayed. Use -NoProgress
with -Verbose
to suppress download progress while also displaying verbose output.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-UserAgent¶
Specifies a user agent string for the web request.
The default user agent is similar to the below with slight variations for each operating system and platform.
Mozilla/5.0 (Macintosh; Darwin 22.2.0 Darwin Kernel Version 22.2.0: Fri Nov 11 02:04:44 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T8103; en-AU) AppleWebKit/534.6 (KHTML, like Gecko) Chrome/7.0.500.0 Safari/534.6
To test a website with the standard user agent string that's used by most internet browsers, use the properties of the PSUserAgent class, such as Chrome, FireFox, InternetExplorer, Opera, and Safari.
For example, the following command uses the user agent string for Internet Explorer: Save-EvergreenApp -UserAgent ([Microsoft.PowerShell.Commands.PSUserAgent]::InternetExplorer)
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
CommonParameters¶
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
INPUTS¶
System.Management.Automation.PSObject¶
Test-EvergreenApp accepts the output from Get-EvergreenApp.
OUTPUTS¶
System.Management.Automation.PSObject¶
Provides a list URLs and a true/false result.
NOTES¶
Site: https://stealthpuppy.com/evergreen
Author: Aaron Parker
Twitter: @stealthpuppy