VMware Cloud Community
ChittraM
Enthusiast
Enthusiast
Jump to solution

copyright symbol in powercli script

I need to print the copyright symbol when a powercli script is executed.

but,

write-host "Copyright ©"      does not print a circle with a "c" in it

It just prints a 'c'.

any idea how to get this printed on the screen

0 Kudos
1 Solution

Accepted Solutions
alanrenouf
VMware Employee
VMware Employee
Jump to solution

Strange, that also works for me too, what happens if you use the below:

Write-Host "Copyright $([Char]0169)"
Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com

View solution in original post

0 Kudos
5 Replies
schepp
Leadership
Leadership
Jump to solution

Hi,

it works fine for me. Maybe you use the wrong encoding?

Regards

0 Kudos
ChittraM
Enthusiast
Enthusiast
Jump to solution

i used alt+0169 to create that symbol

0 Kudos
alanrenouf
VMware Employee
VMware Employee
Jump to solution

Strange, that also works for me too, what happens if you use the below:

Write-Host "Copyright $([Char]0169)"
Blog: http://virtu-al.net Twitter: http://twitter.com/alanrenouf Co-author of the PowerCLI Book: http://powerclibook.com
0 Kudos
ChittraM
Enthusiast
Enthusiast
Jump to solution

This works for me Smiley Happy thanks

0 Kudos
ChittraM
Enthusiast
Enthusiast
Jump to solution

Strangely, write-host "Copyright $([char]0169)" works occassionally.. most of the times it is just 'c' that gets displayed.

I landed up with, write-host "Copyright (C)". was not able to get the circle around it Smiley Sad

Am using powercli version 5.0 build 435427

0 Kudos