
eDecisions
Members
-
Joined
-
Last visited
Reputation Activity
-
eDecisions got a reaction from Nick530 in Run automation scripts for group?Second, seems backwards, I can run a script for 100 groups, I can run a script on a single client , but no I can’t run a script on an office.
if I have 100 groups I’d need 100 scripts one for each group.
i second adding the scripts as an option under group
-
eDecisions got a reaction from skrie in Restart EXPLORER.EXE current logged in userThis will stop and restart EXPLORER.EXE for the currently logged in user.
#By eDecisions
$TasknameStop = "ExplorerStop"
$TasknameStart = "ExplorerStart"
$lastlogon = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser")
SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $TasknameStop /RU $lastlogon /TR "taskkill /f /im explorer.exe"
SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $TasknameStart /RU $lastlogon /TR "explorer.exe"
start-sleep -s 1
schtasks /Run /TN $TasknameStop
start-sleep -s 1
schtasks /Run /TN $TasknameStart
start-sleep -s 1
schtasks /delete /tn $TasknameStop /f
schtasks /delete /tn $TasknameStart /f
-
eDecisions got a reaction from Jamie Taylor in Make batch file run in foregroundDid this a long time ago... This one maps a drive letter to the server for the logged in user, you can work backwards to do anything, basically you have to create a task to make it happen that runs once on demand as the local user:
$Taskname = "netuse"
$lastlogon = (New-Object -ComObject WScript.Shell).RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\LastLoggedOnUser")
SCHTASKS /CREATE /sc ONCE /st 00:00 /TN $Taskname /RU $lastlogon /TR "c:\maplist.bat"
start-sleep -s 1
New-Item c:\maplist.bat -ItemType "file"
Set-Content c:\maplist.bat 'net use t: "\\twdserver\Shared\SERVER - Documents" /persistent:yes'
schtasks /Run /TN $Taskname
start-sleep -s 1
schtasks /delete /tn $Taskname /f
-
eDecisions got a reaction from _mike in Uninstall NINJARMM AgentRevised script, the (x86) was causing issues, this seems to have fixed
$UninstallString = (Get-ItemProperty HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\NinjaRMMAgent*).UninstallString
$path = $UninstallString -replace "uninstall.exe", ""
cd $path
Start-Process -FilePath .\uninstall.exe -ArgumentList "--mode","unattended"
-
eDecisions got a reaction from Continu IT Solutions in Add domain\username to header search on usernameBe nice if you reference the Author rather than "I found this" I wrote it, thanks for the plug.