diff --git a/packages/common.vm/common.vm.nuspec b/packages/common.vm/common.vm.nuspec index d5ad0d313..de4cac64f 100755 --- a/packages/common.vm/common.vm.nuspec +++ b/packages/common.vm/common.vm.nuspec @@ -2,7 +2,7 @@ common.vm - 0.0.0.20240612 + 0.0.0.20240821 Common libraries for VM-packages Mandiant diff --git a/packages/common.vm/tools/vm.common/vm.common.psm1 b/packages/common.vm/tools/vm.common/vm.common.psm1 index ba31d8198..0ce9a4baf 100755 --- a/packages/common.vm/tools/vm.common/vm.common.psm1 +++ b/packages/common.vm/tools/vm.common/vm.common.psm1 @@ -1789,3 +1789,14 @@ function VM-Uninstall-With-Pip { VM-Pip-Uninstall $toolName VM-Remove-Tool-Shortcut $toolName $category } + +function VM-Set-Legal-Notice { + param ( + [Parameter(Mandatory=$true)] + [string[]]$legalnoticetext + ) + $RegistryPath = 'HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System' + New-ItemProperty -Path $RegistryPath -Name legalnoticecaption -Value "Terms and Conditions" -Force + New-ItemProperty -Path $RegistryPath -Name legalnoticetext -Value $legalnoticetext -Force +} +