Overview
1 Add New Send Commands to Gateway Template
2 Use Send Command (Broadcast Message)
3 Use Send Command (File Upload)

Add New Send Commands to Gateway Template
1 SSH to your Virtual Gateway (local Ubuntu Virtual Machine using MacOS Terminal or Windows Putty Client)
ssh username@[IP address]

2 su up
sudo su

3 Type the following to use the Linux ‘wall' command to send a Broadcast Message to all users who are currently logged into your Gateway
/usr/bin/wall "Is There Anybody Out There?"

4 Great, now let’s configure Pulse to do the same (and more) via Send Commands.

5 Login to Pulse Console if you are not already (link)
6 Username: [First Name Initial][Last Name]@pulse.local
Password: VMware1!

7A Select Device Templates
7B Set a Search Filter for ‘vGatewayTemplate-[FirstName]-[Number]
7C Edit the Template by Clicking the Pencil Icon

8 Click NEXT until you are on the ‘5 Commands’ screen

9 Click + Add and build out the following:
Command Type: Custom Command
Name: Broadcast Message
Executable: /usr/bin/wall
Run with root privilege: Checkbox Enabled (you may need to scroll down to see this)
Select DONE

10 Click + Add and build out the following:
Command Type: File Upload
Name: Custom Upload
Arguments: /var/log (you may need to scroll down to see this)
Select DONE

11 Click NEXT until you get to ‘7 Review’ then select SAVE


Use Send Command (Broadcast Message)
1A Select Devices
1B Set a Search Filter for ‘vGateway-[FirstName]-[Number]
1C Click (select) your Gateway name

2 Select the ellipsis drop-down and click Commands

3 Click SEND COMMAND

4A Select Broadcast Message
4B Enter Message in Arguments Field: Is Anyone At Home?
4C Click SEND COMMAND

5 By Default, your Gateway is configured to Phone Home and check for commands every 5 Minutes (300 Seconds). Let’s force your Gateway to Phone Home now instead of waiting.
6 Return to your SSH Session and change into the Pulse Agent bin folder
cd /opt/vmware/iotc-agent/bin

7 Use the DefaultClient to phone home for any pending Commands
./DefaultClient get-commands

(Note that your Gateway may have phone homed during its 5 minute interval and already displayed the Broadcast Message)

Use Send Command (File Upload)
1 Let’s use the File Upload Send Command that you created to grab a log file of our choice off of the Virtual Gateway
2 Return to the Pulse Console and click SEND COMMAND

3A Select Custom Upload
3B Append /auth.log to your existing Argument
3C Click SEND COMMAND

4 Return to your SSH Session and force the Pulse Agent to Phone Home (up arrow or type the following command)
./DefaultClient get-commands

5 Return to the Pulse Console and click the Cloud download Icon (you may need to refresh Command History in order to see the icon)

6 Note that the File is downloaded via Chrome. Click the downloaded filename to view it.

7 Now you can inspect the auth.log file remotely without ever having had to actually login (SSH) to the Gateway

(You may need to associate the file with a text editor of your choice on your Laptop in order to launch/view)

<Thank you - this concludes our ’Send Commands' Lesson>