mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
This commit is contained in:
parent
b36fc23a50
commit
e878cf43f6
2 changed files with 15 additions and 4 deletions
|
@ -118,7 +118,7 @@ else
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if($registryDataType -eq "binary" -and $registryData -ne $null) {
|
if($registryDataType -eq "binary" -and $registryData -ne $null -and $registryData.GetType().Name -eq 'String') {
|
||||||
$registryData = Convert-RegExportHexStringToByteArray($registryData)
|
$registryData = Convert-RegExportHexStringToByteArray($registryData)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,7 @@ options:
|
||||||
aliases: []
|
aliases: []
|
||||||
data:
|
data:
|
||||||
description:
|
description:
|
||||||
- Registry Value Data. Binary data should be expressed as comma separated hex values. An easy way to generate this is to run C(regedit.exe) and use the I(Export) option to save the registry values to a file. In the exported file binary values will look like C(hex:be,ef,be,ef). The C(hex:) prefix is optional.
|
- Registry Value Data. Binary data should be expressed a yaml byte array or as comma separated hex values. An easy way to generate this is to run C(regedit.exe) and use the I(Export) option to save the registry values to a file. In the exported file binary values will look like C(hex:be,ef,be,ef). The C(hex:) prefix is optional.
|
||||||
required: false
|
required: false
|
||||||
default: null
|
default: null
|
||||||
aliases: []
|
aliases: []
|
||||||
|
@ -96,13 +96,24 @@ EXAMPLES = '''
|
||||||
|
|
||||||
# Creates Registry Key called MyCompany,
|
# Creates Registry Key called MyCompany,
|
||||||
# a value within MyCompany Key called "hello", and
|
# a value within MyCompany Key called "hello", and
|
||||||
# binary data for the value "hello" as type "binary".
|
# binary data for the value "hello" as type "binary"
|
||||||
|
# data expressed as comma separated list
|
||||||
win_regedit:
|
win_regedit:
|
||||||
key: HKCU:\Software\MyCompany
|
key: HKCU:\Software\MyCompany
|
||||||
value: hello
|
value: hello
|
||||||
data: hex:be,ef,be,ef,be,ef,be,ef,be,ef
|
data: hex:be,ef,be,ef,be,ef,be,ef,be,ef
|
||||||
datatype: binary
|
datatype: binary
|
||||||
|
|
||||||
|
# Creates Registry Key called MyCompany,
|
||||||
|
# a value within MyCompany Key called "hello", and
|
||||||
|
# binary data for the value "hello" as type "binary"
|
||||||
|
# data expressed as yaml array of bytes
|
||||||
|
win_regedit:
|
||||||
|
key: HKCU:\Software\MyCompany
|
||||||
|
value: hello
|
||||||
|
data: [0xbe,0xef,0xbe,0xef,0xbe,0xef,0xbe,0xef,0xbe,0xef]
|
||||||
|
datatype: binary
|
||||||
|
|
||||||
# Delete Registry Key MyCompany
|
# Delete Registry Key MyCompany
|
||||||
# NOTE: Not specifying a value will delete the root key which means
|
# NOTE: Not specifying a value will delete the root key which means
|
||||||
# all values will be deleted
|
# all values will be deleted
|
||||||
|
|
Loading…
Reference in a new issue