Run a command as admin

Hi All,

Haven’t been in the forum in a while and trying to remember something I did a while back. Long story short I have a fully functioning script, and it turns out that one command “echo.| clip” needs to be run as admin to work.

I’m trying to remember how to do it so that say the option is 3 to clear the clipboard, if they select option 3 it runs as admin runs the command, then goes back to the main menu.

Thoughts?
Thanks

It doesn’t require admin rights to clear the clipboard
Set-Clipboard -Value $null

2 Likes

Oh ok, thanks I’ll try that. I been working on a desktop tool in my spare time but I use Mac for a living.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.