secure credentials in powershell script

11 views
Skip to first unread message

Dakshesh Khatri

unread,
Sep 4, 2025, 2:09:20 PMSep 4
to ntpowe...@googlegroups.com
Hi All,

Greetings of the day!!

I am seeking your valuable support for developing a powershell script in which AD credentials need to hard-coded which can not be converted to human readable nor can be stored in any format like XML or text. Also this script must be reusable on multiple devices.

Seeking your valuable inputs.

Much appreciated.

Kurt Buff

unread,
Sep 4, 2025, 2:12:01 PMSep 4
to ntpowe...@googlegroups.com
Google is your friend:

"powershell secure credentials in script"

--
You received this message because you are subscribed to the Google Groups "ntpowershell" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ntpowershell...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ntpowershell/1560911945.2997.1757009229360%40mail.yahoo.com.

Mike Leone

unread,
Sep 4, 2025, 3:05:10 PMSep 4
to ntpowe...@googlegroups.com

  • For non-interactive scenarios, a SecureString can be created from a plain text string (with caution) using ConvertTo-SecureString -AsPlainText -Force



--

Mike. Leone, <mailto:tur...@mike-leone.com>

PGP Fingerprint: 0AA8 DC47 CB63 AE3F C739 6BF9 9AB4 1EF6 5AA5 BCDF
Photo Gallery: <http://www.flickr.com/photos/mikeleonephotos>

Michael B. Smith

unread,
Sep 5, 2025, 4:19:29 AMSep 5
to ntpowe...@googlegroups.com
I strongly recommend using the Secret Management module and not SecureString.


From: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com> on behalf of Mike Leone <tur...@mike-leone.com>
Sent: Thursday, September 4, 2025 10:05:02 PM
To: ntpowe...@googlegroups.com <ntpowe...@googlegroups.com>
Subject: Re: [ntpowershell] secure credentials in powershell script
 

Markus Klocker

unread,
Sep 5, 2025, 5:49:24 AMSep 5
to ntpowe...@googlegroups.com

Dakshesh Khatri

unread,
Sep 16, 2025, 3:36:14 AMSep 16
to ntpowe...@googlegroups.com
Thanks Markus.

I was looking for this type of solution.

Thanks a lot.
On Fri, 5 Sept 2025 at 3:19 pm, Markus Klocker
Reply all
Reply to author
Forward
0 new messages