# Install
## ScreenConnect
```
#timeout=120000 msiexec.exe /i "[url]" /quiet
```
### Backstage
I've had instances where sending the command through ScreenConnect doesn't work but running it in backstage either CMD or PowerShell works fine.
```
msiexec.exe /i "[url]"
```
## PowerShell
This information was gathered from the [[Intune]] application created by the NinjaOne integration.
### Installer
```PowerShell
powershell.exe -executionpolicy bypass .\windows-deployment-script.ps1 -envUrlBase "https://us2.ninjarmm.com" -pathToAgent "ws/api/v2/generic-installer" -tokenid "129566f2-145b-4e13-8e2c-00a3c1ac1d36"
```
### Uninstaller
```PowerShell
powershell.exe -executionpolicy bypass .\windows-uninstall-script.ps1
```
## Active Directory Discovery
Pending devices will appear under `Home > Administration > Organizations > Devices > Status`.
> [!Note]
> We need to determine if once you approve it turns on immediately or if it still needs to install.
# Agent Tokenization
The agent installers for Windows, Linux, and Mac now have the option to use an alphanumeric token representing the server, organization, location, and role for an agent when it's installed. This token will allow for easier script-based installation of the agent and make mass-deployments faster and easier.^[https://ninjarmm.zendesk.com/hc/en-us/articles/33150474357389]
# Collect Logs
This PowerShell script from [bu11etpr00f](https://github.com/bu11etpr00f/scripts-ninjarmm/blob/master/ninjarmmagent.collect.ninjalogs.ps1) starts log collection by invoking the NinjaOne agent with the /collectlogs flag. This prints logs to the shell and
```PowerShell
## Universal PowerShell Script to Collect NinjaRMMAgent Logs
## Created by bu11etpr00f 2019.10.01
##
## Set ninjarmmagent.exe Location
$exeLocation = Get-ChildItem -Path "C:\Program Files (x86)\" -Recurse -Depth 1 -Include "ninjarmmagent.exe" | Select-Object -First 1
## Set Command Paramaters
$exeArguments = "/collectlogs"
## Run Command
Start-Process $exeLocation $exeArguments
```
# IP Allowlist Information
https://ninjarmm.zendesk.com/hc/articles/211406886
https://ninjarmm.zendesk.com/hc/articles/35835798574989