< Back

Get-MDTApplicationDependency

Sat Jan 18, 2020 11:33 am

NAME Get-MDTApplicationDependency



SYNOPSIS

Gets the application dependencies of or more MDT applications





SYNTAX

Get-MDTApplicationDependency [-DependencyType {ReturnParent | ReturnChild}] -GUID <Object> [-Recurse] [-ShareName

<Object>] [<CommonParameters>]



Get-MDTApplicationDependency [-DependencyType {ReturnParent | ReturnChild}] -Name <Object> [-Recurse] [-ShareName

<Object>] [<CommonParameters>]





DESCRIPTION

The Get-MDTApplicationDependency function either returns all the applications that the application is dependent

upon(applications that need to be installed before installing the queried application), or applications upon which

the queried application is a dependency. It can go back either just one application, or can recurse the entire

depth of the dependency tree.





PARAMETERS

-DependencyType <Object>

Specifies whether to return the parent dependencies of the queried application(applications that need to be

installed before installing the queried application), or to return the child dependencies of the queried

application(applications where the queried application needs to be installed first). Possible options are

ReturnParent and ReturnChild. Default value is ReturnParent.



Required? false

Position? named

Default value ReturnParent

Accept pipeline input? False

Accept wildcard characters? false



-GUID <Object>

Specifies the GUID of an application to query the MDT share for. Alternate to Name Parameter.



Required? true

Position? named

Default value

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? true



-Name <Object>

Specifies the name of an application to search the MDT share for. If typed explicitly (i.e. "Install - Adobe

Flash Player - x64"), will only return applications that have that exact name. The parameter also supports

wildcards though, so typing something like "\\ adobe\\ " would return all the applications that have adobe in

their name.



Required? true

Position? named

Default value

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? true



-Recurse [<SwitchParameter>]

If specified recurses the dependency tree until it reaches the last dependency. If not, only finds

dependencies that are one depth away.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ShareName <Object>

Specifies the name of the MDT share to query. In order to query by name, the MDT share must be mounted using

either New-PSDrive or Set-MDTDrive. Here are some examples that should get you up and running:



`PS C:>New-PSDrive -Name MDTProduction -PSProvider MDTProvider -Root "\\FILESERVER\\MDTProduction$" -NetworkPath

"\\FILESERVER\\MDTProduction$" -Scope Global`



or



`PS C:>Set-MDTDrive -Name MDTProduction -Path "\\FILESERVER\\MDTProduction$"`



Required? false

Position? named

Default value

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.Object







OUTPUTS

System.Object







NOTES









Example 1: Get any direct parent dependencies of an app



PS C:\\> Get-MDTApplicationDependency -ShareName MDTProduction -Name "Install - Java Development Kit - x64"



Returns only applications that will be installed directly before the Java JDK is installed.

Example 2: Get any direct child dependencies of an app



PS C:\\> Get-MDTApplicationDependency -ShareName MDTProduction -Name "Install - Java Development Kit - x64"

-DependencyType ReturnChild



Returns only applications that will install the Java JDK directly after they themselves are installed

Example 3: Get **all** parent dependencies of an app



PS C:\\> Get-MDTApplicationDependency -ShareName MDTProduction -Name "Install - Java Development Kit - x64" -Recurse



Returns all applications that need to be installed before the Java JDK is installed.

Example 4: Get **all** child dependencies of an app



PS C:\\> Get-MDTApplicationDependency -ShareName MDTProduction -Name "Install - Java Development Kit - x64"

-Recurse -DependencyType ReturnChild



Returns all applications that will be installed after the Java JDK is installed



RELATED LINKS

Online Version: https://github.com/JohnForet/MDTApplica ... endency.md