Link to home
Create AccountLog in
Avatar of it-infra
it-infra

asked on

PSEXEC on Subnet or vLAN

Hello,

I run the below command on a bunch on computers on a text file:
psexec @computers7.txt -c -f -s -d -u domain\user -p password \\server\folder\file.bat

Open in new window


Is there anyway to run it on a subnet like 192.168.5.x ?

Thanks
ASKER CERTIFIED SOLUTION
Avatar of X Layer
X Layer
Flag of Slovenia image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of it-infra
it-infra

ASKER

Wanna see the progress, the 1st file be a .bat?
for /L %x in (1,1,254) do psexec \\192.168.5.%x -c -f -s -d -u domain\user -p password \\server\folder\file.bat

Open in new window


Seems good, however how can I reduce the time while connecting to each IP?
-n time in seconds is the solution, Thanks