Convert-EasitGOExportString
SYNOPSIS
Converts a string to a PSCustomObject
SYNTAX
| Convert-EasitGOExportString [-InputString] <String> [-Raw] [-Full] [-ProgressAction <ActionPreference>]
[<CommonParameters>]
|
DESCRIPTION
The Convert-EasitGOExportString function can be used to convert the exported payload from Easit GO to a PSCustomObject.
The function starts by checking if the input is a json string or not, and if not is assumes that the input is a base64 string.
By using ConvertFrom-Json the string is converted to a PSCustomObject.
If -Raw is used, the object is returned non "flattened".
If -Full is used, the whole export payload is returned, non "flattened".
If -Raw AND -Full is NOT used, New-FlatReturnObject is called to "flatten" the object.
EXAMPLES
EXAMPLE 1
| Convert-EasitGOExportString -InputString $Base64StringFromStdIn
|
EXAMPLE 2
| Convert-EasitGOExportString -InputString $Base64StringFromStdIn -Raw
|
EXAMPLE 3
| Convert-EasitGOExportString -InputString $Base64StringFromStdIn -Full
|
EXAMPLE 4
| Convert-EasitGOExportString -InputString $jsonString
|
EXAMPLE 5
| Convert-EasitGOExportString -InputString $jsonString -Raw
|
EXAMPLE 6
| Convert-EasitGOExportString -InputString $jsonString -Full
|
PARAMETERS
-Full
Specifies if the whole export body (including importhandler and generic properties) should be returned as a PSCustomObject.
This parameter overrides -Raw
| Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
|
String to convert to a PSCustomObject
| Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-ProgressAction
Determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider, such as the progress bars generated by the Write-Progress cmdlet. The Write-Progress cmdlet creates progress bars that show a command's status.
The ProgressAction parameter takes one of the ActionPreference enumeration values: SilentlyContinue, Stop, Continue, Inquire, Ignore, Suspend, or Break.
| Type: ActionPreference
Parameter Sets: (All)
Aliases: proga
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
|
-Raw
Specifies if the PSCustomObject should be "flatten" before returned
| Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
|
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
None - You cannot pipe objects to this function
OUTPUTS
NOTES