Files
Zack Meier 1d304511b8 update
2026-04-15 15:45:50 -05:00

26 lines
852 B
PowerShell

Param(
[string]
$Name,
[ValidateSet(
'Infra-ActiveDirectory.Object',
'Infra-VMware.Snapshot',
'ITD-WindowsServer.General',
'Shared-Powerschool'
)]
[string]
$Path
)
switch ($Path){
<# example switch condition and actions
{ $_ -like "App-XXXXX"} {$TagNamesEnforced = @('Shared-XXXXX_Modify)}
#>
{ $_ -eq "Infra-ActiveDirectory.Object" } { $TagNamesEnforced = @('ITD-WindowsServer_Modify') }
{ $_ -like "Infra-VMware*" } { $TagNamesEnforced = @('Infra-VMware_Modify') }
{ $_ -like "ITD-WindowsServer*" } { $TagNamesEnforced = @('ITD-WindowsServer_Modify') }
{ $_ -like "Shared-PowerSchool*" } { $TagNamesEnforced = @('Shared-PowerSchool_Modify') }
}
New-PSUScript -Name $Name -Path "$Path\$Name" -Tag @($TagNamesEnforced) -ScriptBlock {#code goes here
}