Geeks With Blogs

News

qrcode

Lance Robinson

Create Your Badge

Lance Robinson is a software engineer in Durham, Chapel Hill, Raleigh, and surrounding areas. More about Lance.

 Subscribe


Lance's TextBox » About Me » My Resume »Twitter

An easy way to convert data to/from base64 (or uuencode/uudecode, quoted-printable, url encode/url decode, JIS, Yenc, hex, or even creating md5 or sha1 hashes) is to use the NetCmdlets convert-data cmdlet. To encode:

PS C:\> convert-data -data "Hello, World!" -to base64

Data                                                             Size Format
----                                                             ---- ------
SGVsbG8sIFdvcmxkIQ==                                               20 base64

To decode:

PS C:\> convert-data -data $encoded.Data data -from base64

Data                                                             Size Format
----                                                             ---- ------
Hello, World!                                                      13 Plain

Technorati Tags: , ,
Posted on Friday, August 29, 2008 1:24 PM | Back to top


Comments on this post: PowerShell – Base64 Encode/Decode a string

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Lance Robinson | Powered by: GeeksWithBlogs.net | Join free