(*** Please do not write "latest" as a version, specify a version number ***)
32 or 64 bit version of product: 64
Operating system: W2K12R2
32 or 64 bit OS: 64
PowerShell Version:
DO NOT POST SUBSCRIPTIONS, KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM
Hi,
I'd like to use a powershell script within PS Studio as well as outside. I'd also like to write the output in the normal script to write-host (or verbose), in powershell studio to $richtextboxlogging.text).
Therefore I use $LoggingPSStudio. It works for write-host but not for $richtextboxlogging.
Below the code, please advise howto correct.
- $output = if ($LoggingPSStudio)
- {
- '$richtextboxLogging.Text ='
- }
- else
- {
- 'Write-Host'
- }
- #region executing computer checks
- if ($ComputerPerformance -or $All)
- {
- & $output 'Getting Uptime'
- $Uptime = $(Get-Uptime -ComputerName $ComputerName)