mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Add shared functions to module_utils/powershell.ps1 and refactor powershell modules to utilize the common powershell code
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
#!powershell
|
||||
# WANT_JSON
|
||||
# POWERSHELL_COMMON
|
||||
|
||||
If ($args.Length -gt 0)
|
||||
{
|
||||
$params = Get-Content $args[0] | ConvertFrom-Json;
|
||||
}
|
||||
$params = Parse-Args $args;
|
||||
|
||||
$data = 'FIXME';
|
||||
|
||||
$result = New-Object psobject;
|
||||
$result | Add-Member -MemberType NoteProperty -Name fixme -Value $data;
|
||||
Set-Attr $result "fixme" $data;
|
||||
echo $result | ConvertTo-Json;
|
||||
|
||||
Reference in New Issue
Block a user