I trying like this [image: env_val.png][image: powershell.png]
but non of the work for me to print the msg On Tuesday, August 23, 2022 at 6:27:18 PM UTC+5:30 [email protected] wrote: > Hello Nayan, > > It's tough to say without seeing your code. There are multiple ways to > access variables in PowerShell, depending on what you are trying to achieve. > > Write-Output (or its alias, echo) takes an object and outputs it to the > PowerShell pipeline. By default, the pipeline's output is sent to the > terminal, so one way to print the contents of an environment variable is to > use the special "env" PowerShell drive: > > Write-Output -InputObject $env:COMPUTERNAME > > Hope this helps. > > Regards, > Jason Smyth > > > On Tuesday, 23 August 2022 at 08:20:09 UTC-4 [email protected] wrote: > >> thank you for replay Jason >> i resolve the issue I am truing to run powershell script like >> .\filename.ps1 but its hugs now I am running as >> * powershell.exe --executionpolicy remotesigned -File file.ps1* >> But now the issue is I unable to access the environment variable in power >> shell script I tried echo and Write-OutPut but non of them print value of >> variable so please help me out fir the same >> >> Thanks and regards >> Nayan Makwana >> On Monday, August 22, 2022 at 8:28:35 PM UTC+5:30 >> [email protected] wrote: >> >>> Hello Nayan, >>> >>> Would you please clarify what you mean when you say "it hugs"? All of >>> the following seem likely, and the way to resolve the issue will depend on >>> what the actual situation is: >>> >>> 1. GoCD fails to schedule the job. >>> 2. The job is scheduled as expected but is never assigned to an agent. >>> 3. The job is assigned to an agent but the work seems to not get started. >>> 4. The agent does some of the work but then hangs without completing. >>> >>> Each of these scenarios are different, and each requires different >>> troubleshooting steps. >>> >>> Do any of them apply to you? Or does "it hugs" mean something else in >>> this context? >>> >>> Regards, >>> Jason Smyth >>> >>> >>> On Monday, 22 August 2022 at 08:30:13 UTC-4 [email protected] wrote: >>> >>>> Dear folks, >>>> I just created a PowerShell script that just prints a hello msg but it >>>> hugs when I execute the job >>>> >>>> how to rectify the issue I am using gocd 22.2.0 Linux server and >>>> windows 10 gocd agent >>>> >>>> Thank You >>>> Nayan Makwana >>> >>> -- You received this message because you are subscribed to the Google Groups "go-cd" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/go-cd/c530abea-a5d5-4b39-8a74-5e41ce1857afn%40googlegroups.com.
