Hello Everyone,[
Hope all are doing well.
I have a problem regarding to generate random password in power automate desktop. I write a VB Script that generate random password of length 6 including small and capital letter and also number and special character. But it throw syntax error, i am unable to find the exact error.
Anyone please help to resolve this problem.
Here i use Vb Script for generate random password, if anyone know more simple and easy method then please suggest me.
Here is my VB Script :
Sub Main
Dim password, charset, i
Dim randomChar
' Define the character set including small letters, capital letters, numbers, and special characters
charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()-=_+[]{}|;:',.<>?/~"
' Initialize the password variable
password = ""
' Set the random seed based on the system time
Randomize
' Generate each character of the password randomly from the character set
For i = 1 To 6 ' Change 6 to the desired length of the password
randomChar = Mid(charset, Int((Len(charset) * Rnd) + 1), 1)
password = password & randomChar
Next
' Output the generated password
SetText password
End Sub
Thank you in advance,
Best Regards
Suraj