Parameters - My personal credentials - Issue
New question, same issue kinda.. Can I have multiple "my custom credentials" custom scripts?
We have multiple forests and need to manage LAPS in the separate forest (DMZ). I can query from one forest to the other with PowerShell.. I guess I can make something in the custom script to see what domain the user running RDM as (local or DMZ) and then the query would run based on that info.. if that makes any sense.
I might be able to modify this script to what I need, I am not sure how RDM will react, but i figure as the return variables are correct should work..
https://thesleepyadmins.com/2021/02/06/checking-laps-password-cross-forest-using-powershell/
Login Using LAPS Credentials
I know this post is old, but I wanted to update as in the current version of RDM (2021.2.22.0 x64) the $PARAMETER1$ value isn't passed to the script properly.. Replacing $PARAMETER1$ with $HOST$ fixes the issue for now.. see here for details.
Parameters - My personal credentials - Issue
Side note, I started with the script listed here, but it wasn't working.. So I figured I would break it down in its simplest form and it still wasn't working.. Only to find out the $PARAMETER1$ issue was the issue the whole time.. I changed $PARAMETER1$ to "$HOST$" and now that original script works.. Thanks for the help!
Parameters - My personal credentials - Issue
I got it working somehow, I think it was a combination of things.. but i changed $host$ to $HOST$ and messed with the strings of where I was pulling the password from
$Host = Get-AdmPwdPassword "$HOST$";
$password = $Host.Password;
$Result.Username = "LAPSUSERNAME";
$Result.Password = $password;
Parameters - My personal credentials - Issue
RDP (Microsoft Remote Desktop) - Configured.. I am guessing this is what you are asking?
Parameters - My personal credentials - Issue
Looking in the log, I can see the user name being used.. It appears the second $ is being left there, as when I tried to not use quotes the only thing left is a single $. The same thing happens in powershell when I try "$host$"
Parameters - My personal credentials - Issue
When I tried what you posted I get
ccomputername\System.Management.Automation.Internal.Host.InternalHost$ as the log on name.
I cant take a screenshot since it is in the UAC elevated window..
From a quick google search this is the result of powershell running the command "get-host" or $host
https://renenyffenegger.ch/notes/Windows/PowerShell/command-inventory/noun/host/get/index
Note: "computername" above is the real host name, but I think that is only getting there because I have override domain set to "use hostname"
Parameters - My personal credentials - Issue
Basically a quick LAPS script to retrieve the password for the host..
If I replace $PARAMETER1$ with the host's name the script works fine, but attempting to use $PARAMETER1$ or $HOST$ doesn't retrieve the password. Running on 2021.2.22.0 x64
Parameters - My personal credentials - Issue
When attempting to pass a parameter to a PowerShell script in my personal credentials, the $parameter1$ or $host$ is not passing to the script. When hard coding the hostname, the script performs as designed.. Is there something i am missing?