Sign in to follow this  
Followers 0
Tsiyoshi

RunAs command without knowing computer name

2 posts in this topic

#1 ·  Posted (edited)

Hello,

I am trying to use RunAs command on multiple computers using local admin privilages.

As far as I know I need to use

RunAs($administrator, "?" $sPassword, 2, $sFilename)

Usually when using local admin with runas I need to insert local computer name (e.g 8989USV).

Is there a general name I can use in order to trigger multiple machines without inserting each computer name?

Thanks in advance.

Edited by Tsiyoshi

Share this post


Link to post
Share on other sites



i think this will work?

RunAs($administrator, @ComputerName, $sPassword, 2, $sFilename)

Funny i'm working on the same thing today

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  
Followers 0