Private/Set-StorageCommandExecuted.ps1
# Will be called in VM function Global:Set-StorageCommandExecuted { [CmdletBinding()] <# .SYNOPSIS ... .DESCRIPTION ... #> param( [Parameter(Mandatory = $true)] $CommandRow, [Parameter(Mandatory = $true)] [string] $ExecutedByName ) process { Write-Host "Updating Storage Table..." $executedByValue = $CommandRow.ExecutedBy if ($executedByValue -eq 'NULL'){ $executedByValue = '' } if (-not([string]::IsNullOrEmpty($executedByValue))){ $executedByValue = "$($executedByValue);$($ExecutedByName)" } else { $executedByValue = "$($ExecutedByName)" } $CommandRow.ExecutedBy = $executedByValue $CommandRow | Update-AzTableRow -table $cloudTable | Out-Null } } |