< Back

Set-MDTApplicationSupportedPlatform

Sat Jan 18, 2020 11:34 am

NAME Set-MDTApplicationSupportedPlatform



SYNOPSIS

Sets the SupportedPlatform attribute of or more MDT applications





SYNTAX

Set-MDTApplicationSupportedPlatform [-Confirm] -GUID <Object> [-SetSupportedPlatformTo {Null | Windows7Only |

Windows8Only | Windows8.1Only | Windows10Only}] [-ShareName <Object>] [-WhatIf] [<CommonParameters>]



Set-MDTApplicationSupportedPlatform [-Confirm] -Name <Object> [-SetSupportedPlatformTo {Null | Windows7Only |

Windows8Only | Windows8.1Only | Windows10Only}] [-ShareName <Object>] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Set-MDTApplicationSupportedPlatform function sets the SupportedPlatform attribute on one or more MDT

applications. It can either set the attribute to Null, or can set it to one of the predefined OS's. The OS

restriction types are a bit more granular when setting this attribute via MDT's GUI, so due to the complexity

behind scripting each one, broader "catch-all" types are used. At the moment this tool also disregards any

previous settings of the attribute, so any previous settings will be overwritten with the new data specified by

the command.





PARAMETERS

-Confirm [<SwitchParameter>]

The confirm preference. If left alone, will prompt you before modifying each application. If set to $false, it

just goes through.



Required? false

Position? named

Default value $true

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



-SetSupportedPlatformTo <Object>

Specifies what OS restriction to apply to the application(or to remove the restriction by selecting Null). The

OS restriction types are a bit more granular when setting this attribute via MDT's GUI, so due to the

complexity behind scripting each one, broader "catch-all" types are used. At the moment this tool also

disregards any previous settings of the attribute, so any previous settings will be overwritten with the new

data specified here.



Required? false

Position? named

Default value

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



-WhatIf [<SwitchParameter>]

If specified, will output what changes the command will make without making them.



Required? false

Position? named

Default value False

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: Remove OS restriction for ALL applications in MDT Share



PS C:\\> Set-MDTApplicationSupportedPlatform -ShareName MDTProduction -SetSupportedPlatformTo Null



Removes the OS restriction for ALL applications in MDTProduction (add a -confirm:$false on the end to remove

prompts for each application)

Example 2: Set ALL applications in share to Windows 7



PS C:\\> Set-MDTApplicationSupportedPlatform -ShareName MDTProduction -SetSupportedPlatformTo Windows7Only



Set OS restriction for ALL applications in MDTProduction to Windows 7(add a -confirm:$false on the end to remove

prompts for each application)

Example 3: Set one application to windows 10



PS C:\\> Set-MDTApplicationSupportedPlatform -ShareName MDTProduction -Name "Install - Java Runtime Environment

-x86" -SetSupportedPlatformTo Windows10Only



Set OS restriction for "Install - Java Runtime Environment -x86" in MDTProduction to Windows 10



RELATED LINKS

Online Version:

https://github.com/JohnForet/MDTApplica ... latform.md