Skip to main content

Notifications

Community site session details

Community site session details

Session Id : a9rOB4yvjAVerEGQnE/4rA
Power Automate - Power Automate Desktop
Answered

How to Convert Text to MD5

Like (1) ShareShare
ReportReport
Posted on 29 Nov 2024 02:55:35 by 6
I ask copilot to write me a script, but it always gives me an error. 
Categories:
  • CU29110252-0 Profile Picture
    6 on 29 Nov 2024 at 11:32:38
    How to Convert Text to MD5
    My input text is different, but the output is the same as yours. 
  • Verified answer
    VishnuReddy1997 Profile Picture
    2,324 Super User 2025 Season 1 on 29 Nov 2024 at 06:53:12
    How to Convert Text to MD5
     
    Please find the solution as shown in image.
     
     
    Code:
    Please find the below powershell code.
    param (
        [string]$NewVar
    )
    
    function Get-MD5Hash($input) {
        $md5 = [System.Security.Cryptography.MD5]::Create()
        $bytes = [System.Text.Encoding]::UTF8.GetBytes($input)
        $hash = $md5.ComputeHash($bytes)
        $hashString = [BitConverter]::ToString($hash) -replace '-', ''
        return $hashString
    }
    
    $md5Hash = Get-MD5Hash -input $NewVar
    Write-Output $md5Hash
     
    (Note:- if you got your solution you can mark as solution and gives kudos)
     
    Thanks & Regards
    Vishnu Reddy

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Power Automate - Power Automate Desktop

#1
eetuRobo Profile Picture

eetuRobo 124 Super User 2025 Season 1

#2
CU12050101-0 Profile Picture

CU12050101-0 28

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 20 Super User 2025 Season 1

Overall leaderboard
Loading started