Set-Service Logons

I have a WinForm I’m creating to manage a bunch of stuff. One of those things is to modify services. But I can’t seem to find a way to set the logon UID and PWD by using values supplied in my WinForm by the end user.

The only way I’ve found to set the UID and PWD for a service is to use:

$Cred = Get-Credential
Set-Service -ComputerName Server1 -Name Spooler -Credential $Cred

Does anyone know if there is a way to set the logon ID and password using Set-Service, but NOT using the Get-Credential? Perhaps something with WMI, maybe even with SC.exe?

Thanks,
Dale

I googled it for you:

https://www.google.com/search?as_q=powershell+create+credentials

the first hit was this: