0

I have this script that is supposed to convert the Text to URL (http://www.ObjectSharp.com) But its not working.

Script:

$TempFile = [System.IO.Path]::GetTempFileName()
$fullurl = "http://www.ObjectSharp.com" | set-content $Tempfile
Write-Host "##vso[task.addattachment type=Distributedtask.Core.Summary;name=ObjectSharp;]$Tempfile"

Output:

enter image description here

stackprotector
  • 10,498
  • 4
  • 35
  • 64
  • 1
    what do you mean by `convert to url'? – Lee_Dailey Dec 18 '20 at 07:46
  • This is azure devops build summary page. URL is coming like text via above script i want it as URL so if i click on it it have to open in next window of browser. – Er Abhijit Kupale Dec 18 '20 at 08:18
  • 1
    Please add the information in your comment to the question. See: [How do I ask a good question](https://stackoverflow.com/help/how-to-ask) – iRon Dec 18 '20 at 08:26
  • 1
    @ErAbhijitKupale - so ... you want the text to be recognized by the azure console as a clickable item? please, add that to your Question. [*grin*] – Lee_Dailey Dec 18 '20 at 08:32
  • Does this answer your question? [Clickable hyperlink on PowerShell's console output](https://stackoverflow.com/questions/36293078/clickable-hyperlink-on-powershells-console-output) – iRon Dec 18 '20 at 08:35
  • @iRon its not working $TempFile = [System.IO.Path]::GetTempFileName() $fullurl = "http://www.ObjectSharp.com" | set-content $Tempfile Write-Host "##vso[task.addattachment type=Distributedtask.Core.Summary;name=ObjectSharp;$OutputConvertedIntoHYPERLINK;]$Tempfile" – Er Abhijit Kupale Dec 18 '20 at 08:48
  • It isn't exactly clear where you want to place the link, maybe this q&a helps: [TFS write string message to build summary](https://stackoverflow.com/a/57768225/1701026) – iRon Dec 18 '20 at 09:05
  • Check if this helps: https://www.sqlserver-dba.com/2013/07/how-to-create-a-clickable-link-in-powershell.html#comments – Harshita Singh Dec 18 '20 at 11:35
  • Is your output environment in `html` or `powershell tools` ? – Jason Pan Dec 21 '20 at 01:15

0 Answers0