Hello,
Im a new guy with powershell, and i need some help. I
m doing a $update= Invoke-RestMethod -Method $Method -URI $URI -header $Header | ConvertFrom-Json
The result is:
$id : 1
_items : {@{$id=2; Index=0; Version=; Name=Atualização; Id=Atualização; Level=1; DateAndTime=2024-04-08T20:54:25.8611613-03:00; Subject=Sem atualizações disponíveis; Details=Não existem atualizações
disponíveis para serem executadas nesta base de dados.; Url=; Duration=00:00:00}}
Version : *
Start : 2024-04-08T20:54:25.8611613-03:00
End : 2024-04-08T20:54:25.0008218-03:00
Partial : False
DBInfo : @{$id=3; _greatestTables=System.Object; DBName=; DBVersion=; DbDif=; ServerName=; ServerConfiguration=; DBSize=0; Environment=; UpgradeVersion=}
I need to extract only Level information, on _items object, and if show in screen, if result is 1, the updated was successfully, if result is 2, the update has erros, if the result is 3 not updated.
If Level was on a separated object was easier, but this way I can’t.