cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
GMFDE
Engaged Sweeper III
First, customize this powershell script for your environment and place it in your actionpath:

$compname=$args[0]
Write-Host "Copying lspush to $compname..."
Copy-Item \\ChangeToYourServerName\WhereYouStoreYourTools\lspush.exe "\\$compname\c$\windows\support\lspush.exe" -Force
Write-Host "Executing lspush on $compname..."
Start-Process \\ChangeToYourServerName\WhereYouStoreYourTools\PsExec.exe -ArgumentList "\\$compname -accepteula -h c:\windows\support\lspush.exe YOURLANSWEEPERSERVERNAME 9524"


Just make sure you replace the appropriate path entries and ensure that the person running this has local machine admin rights.

You also have to refresh the Asset page after this has successfully run to get the new data.
3 REPLIES 3
dawnlowery
Engaged Sweeper
I am trying to use this to force some machines to push data to lansweeper on an "as needed" basis. I have a few with RPC errors, WMI errors etc which due to time constraints, more troubleshooting more is not an option.

I started to test the PS script but I get a blank screen and then it goes away. I'm running it directly from the server that has Lansweeper installed on it and am using the admin account.

As for the clients here is what has been done thus far for troubleshooting:
GPO - shut off firewall domain profile
Ran script to fix the wmi
Account used in an administrative account on our domain, which was reforced down to the machine via GPO as well.
Symantec Endpoint - machines use the same rule for the entire company 3000+ machines globally)

Any other ideas? They are windows 7 machines and a few 2003/2008 servers mixed in but not many.

My last resort (ouside of trying rejoining to the domain) is a login script
GMFDE
Engaged Sweeper III
dawnlowery wrote:

Any other ideas? They are windows 7 machines and a few 2003/2008 servers mixed in but not many.

My last resort (ouside of trying rejoining to the domain) is a login script


I just reviewed the code I posted versus what we are currently using and this led me to discover I didn't change the name of our scanning server. This may have been missed in your own efforts. I just updated the code. Please take a look and find the line where I replaced srmlsad1 with "YOURLANSWEEPERSERVERNAME". Make sure you put your own server name here.

If that's not the issue, make certain you have and are using the latest version of PSExec. We did find a slightly older version does not work as intended.

Hope this helps.
RBosch01
Engaged Sweeper II
Had to make a few minor modifications, but this works really well, thank you.