Allow cut, copy or paste operations from the clipboard via script
Autoriser les opérations couper, copier ou coller dans le Presse-papiers à l’aide d’un script
Explanation
This policy setting allows you to manage whether scripts can perform a clipboard operation (for example, cut, copy, and paste) in a specified region.
If you enable this policy setting, a script can perform a clipboard operation.
If you select Prompt in the drop-down box, users are queried as to whether to perform clipboard operations.
If you disable this policy setting, a script cannot perform a clipboard operation.
If you do not configure this policy setting, a script can perform a clipboard operation.
Ce paramètre de stratégie vous permet d’indiquer si les scripts peuvent utiliser le Presse-papiers (pour couper, copier, coller, etc.) dans une région spécifiée.
Si vous activez ce paramètre de stratégie, un script peut effectuer une opération sur le Presse-papiers.
Si vous sélectionnez Demander dans la liste déroulante, les utilisateurs doivent indiquer s’ils souhaitent effectuer des opérations sur le Presse-papiers.
Si vous désactivez ce paramètre de stratégie, un script ne peut pas effectuer d’opération sur le Presse-papiers.
Si vous ne configurez pas ce paramètre de stratégie, un script peut effectuer une opération sur le Presse-papiers.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Lockdown_Zones\1HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Lockdown_Zones\1- Value name
- not defined in the ADMX
Enable / disable values: not defined in the ADMX (see the options below).
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Computer (HKLM)
Enable
# Enable: inetres/IZ_PolicyAllowPasteViaScript_4
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Lockdown_Zones\1'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
# Allow paste operations via script
# Possible options:
# Enable = 0
# Disable = 3
# Prompt = 1
Set-ItemProperty -Path $k -Name '1407' -Value 0 -Type DWordDisable
# Disable: inetres/IZ_PolicyAllowPasteViaScript_4
# No value is written in the "Disabled" state (nothing defined in the ADMX)Revert to "Not configured"
# Revert to "Not configured": inetres/IZ_PolicyAllowPasteViaScript_4
$k = 'HKLM:\Software\Policies\Microsoft\Windows\CurrentVersion\Internet Settings\Lockdown_Zones\1'
Remove-ItemProperty -Path $k -Name '1407' -ErrorAction SilentlyContinueUser (HKCU)
Enable
Disable
Revert to "Not configured"
Options (1)
| Label | Control | Registry value | REG type | Constraints / details | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Allow paste operations via scriptPermettre les opérations de collage via le scriptIZ_Partname1407 | Drop-down listenum | 1407 | REG_DWORD | Required · Default choice (UI): #0
|