|
@ -11608,25 +11608,22 @@ function TeamsAutostart |
|
|
$Enable |
|
|
$Enable |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
|
if (Get-AppxPackage -Name MicrosoftTeams) |
|
|
if (Get-AppxPackage -Name MSTeams) |
|
|
{ |
|
|
{ |
|
|
|
|
|
if (-not (Test-Path -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask")) |
|
|
|
|
|
{ |
|
|
|
|
|
New-Item -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask" -Force |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
switch ($PSCmdlet.ParameterSetName) |
|
|
switch ($PSCmdlet.ParameterSetName) |
|
|
{ |
|
|
{ |
|
|
"Disable" |
|
|
"Disable" |
|
|
{ |
|
|
{ |
|
|
if (-not (Test-Path -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MicrosoftTeams_8wekyb3d8bbwe\TeamsStartupTask")) |
|
|
New-ItemProperty -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask" -Name State -PropertyType DWord -Value 1 -Force |
|
|
{ |
|
|
|
|
|
New-Item -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MicrosoftTeams_8wekyb3d8bbwe\TeamsStartupTask" -Force |
|
|
|
|
|
} |
|
|
|
|
|
New-ItemProperty -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MicrosoftTeams_8wekyb3d8bbwe\TeamsStartupTask" -Name State -PropertyType DWord -Value 1 -Force |
|
|
|
|
|
} |
|
|
} |
|
|
"Enable" |
|
|
"Enable" |
|
|
{ |
|
|
{ |
|
|
if (-not (Test-Path -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MicrosoftTeams_8wekyb3d8bbwe\TeamsStartupTask")) |
|
|
New-ItemProperty -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MSTeams_8wekyb3d8bbwe\TeamsTfwStartupTask" -Name State -PropertyType DWord -Value 2 -Force |
|
|
{ |
|
|
|
|
|
New-Item -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MicrosoftTeams_8wekyb3d8bbwe\TeamsStartupTask" -Force |
|
|
|
|
|
} |
|
|
|
|
|
New-ItemProperty -Path "HKCU:\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\MicrosoftTeams_8wekyb3d8bbwe\TeamsStartupTask" -Name State -PropertyType DWord -Value 2 -Force |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|