Custom Command results to Clipboard

General discussion of using Adaxes for Active Directory management and administration
Post Reply
jbadry
Posts: 7
Joined: Fri Nov 23, 2018 10:15 am

Custom Command results to Clipboard

Fri Jul 12, 2019 9:55 am

I have a powershell custom command that retrieves the LAPS password from AD for a specified computer. This allows us to run the query in the Adaxes context and delegate it to support staff by OU.

Is there any way to copy the resulting password to the clipboard? We find that even in the adaxes website, the results popup window will not let you copy from it.

#Viewing a password using the LAPS PowerShell module.
$logmessage = Get-AdmPwdPassword -Computername '%name%' | Select-Object ComputerName, Password, ExpirationTimeStamp | Out-String -Stream
foreach ($logline in $logmessage) { if ($logline -ne '') { $Context.LogMessage($logline, "Information") } }

User avatar
Support2
Posts: 954
Joined: Mon Nov 14, 2016 4:03 am

Re: Custom Command results to Clipboard

Mon Jul 15, 2019 4:59 am

Hello,

Yes, it is possible. You can output the required information into the Execution log using the $Context.LogMessage method (as your script does) and then copy it after the command execution. You just need to select the text in the Execution log and then click Ctrl+C or right-click the selected text and click Copy in the context menu.
Copy.text.from.execution.log.png
Copy.text.from.execution.log.png (8.69 KiB) Viewed 102 times
Active Directory Identity Management

Follow Adaxes in social networks
Image Image Image

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests