scripts

Find-ProjectPackages.ps1

SYNOPSIS

Find modules used in projects.

SYNTAX

Find-ProjectPackages.ps1 [-PackageName] <String> [-Path <String>] [-MinVersion <Version>]
 [-MaxVersion <Version>] [-ProgressAction <ActionPreference>] [<CommonParameters>]

DESCRIPTION

EXAMPLES

EXAMPLE 1

Find-ProjectModule.ps1 jQuery*

Name Version File —- ——- —- jquery.datatables 1.10.9 C:\Repo\packages.config jQuery 1.7 C:\Repo\packages.config jQuery 1.8.3 C:\OtherRepo\packages.config

PARAMETERS

-PackageName

The name of a package to search for. Wildcards (as supported by -like) are allowed.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Path

The path of a folder to search within. Uses the current working directory ($PWD) by default.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: $PWD
Accept pipeline input: False
Accept wildcard characters: False

-MinVersion

The minimum (inclusive) version of the package to return.

Type: Version
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-MaxVersion

The maximum (inclusive) version of the package to return.

Type: Version
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ProgressAction

Type: ActionPreference
Parameter Sets: (All)
Aliases: proga

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.String containing a package name (wildcards supported).

OUTPUTS

System.Management.Automation.PSCustomObject each with properties for the Name,

Version, and File of packages found.

NOTES

Select-Xml

ConvertFrom-Json