I have this code in Powershell and I would like to have the same code in Power Query. Grateful for any help.
$uri = "https://graph.microsoft.com/beta/security/securescores"
$request = Invoke-MgGraphRequest -Uri $URI -method GET -ErrorAction Stop
foreach ($item in $request.value) {
$sspercent=($item.currentscore/$item.maxscore)
$formattedDate = $item.createdDateTime.ToString("dd-MM-yyyy")
write-host -foregroundcolor white -BackgroundColor Blue "$formattedDate Score =",$item.currentscore, "of",$item.maxscore,"["$sspercent.tostring("P")"]`n"
}
Thanks!![Smiling face with smiling eyes :blush: 😊](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f60a.png)
$uri = "https://graph.microsoft.com/beta/security/securescores"
$request = Invoke-MgGraphRequest -Uri $URI -method GET -ErrorAction Stop
foreach ($item in $request.value) {
$sspercent=($item.currentscore/$item.maxscore)
$formattedDate = $item.createdDateTime.ToString("dd-MM-yyyy")
write-host -foregroundcolor white -BackgroundColor Blue "$formattedDate Score =",$item.currentscore, "of",$item.maxscore,"["$sspercent.tostring("P")"]`n"
}
Thanks!
![Smiling face with smiling eyes :blush: 😊](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f60a.png)