a
This commit is contained in:
@@ -22,15 +22,15 @@
|
||||
|
||||
- name: Find Recovery partitions (PowerShell → JSON)
|
||||
ansible.windows.win_powershell:
|
||||
script: |
|
||||
$guid = '{DE94BBA4-06D1-4D40-A16A-BFD50179D6AC}'
|
||||
$parts = @( Get-Partition |
|
||||
Where-Object { $_.GptType -eq $guid -or $_.Type -eq 'Recovery' -or $_.Type -eq 'Unknown' } |
|
||||
Select-Object DiskNumber, PartitionNumber,
|
||||
@{n='SizeBytes';e={$_.Size}},
|
||||
@{n='SizeMB';e={[math]::Round($_.Size/1MB,2)}},
|
||||
GptType, Type )
|
||||
$parts | ConvertTo-Json -Compress -Depth 4
|
||||
script: |
|
||||
$guid = '{DE94BBA4-06D1-4D40-A16A-BFD50179D6AC}'
|
||||
$parts = @( Get-Partition |
|
||||
Where-Object { $_.GptType -eq $guid -or $_.Type -eq 'Recovery' -or $_.Type -eq 'Unknown' } |
|
||||
Select-Object DiskNumber, PartitionNumber,
|
||||
@{n='SizeBytes';e={$_.Size}},
|
||||
@{n='SizeMB';e={[math]::Round($_.Size/1MB,2)}},
|
||||
GptType, Type )
|
||||
$parts | ConvertTo-Json -Compress -Depth 4
|
||||
register: winre_raw
|
||||
changed_when: false
|
||||
|
||||
|
||||
Reference in New Issue
Block a user