Jump to content
Sign in to follow this  
Quenten Grasso

Update Computer Name with Logged on Username

Recommended Posts

Hey Fellow PW users,

I've created a script which allows the system to change its name to %computername%-Current logged on username, which makes life a little easier when trying to remote to their computers on the remote control tool/Webapp.

To get started, create your script in the script editor, in my example,

Name: Update Computer Name with Logged on Username

Windows/Powershell Code: 

$pwqusers = quser | Select-Object -skip 1
$pwquserfmt = $pwqusers.substring(1,22).Trim() -join ","
Set-ItemProperty -Path "HKLM:\Software\MMSOFT Design\PC Monitor\" -Name ComputerName -Value "$env:computername-$pwquserfmt"

Click Save.

Next we create at new task,

Name: Update Computer Name with Logged on Username

Current Scope -> Windows Workstations

Enable Scheduling -> (I've set it to run once a day) Every weekday (Monday to Friday), starting on 12 August 2018 at 09:00 (Australia/Brisbane)

Scripts tab, Select/add your new script you just created and once that's done click save.

You can now run the task on demand as well which will update all of the PC's in your windows workstations scope to Computer Name-Logged on usernames

This works for RDSH hosts as well however it could get a bit of out hand if you have 5-10+ users logged in so I probably wouldn't recommend it to be used on servers.

I Hope this helps you somehow, these scripts/suggestions come with no warranty and I bear no responsibility if this breaks anything, use at your own risk etc..etc..

Cheers,

Quenten

Edited by Quenten Grasso

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Similar Content

    • By John @ Maven
      I am having issues with pulsewaycredentialprovider.dll stopping the Windows login screen from loading on Windows 10 1809.
      I have submitted a ticket to support at support@pulseway.com as well.
      The issue is that with Pulseway software installed and the credential provider loading the system boots to the displayed screen but will go no further.  I am able to run terminal and PowerShell commands from the web interface (prior to software uninstall) but can never log in.  Pulseway remote does not work either.
      This is happening on two Windows 10 1809 DELL Optiplex computers with fresh Windows 10 PRO installations.
      RIght now our only solution is to leave Pulseway uninstalled.
      Any information or solution helpful.
      Thanks.
      John


    • By flydev
      Hi,
      On the Windows Dashboard 6.1 (build 1113) the up-time display is quite strange - I love precision but 
       

    • By dpbklyn
      Is there a way to monitor the temperature on a machine on an on-going (or logged) basis?  I would like to set a notification to be sent when the Core Temp reached xx degrees. I see that it is monitored in the hardware section, but i can't find a place to trigger an event.
      Thakn you,
    • By Comissha
      Our technical support AD credentials have changed passwords and now we are getting hundreds of machines trying to login with the configured AD account PowerShell User Impersonation credentials…locking the technician accounts. These machines are spread out at 19 separate locations and over 600 miles, at remote locations. How do we remotely modify the Runtime PowerShell user credentials on those machines?
      I have tried uninstalling and then  reinstalling, but it absorbs the previous configuration…including the former PowerShell User credentials….I also tried calling tech support but was sent to voicemail. Help!
      Local Setings where credentials were entered:

      Remote Settings, no ability to enter or modify PowerShell User:

    • By dpbklyn
      It would be awesome if the email parser went a little deeper.  Sometimes a client emails us directly and we forward that email to Pulseway to open a ticket.  The problem with this is that it opens the ticket using our company as the client. 
      It would be great if we could get the parser to look in the email headers to find the address that the email originated from and use THAT to assign and client and user to the ticket.  There are other ticket systems that do this.
       
      Alternatively (though not as elegant), It would also work to put a flag in the subject line like "@CLIENTNAME" to get the email assigned to the client.  Is there a way to do this with workflows?
×