Add shared functions to module_utils/powershell.ps1 and refactor powershell modules to utilize the common powershell code

This commit is contained in:
Matt Martz
2014-06-17 18:20:33 -05:00
parent bafa63b424
commit a25c441300
11 changed files with 66 additions and 137 deletions

View File

@@ -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;