hi guys, a question in regards to build-in variables, I have been requested to create a dashboard and logs who is using it, I am having trouble to get the Dashboard built-in variables (especially $User and $RemoteIpAddress) , my code below:
$DebugPreference = 'Continue'
$logfile = "C:\PSULogs\Dashboard\Dashboard.txt"
Start-Transcript -Path $logfile -Append
Write-Debug "Dashboard Variables: "
foreach ($var in $(Get-PSUVariable)) {
Write-Debug "$($var.name) : $($var.value)"
}
Write-Debug "PowerShell environment variables: "
foreach ($var in $(Get-Variable *)) {
Write-Debug "$($var.name) : $($var.value)"
}
## dashboard scripts here ...
Stop-Transcript
From the above I am not able to get any Dashboard built-in variables. Any suggestion?
Product: PowerShell Universal
Version: 3.5.3
Dashboard Environment: 7.3.0