fb
Homepage 5 How-to Articles 5 How to Run Command for Startup Programs on Domain Computers

How to Run Command for Startup Programs on Domain Computers

Manage remote endpoints, deploy software and patches with Action1 cloud RMM solution.

Sign up and use free on up to 50 endpoints with no functionality limits or expiration.



November 9, 2018

The more programs you install on Windows, the more susceptible it is to a long load, ‘hangs’, and possibly various crashes. Many installable programs add themselves or their components to the Windows startup item and over time this list of installed programs can become quite long. This is one of the main reasons why, in the absence of close monitoring of autoloading software, the computer eventually runs slower and slower. Therefore, it is very important to know how to run command for startup programs.

At the stage of development of spamming and viral increasing activity for the authors of such programs, the constant presence of their malicious code in the system configuration plays an enormous influence. In order for these programs to be constantly present in the system, the Windows registry is vital for them. Using the registry as a starting point for the launch, all malicious programs start in the system from there. The user remains virtually unprotected in front of such a danger, because there are so many places in the registry to run at all stages of the operating system boot.

However, knowing where to start this or that code, which works in both user mode and kernel mode, can be useful not only for removing malware, but also for excluding third-party drivers and services loaded from early and late stages of system boot.

This article explains some quick ways to run command for startup programs in Windows remotely across the entire network.

Manually:

1. Execute WMI Query in ROOT\CIMV2 Namespace:

  1. Launch WMI Explorer or any other tool which can run WMI queries.
  2. Run WMI query: SELECT * FROM Win32_StartupCommand

2. Open WMIC Command-line Interface:

  1. Press WIN+R
  2. Type “wmic”, press Enter
  3. In wmic command line tool type: /node:RemoteComputerName startup

3. Run This Simple Windows Powershell Script:

Thru WMI object: Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_StartupCommand -Computer RemoteComputerName

4. Use Following Code to Select Specific Columns:

Execute: Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_StartupCommand -Computer RemoteComputerName | Select-Object Name, Command, Location, PSComputerName

5. Sort the Results Using the Line Below:

Invoke command: Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_StartupCommand -Computer RemoteComputerName | Select-Object Name, Command, Location, PSComputerName | Sort-Object Name

6. The Next Code Helps to Filter Results:

Use it: Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_StartupCommand -Computer RemoteComputerName | Select-Object Name, Command, Location, PSComputerName | Where-Object -FilterScript {$_.Name -like “OneDrive”}

7. Save Results to CSV File:

Run: Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_StartupCommand -Computer RemoteComputerName | Select-Object Name, Command, Location, PSComputerName | Export-CSV “c:\file.csv” -Append -NoTypeInformation

8. The Next Step Is to Query Multiple Computers:

Computers from a text file: Get-Content -Path c:\computers.txt | ForEach-Object {Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_StartupCommand -Computer $_}
Computers from AD domain: Get-ADComputer -Filter {OperatingSystem -Like ‘Windows 10*’} | ForEach-Object {Get-WmiObject -Namespace ROOT\CIMV2 -Class Win32_StartupCommand -Computer $_.Name}

With Action1 RMM:

Step 1 – Sign-up for Free:

Get started with Action1 RMM, a cloud-based solution for automated patch management, software deployment, software/hardware inventory, endpoint management, and comprehensive reporting.

Step 2 – Type Your Question in Plain English:

How to run command for startup programs on all domain computers. Filter and save results to CSV file with help of plain Windows Powershell script. - search query

Step 3 – Set Filters, If Necessary:

How to run command for startup programs on all domain computers. Filter and save results to CSV file with help of plain Windows Powershell script. - set filters

Step 4 – See Results from All Endpoints in Seconds:

Endpoint Name

mac.widgets.local
fred.widgets.local
ray.widgets.local

User

widgetsMark
widgetsFred
widgetsRay

Name

Skype
GoogleDriveSync
OneDrive

Command

C:Program FilesSkypePhoneSkype.exe
C:Program FilesGoogleDrivegoogle drivesync.exe
C:Program FilesMicrosoft OneDriveOneDrive.exe

Related Articles

How To Delete User Profiles Remotely with PowerShell

When a user logs onto the computer for the first time (not via the network to access shared folders or printers), Windows creates a user profile. Among its contents are the NTUSER.DAT file (user profile settings), user-specific folders (My Documents, Desktop, etc.),...

About Action1 RMM

Action1 RMM is a cloud-based IT solution for remote monitoring and management, patching, and remote support.

Start your free two-week trial of Action1, or use RMM tools for free forever on 50 endpoints with no functionality limitations!



0 Comments

Submit a Comment

Your email address will not be published.

cloud patch management solutions action1

MSP Solution

Centralize endpoint management and boost efficiency of IT service delivery.

automated server patch management action compliance

Patch Management

Identify and deploy missing OS and third-party software updates.

cloud software deployment tools windows

Software Deployment

Distribute software and updates across managed endpoints.

software distribution tools software inventory action1

IT Asset Inventory

Keep a detailed inventory and manage hardware and software assets.

web client remote desktop

Remote Desktop

Support users via seamless remote desktop connection.

web based rdp client

Unattended Access

Provide administrative support and manage remote devices.

automated patch management action1

Endpoint Management

Run PowerShell, custom scripts, reboot computers and restart services.

API integrations action1

RESTful API

Integrate Action1 RMM to your IT ecosystem.

computer inventory tool for compliance

Reports and Alerts

Conduct endpoint security audits with comprehensive reporting.