Getting Started with 1E’s Tachyon and PowerShell

choubertsprojects

VPN offers!

1. NordVPN

2. Surfshark

3. ExpressVPN

1E’s Tachyon is a tool that lets you create interactive, connected simulations in any environment. You can use it to generate real-time data with your own customized logic or automate and orchestrate processes from start to finish by scripting the flow of interactions.
If you are just getting started with PowerShell, this guide will help get up and running quickly.
After learning about how PowerShell works as an automation engine for Windows environments, we’ll focus on setting up the workflow necessary to make our simulation run smoothly. This article has step-by-step instructions for installing tachyon and creating a project file (learn more at https://github.com/1eSoftware/tachyon). We then work through some basic examples of how you might script your first experiment using tachyon commands like “create” “run”, etc., before finally working on building out our full project!

Getting Started with 1E's Tachyon and PowerShell

Tachyon from 1E is mostly, but not fully, a GUI-driven endpoint management system. As it turns out, there is a 1E PowerShell module called PSTachyonToolkit that allows you to use Tachyon PowerShell!

This module might be beneficial to administrators who wish to use PowerShell to interact with Tachyon. Consider the possibilities for automating monitoring, communication, data processing, and problem resolution.

What is the location of the module? What are some of the procedures you may be able to perform? Where can I get assistance? When I first began looking into the module, these were just a few of my concerns. Continue reading, and this article will assist you in getting started with the PSTachyonToolkit.

You’d probably think about installing a PowerShell module from PSGallery or NuGet when you need one. The 1E PowerShell module, however, is not currently accessible in any of the well-known module galleries.

Instead, 1E clients may get the module’s download link via the Support Portal. Install or extract the module’s contents to your desired directory after downloading it.

While the module includes numerous files, there are five that are required for the module to function.

File Function
PSTachyonToolkit.psd1 The manifest file for the PowerShell module.
PSTachyonToolkit.psm1 The primary file for the PowerShell module.
methods.json The primary file for the PowerShell module.
The primary file for the PowerShell module. The primary file for the PowerShell module.
The primary file for the PowerShell module. The Tachyon signing tool setup parameters in a typical.NET configuration file.

1E’s interpreted programming language is called SCALE (Simple Cross-Platform Agent Language for Extensibility).

Understanding and Creating PowerShell Modules is related.

You may import the 1E PowerShell module into your PowerShell session now that you have it.

.PSTachyonToolkit.psd1 Import-Module

After that, enter the Tachyon server FQDN to which the module will connect. Running any further Tachyon commands without first configuring the Tachyon server will result in an error.

Set-TachyonServer -Server <TACHYON SERVER FQDN>

There are 182 cmdlets available in the Version of PSTachyonToolkit Module 1.0.0.

Version of PSTachyonToolkit ModuleVersion of PSTachyonToolkit Module

Windows PowerShell 5.1 and PowerShell (Core) 7.x support the PSTachyonToolkit module. According to 1E, the module runs faster in PowerShell (Core) than in Windows PowerShell.

When utilizing the Search-TachyonServer functionality, 1E does not advocate using the toolkit in PowerShell ISE.

On 1E’s website, the official documentation for the PSTachyonToolkit does not seem to exist (yet).

Getting Device Information and Status

Machines are classified by their criticality in every company. A payroll server may be mission-critical, but a desktop PC may not be. The Get-TachyonDevice cmdlet in the PSTachyonToolkit allows you to easily query device data and status.

The FQDN of the endpoints is returned when the Get-TachyonDevice command is run without any arguments.

FQDNs for all endpoint devicesFQDNs for all endpoint devices

Add the -Full switch to the command to obtain all accessible attributes for each endpoint. Returning all attributes isn’t always essential, however. Filtering the characteristics to show makes more sense in this case, particularly for monitoring.

For example, to acquire the most important endpoint data, you may use the following command to pick which attributes to return.

Select-Object Status,Fqdn,Criticality,OsVerTxt,DeviceType | Get-TachyonDevice -Full

The output, as shown below, provides a high-level view of the endpoint state (0 = offline, 1 = online). When the device status is offline, the Code of Criticality tells you if you should respond fast (or panic). The criticality values are as follows for reference.

Code of Criticality Value
0 Unspecified (or not set)
1 Non-Critical
2 Low
3 Medium
4 High
5 Critical

Obtaining device information and statusObtaining device information and status

You may now adjust your script to meet your monitoring needs. For example, you should only monitor servers with a high criticality. In such situation, use the command shown below.

How to Use Where-Object in PowerShell to Filter Everything

Where-Object

Tachyon from 1E is mostly, but not fully, a GUI-driven endpoint management system. As it turns out, there is a 1E PowerShell module called PSTachyonToolkit that allows you to use Tachyon PowerShell!

This module might be beneficial to administrators who wish to use PowerShell to interact with Tachyon. Consider the possibilities for automating monitoring, communication, data processing, and problem resolution.

What is the location of the module? What are some of the procedures you may be able to perform? Where can I get assistance? When I first began looking into the module, these were just a few of my concerns. Continue reading, and this article will assist you in getting started with the PSTachyonToolkit.

You’d probably think about installing a PowerShell module from PSGallery or NuGet when you need one. The 1E PowerShell module, however, is not currently accessible in any of the well-known module galleries.

Instead, 1E clients may get the module’s download link via the Support Portal. Install or extract the module’s contents to your desired directory after downloading it.

While the module includes numerous files, there are five that are required for the module to function.

File Function
PSTachyonToolkit.psd1 The manifest file for the PowerShell module.
PSTachyonToolkit.psm1 The primary file for the PowerShell module.
methods.json The primary file for the PowerShell module.
The primary file for the PowerShell module. The primary file for the PowerShell module.
The primary file for the PowerShell module. The Tachyon signing tool setup parameters in a typical.NET configuration file.

1E’s interpreted programming language is called SCALE (Simple Cross-Platform Agent Language for Extensibility).

Understanding and Creating PowerShell Modules is related.

You may import the 1E PowerShell module into your PowerShell session now that you have it.

.PSTachyonToolkit.psd1 Import-Module

After that, enter the Tachyon server FQDN to which the module will connect. Running any further Tachyon commands without first configuring the Tachyon server will result in an error.

Set-TachyonServer -Server <TACHYON SERVER FQDN>

There are 182 cmdlets available in the Version of PSTachyonToolkit Module 1.0.0.

Version of PSTachyonToolkit ModuleVersion of PSTachyonToolkit Module

Windows PowerShell 5.1 and PowerShell (Core) 7.x support the PSTachyonToolkit module. According to 1E, the module runs faster in PowerShell (Core) than in Windows PowerShell.

When utilizing the Search-TachyonServer functionality, 1E does not advocate using the toolkit in PowerShell ISE.

On 1E’s website, the official documentation for the PSTachyonToolkit does not seem to exist (yet).

Getting Device Information and Status

Machines are classified by their criticality in every company. A payroll server may be mission-critical, but a desktop PC may not be. The Get-TachyonDevice cmdlet in the PSTachyonToolkit allows you to easily query device data and status.

The FQDN of the endpoints is returned when the Get-TachyonDevice command is run without any arguments.

FQDNs for all endpoint devicesFQDNs for all endpoint devices

Add the -Full switch to the command to obtain all accessible attributes for each endpoint. Returning all attributes isn’t always essential, however. Filtering the characteristics to show makes more sense in this case, particularly for monitoring.

For example, to acquire the most important endpoint data, you may use the following command to pick which attributes to return.

Select-Object Status,Fqdn,Criticality,OsVerTxt,DeviceType | Get-TachyonDevice -Full

The output, as shown below, provides a high-level view of the endpoint state (0 = offline, 1 = online). When the device status is offline, the Code of Criticality tells you if you should respond fast (or panic). The criticality values are as follows for reference.

Code of Criticality Value
0 Unspecified (or not set)
1 Non-Critical
2 Low
3 Medium
4 High
5 Critical

Obtaining device information and statusObtaining device information and status

You may now adjust your script to meet your monitoring needs. For example, you should only monitor servers with a high criticality. In such situation, use the command shown below.

How to Use Where-Object in PowerShell to Filter Everything

Get-TachyonDevice -Full | ` Where-Object {$_.DeviceType -eq ‘Server’ ` -and $_.Criticality -ge 4 ` -and $_.Status -eq 0} | ` Select-Object Status,Fqdn,Criticality,OsVerTxt,DeviceType

Obtaining device information and status with filteringObtaining device information and status with filtering

Why not create a custom HTML report or send alerts to Teams while you’re at it?

Instructions for Tachyon Work

Instructions are at the core of Tachyon. You’d generally open a browser and traverse the Tachyon Explorer to look for and perform instructions. You may now interact with Tachyon instructions in PowerShell in a variety of ways thanks to the PSTachyonToolkit.

Search for Interactive Instructions

Explorer as a tool for learning 1E’s Tachyon

The 1E PowerShell module enables you to search for and execute Tachyon instructions interactively. For example, if you need to find out what your endpoints’ current PowerShell execution policy is, you may use an interactive search to get the relevant instructions.

Run the program below without any arguments to begin the interactive search mode.

Now enter in your search phrase, such as execution policy, and hit Enter. When searching for execution policy, there are a few results, as seen below. By hitting the matching number, you may choose which instruction to execute. In this case, you wish to execute instruction 0.

Looking for Tachyon instructionsLooking for Tachyon instructions

After that, the program prompts you to input the needed parameter value, in this case, TargetScope. Any component of the target endpoints’ FQDN might be used as the TargetScope value. The TargetScope for the following is any machine that has 1EDemoLab.com in its FQDN.

Defining the scope of the targetDefining the scope of the target

Tachyon produces an aggregated result with 7 Unrestricted and 2 RemoteSigned endpoint PowerShell execution rules, as seen below.

The Tachyon instruction result is shown.The Tachyon instruction result is shown.

Run the Search-TachyonServer command with the -Drilldown option if you want a comprehensive list of endpoints instead of an aggregated output.

-Drilldown Search-TachyonServer

As a consequence, instead of the summary, the result displays a list of the nine endpoints.

The Drilldown argument returns a thorough list result.The Drilldown argument returns a thorough list result.

The interactive search function of the 1E PowerShell module is unquestionably useful. However, Search-TachyonServer seems to be a command for seeking Tachyon servers rather than Tachyon instructions.

The cmdlet name Search-TachyonInstruction, in my view, is more clear and straightforward. Perhaps 1E’s developers can provide that cmdlet alias in future module versions.

Existing Instructions are Executed

You may activate instructions if you already know the name of the instruction, in addition to interactively searching for them. You may use the Invoke-TachyonInstruction cmdlet to run an instruction by its name.

The instruction name for displaying the PowerShell execution policy is 1E-Explorer-TachyonCore-GetExecutionPolicyPowershellCommandLine, same as the previous example. Run the following command from PowerShell to perform this instruction:

Invoke-TachyonInstruction ` -instruction 1E-Explorer-TachyonCore-GetExecutionPolicyPowershellCommandLine ` -TargetScope <scope> -Drilldown

Invoking a previously released Tachyon commandInvoking a previously released Tachyon command

Developers could incorporate Tachyon into their PowerShell automation efforts if they could invoke commands from PowerShell. If you have a list of endpoints with an Unrestricted execution policy, you may change the execution policy to RemoteSigned automatically.

Instructions for Publication

Searching and executing pre-built instructions against Tachyon devices is a rapid approach to get information and perform actions. However, every company has a unique demand that may or may not be offered out-of-the-box.

Typically, developers use the Tachyon Instruction Management Studio to create bespoke Tachyon instructions (TIMS). The resultant XML file with instructions would then be published on the Tachyon online site.

Extending Tachyon by Learning 1E’s Tachyon

However, you may now use PowerShell to publish new instructions or modifications to existing ones. For instance, the code below pulls all expired certificates from the Personal certificate store on each device.

@allCerts = Security.GetCertificates(); SELECT EffectiveDate, ExpirationDate, FriendlyName, StoreName, Subject, Thumbprint, Issuer FROM @allCerts WHERE datetime(@allCerts.ExpirationDate) >= datetime(“%environment:now%”) and StoreName = “Personal”;

This example is digitally signed in TIMS and stored as 1E-Demo-GetExpiredPersonalCertificates.xml.

In TIMS, you may save an instruction.In TIMS, you may save an instruction.

Run the Publish-TachyonInstruction cmdlet and provide the XML filename when you’re ready to publish the instruction. Also, assign the instruction to an instruction set, such as Certificate Management in this case.

Publish-TachyonInstruction’-File.1E-Demo-GetExpiredPersonalCertificates.xml’-InstructionSet ‘Certificate Management’ Publish-TachyonInstruction’-File.1E-Demo-Get

Using PowerShell to publish an instructionUsing PowerShell to publish an instruction

After publishing, you may use Tachyon Explorer and the Search-TachyonServer cmdlet to ask the inquiry.

In PowerShell, I'm looking for a new command.In PowerShell, I’m looking for a new command.

In Tachyon Explorer, I'm looking for a new instruction.In Tachyon Explorer, I’m looking for a new instruction.

Dynamic Instructions in Action

The 1E PowerShell toolkit also allows you to execute SCALE instructions and PowerShell scripts on the fly, without having to first prepare an instruction XML file. The Invoke-TachyonDynamic command allows you to use this capability.

The following events occur in the background when you use the Invoke-TachyonDynamic cmdlet:

  • Generate the instruction XML file containing your code automatically.
  • Sign the instruction XML file digitally. By default, the program utilizes the first code signing certificate in your personal certificate store (LocalMachineMy).

You’ll need to adjust the Tachyon.InstructionSigner.exe.config file if you need to change the signing certificate settings, such as the store location or the certificate subject name.

  • Publish the dynamic instruction to the DynamicScripting instruction set. The dynamic instruction name follows the <prefix>-<random characters> naming convention, such as 1E-Demo-33ce873be9b64af586ed8464a1a33265.

The default instruction prefix is 1E-Exchange. Make sure to change the prefix that corresponds to your license by running the Set-TachyonInstructionPrefix <prefix> command first.

  • Invoke the dynamic command.

When you execute the dynamic instruction without setting the prefix or with a prefix that isn’t part of your Tachyon server license, you’ll receive the following error notice.

The incorrect prefix caused a dynamic instruction fault.The incorrect prefix caused a dynamic instruction fault.

SCALE DYNAMIC

If you wanted to run a SCALE code to get the name and version of the endpoint operating system, your code would look like this.

Note: When running SCALE DYNAMIC code, the last line should assign the output to the @result table. If not, the dynamic instruction will not contain the proper data.

@os stands for OperatingSystem. @result = SELECT Caption,Version from @os; GetSummary();

Assuming that you saved the file as GetOsInfo.txt, the below command runs this SCALE DYNAMIC code. The -Scale parameter points to the file containing your SCALE code.

# Set the licensed instruction prefix Set-TachyonInstructionPrefix “1E-Demo” # Run the SCALE DYNAMIC Invoke-TachyonDynamic -Scale .GetOsInfo.txt -TargetScope “1edemolab.com”

The final product would resemble the image below.

Running a SCALE DYNAMIC in TachyonRunning a SCALE DYNAMIC in Tachyon

Scripting in Action

SCALE is often more handy than running PowerShell scripts to conduct operations or get data. PowerShell scripts may be executed directly on endpoint devices using the Invoke-TachyonDynamic command.

The script below, for example, obtains the WinRM service name and status of endpoint devices. The output is in JSON format, so you may serialize it whatever you like.

ConvertTo-Json | Get-Service WinRM | Select-Object Name,Status

The command below will execute the PowerShell script directly on the devices using Tachyon, assuming the PowerShell script filename is GetWinRMStatus.ps1. The -Force option bypasses the target device’s PowerShell execution policy.

Invoke-TachyonDynamic -Script .GetWinRMStatus.ps1 ` -TargetScope <scope> -Force ` -Schema ‘Name string(30), Status string(20)’

The -Schema argument may be used to provide a custom schema. However, in this case, introducing a custom schema that matches the object’s properties elevates the results.

Tachyon dynamic script executionTachyon dynamic script execution

Integration of WMI

The Invoke-TachyonWmiQuery command in the PSTachyonToolkit module allows you to conduct WMI query commands directly on endpoint devices. And, since the query is handled by the Tachyon server, there is no need for WMI remoting (WinRM).

You must publish the 1E-Exchange-ExecuteWMIQuery.xml instruction XML before performing the Invoke-TachyonWMIQuery command. The XML file is located in the module folder. The cmdlet will not operate otherwise.

You may use a WMI query to acquire the BIOS information for all endpoint devices, for example. Only the query string (-Query), the WMI namespace (-Namespace), and the target endpoint scope are required (-TargetScope).

Invoke-TachyonWMIQuery -Query “select * from win32_bios” -Namespace “rootcimv2” -TargetScope <scope>

Using WMI to run a queryUsing WMI to run a query

While the Invoke-TachyonWMIQuery offers a rapid method to run WMI queries on remote devices, it lacks key aspects that I find handy. There is no natural mechanism to filter the results, as the Invoke-TachyonInstruction does, or to utilize a custom schema like the Invoke-TachyonDynamic does.

Conclusion

The 1E PowerShell PSTachyonToolkit module is already feature-rich in its first official version. This tutorial has just taught you the fundamentals so far. Overall, the 1E PowerShell PSTachyonToolkit adds to Tachyon’s extensibility in a promising way.

What’s not to appreciate about a strong tool like Tachyon that integrates with PowerShell? The ability to achieve findings that are almost identical to those obtained with Tachyon Explorer is pretty astounding. Even existing functions and instructions may be used to create reusable cmdlets!

We’ll go through a few concrete automated use cases using PSTachyonToolkit in upcoming blogs. Killing programs that may be affecting user experience, resolving network latency problems, and categorizing devices based on observed workload are just a few examples. Watch this space!

.DeviceType -eq ‘Server”and

Tachyon from 1E is mostly, but not fully, a GUI-driven endpoint management system. As it turns out, there is a 1E PowerShell module called PSTachyonToolkit that allows you to use Tachyon PowerShell!

This module might be beneficial to administrators who wish to use PowerShell to interact with Tachyon. Consider the possibilities for automating monitoring, communication, data processing, and problem resolution.

What is the location of the module? What are some of the procedures you may be able to perform? Where can I get assistance? When I first began looking into the module, these were just a few of my concerns. Continue reading, and this article will assist you in getting started with the PSTachyonToolkit.

You’d probably think about installing a PowerShell module from PSGallery or NuGet when you need one. The 1E PowerShell module, however, is not currently accessible in any of the well-known module galleries.

Instead, 1E clients may get the module’s download link via the Support Portal. Install or extract the module’s contents to your desired directory after downloading it.

While the module includes numerous files, there are five that are required for the module to function.

File Function
PSTachyonToolkit.psd1 The manifest file for the PowerShell module.
PSTachyonToolkit.psm1 The primary file for the PowerShell module.
methods.json The primary file for the PowerShell module.
The primary file for the PowerShell module. The primary file for the PowerShell module.
The primary file for the PowerShell module. The Tachyon signing tool setup parameters in a typical.NET configuration file.

1E’s interpreted programming language is called SCALE (Simple Cross-Platform Agent Language for Extensibility).

Understanding and Creating PowerShell Modules is related.

You may import the 1E PowerShell module into your PowerShell session now that you have it.

.PSTachyonToolkit.psd1 Import-Module

After that, enter the Tachyon server FQDN to which the module will connect. Running any further Tachyon commands without first configuring the Tachyon server will result in an error.

Set-TachyonServer -Server <TACHYON SERVER FQDN>

There are 182 cmdlets available in the Version of PSTachyonToolkit Module 1.0.0.

Version of PSTachyonToolkit ModuleVersion of PSTachyonToolkit Module

Windows PowerShell 5.1 and PowerShell (Core) 7.x support the PSTachyonToolkit module. According to 1E, the module runs faster in PowerShell (Core) than in Windows PowerShell.

When utilizing the Search-TachyonServer functionality, 1E does not advocate using the toolkit in PowerShell ISE.

On 1E’s website, the official documentation for the PSTachyonToolkit does not seem to exist (yet).

Getting Device Information and Status

Machines are classified by their criticality in every company. A payroll server may be mission-critical, but a desktop PC may not be. The Get-TachyonDevice cmdlet in the PSTachyonToolkit allows you to easily query device data and status.

The FQDN of the endpoints is returned when the Get-TachyonDevice command is run without any arguments.

FQDNs for all endpoint devicesFQDNs for all endpoint devices

Add the -Full switch to the command to obtain all accessible attributes for each endpoint. Returning all attributes isn’t always essential, however. Filtering the characteristics to show makes more sense in this case, particularly for monitoring.

For example, to acquire the most important endpoint data, you may use the following command to pick which attributes to return.

Select-Object Status,Fqdn,Criticality,OsVerTxt,DeviceType | Get-TachyonDevice -Full

The output, as shown below, provides a high-level view of the endpoint state (0 = offline, 1 = online). When the device status is offline, the Code of Criticality tells you if you should respond fast (or panic). The criticality values are as follows for reference.

Code of Criticality Value
0 Unspecified (or not set)
1 Non-Critical
2 Low
3 Medium
4 High
5 Critical

Obtaining device information and statusObtaining device information and status

You may now adjust your script to meet your monitoring needs. For example, you should only monitor servers with a high criticality. In such situation, use the command shown below.

How to Use Where-Object in PowerShell to Filter Everything

Get-TachyonDevice -Full | ` Where-Object {$_.DeviceType -eq ‘Server’ ` -and $_.Criticality -ge 4 ` -and $_.Status -eq 0} | ` Select-Object Status,Fqdn,Criticality,OsVerTxt,DeviceType

Obtaining device information and status with filteringObtaining device information and status with filtering

Why not create a custom HTML report or send alerts to Teams while you’re at it?

Instructions for Tachyon Work

Instructions are at the core of Tachyon. You’d generally open a browser and traverse the Tachyon Explorer to look for and perform instructions. You may now interact with Tachyon instructions in PowerShell in a variety of ways thanks to the PSTachyonToolkit.

Search for Interactive Instructions

Explorer as a tool for learning 1E’s Tachyon

The 1E PowerShell module enables you to search for and execute Tachyon instructions interactively. For example, if you need to find out what your endpoints’ current PowerShell execution policy is, you may use an interactive search to get the relevant instructions.

Run the program below without any arguments to begin the interactive search mode.

Now enter in your search phrase, such as execution policy, and hit Enter. When searching for execution policy, there are a few results, as seen below. By hitting the matching number, you may choose which instruction to execute. In this case, you wish to execute instruction 0.

Looking for Tachyon instructionsLooking for Tachyon instructions

After that, the program prompts you to input the needed parameter value, in this case, TargetScope. Any component of the target endpoints’ FQDN might be used as the TargetScope value. The TargetScope for the following is any machine that has 1EDemoLab.com in its FQDN.

Defining the scope of the targetDefining the scope of the target

Tachyon produces an aggregated result with 7 Unrestricted and 2 RemoteSigned endpoint PowerShell execution rules, as seen below.

The Tachyon instruction result is shown.The Tachyon instruction result is shown.

Run the Search-TachyonServer command with the -Drilldown option if you want a comprehensive list of endpoints instead of an aggregated output.

-Drilldown Search-TachyonServer

As a consequence, instead of the summary, the result displays a list of the nine endpoints.

The Drilldown argument returns a thorough list result.The Drilldown argument returns a thorough list result.

The interactive search function of the 1E PowerShell module is unquestionably useful. However, Search-TachyonServer seems to be a command for seeking Tachyon servers rather than Tachyon instructions.

The cmdlet name Search-TachyonInstruction, in my view, is more clear and straightforward. Perhaps 1E’s developers can provide that cmdlet alias in future module versions.

Existing Instructions are Executed

You may activate instructions if you already know the name of the instruction, in addition to interactively searching for them. You may use the Invoke-TachyonInstruction cmdlet to run an instruction by its name.

The instruction name for displaying the PowerShell execution policy is 1E-Explorer-TachyonCore-GetExecutionPolicyPowershellCommandLine, same as the previous example. Run the following command from PowerShell to perform this instruction:

Invoke-TachyonInstruction ` -instruction 1E-Explorer-TachyonCore-GetExecutionPolicyPowershellCommandLine ` -TargetScope <scope> -Drilldown

Invoking a previously released Tachyon commandInvoking a previously released Tachyon command

Developers could incorporate Tachyon into their PowerShell automation efforts if they could invoke commands from PowerShell. If you have a list of endpoints with an Unrestricted execution policy, you may change the execution policy to RemoteSigned automatically.

Instructions for Publication

Searching and executing pre-built instructions against Tachyon devices is a rapid approach to get information and perform actions. However, every company has a unique demand that may or may not be offered out-of-the-box.

Typically, developers use the Tachyon Instruction Management Studio to create bespoke Tachyon instructions (TIMS). The resultant XML file with instructions would then be published on the Tachyon online site.

Extending Tachyon by Learning 1E’s Tachyon

However, you may now use PowerShell to publish new instructions or modifications to existing ones. For instance, the code below pulls all expired certificates from the Personal certificate store on each device.

@allCerts = Security.GetCertificates(); SELECT EffectiveDate, ExpirationDate, FriendlyName, StoreName, Subject, Thumbprint, Issuer FROM @allCerts WHERE datetime(@allCerts.ExpirationDate) >= datetime(“%environment:now%”) and StoreName = “Personal”;

This example is digitally signed in TIMS and stored as 1E-Demo-GetExpiredPersonalCertificates.xml.

In TIMS, you may save an instruction.In TIMS, you may save an instruction.

Run the Publish-TachyonInstruction cmdlet and provide the XML filename when you’re ready to publish the instruction. Also, assign the instruction to an instruction set, such as Certificate Management in this case.

Publish-TachyonInstruction’-File.1E-Demo-GetExpiredPersonalCertificates.xml’-InstructionSet ‘Certificate Management’ Publish-TachyonInstruction’-File.1E-Demo-Get

Using PowerShell to publish an instructionUsing PowerShell to publish an instruction

After publishing, you may use Tachyon Explorer and the Search-TachyonServer cmdlet to ask the inquiry.

In PowerShell, I'm looking for a new command.In PowerShell, I’m looking for a new command.

In Tachyon Explorer, I'm looking for a new instruction.In Tachyon Explorer, I’m looking for a new instruction.

Dynamic Instructions in Action

The 1E PowerShell toolkit also allows you to execute SCALE instructions and PowerShell scripts on the fly, without having to first prepare an instruction XML file. The Invoke-TachyonDynamic command allows you to use this capability.

The following events occur in the background when you use the Invoke-TachyonDynamic cmdlet:

  • Generate the instruction XML file containing your code automatically.
  • Sign the instruction XML file digitally. By default, the program utilizes the first code signing certificate in your personal certificate store (LocalMachineMy).

You’ll need to adjust the Tachyon.InstructionSigner.exe.config file if you need to change the signing certificate settings, such as the store location or the certificate subject name.

  • Publish the dynamic instruction to the DynamicScripting instruction set. The dynamic instruction name follows the <prefix>-<random characters> naming convention, such as 1E-Demo-33ce873be9b64af586ed8464a1a33265.

The default instruction prefix is 1E-Exchange. Make sure to change the prefix that corresponds to your license by running the Set-TachyonInstructionPrefix <prefix> command first.

  • Invoke the dynamic command.

When you execute the dynamic instruction without setting the prefix or with a prefix that isn’t part of your Tachyon server license, you’ll receive the following error notice.

The incorrect prefix caused a dynamic instruction fault.The incorrect prefix caused a dynamic instruction fault.

SCALE DYNAMIC

If you wanted to run a SCALE code to get the name and version of the endpoint operating system, your code would look like this.

Note: When running SCALE DYNAMIC code, the last line should assign the output to the @result table. If not, the dynamic instruction will not contain the proper data.

@os stands for OperatingSystem. @result = SELECT Caption,Version from @os; GetSummary();

Assuming that you saved the file as GetOsInfo.txt, the below command runs this SCALE DYNAMIC code. The -Scale parameter points to the file containing your SCALE code.

# Set the licensed instruction prefix Set-TachyonInstructionPrefix “1E-Demo” # Run the SCALE DYNAMIC Invoke-TachyonDynamic -Scale .GetOsInfo.txt -TargetScope “1edemolab.com”

The final product would resemble the image below.

Running a SCALE DYNAMIC in TachyonRunning a SCALE DYNAMIC in Tachyon

Scripting in Action

SCALE is often more handy than running PowerShell scripts to conduct operations or get data. PowerShell scripts may be executed directly on endpoint devices using the Invoke-TachyonDynamic command.

The script below, for example, obtains the WinRM service name and status of endpoint devices. The output is in JSON format, so you may serialize it whatever you like.

ConvertTo-Json | Get-Service WinRM | Select-Object Name,Status

The command below will execute the PowerShell script directly on the devices using Tachyon, assuming the PowerShell script filename is GetWinRMStatus.ps1. The -Force option bypasses the target device’s PowerShell execution policy.

Invoke-TachyonDynamic -Script .GetWinRMStatus.ps1 ` -TargetScope <scope> -Force ` -Schema ‘Name string(30), Status string(20)’

The -Schema argument may be used to provide a custom schema. However, in this case, introducing a custom schema that matches the object’s properties elevates the results.

Tachyon dynamic script executionTachyon dynamic script execution

Integration of WMI

The Invoke-TachyonWmiQuery command in the PSTachyonToolkit module allows you to conduct WMI query commands directly on endpoint devices. And, since the query is handled by the Tachyon server, there is no need for WMI remoting (WinRM).

You must publish the 1E-Exchange-ExecuteWMIQuery.xml instruction XML before performing the Invoke-TachyonWMIQuery command. The XML file is located in the module folder. The cmdlet will not operate otherwise.

You may use a WMI query to acquire the BIOS information for all endpoint devices, for example. Only the query string (-Query), the WMI namespace (-Namespace), and the target endpoint scope are required (-TargetScope).

Invoke-TachyonWMIQuery -Query “select * from win32_bios” -Namespace “rootcimv2” -TargetScope <scope>

Using WMI to run a queryUsing WMI to run a query

While the Invoke-TachyonWMIQuery offers a rapid method to run WMI queries on remote devices, it lacks key aspects that I find handy. There is no natural mechanism to filter the results, as the Invoke-TachyonInstruction does, or to utilize a custom schema like the Invoke-TachyonDynamic does.

Conclusion

The 1E PowerShell PSTachyonToolkit module is already feature-rich in its first official version. This tutorial has just taught you the fundamentals so far. Overall, the 1E PowerShell PSTachyonToolkit adds to Tachyon’s extensibility in a promising way.

What’s not to appreciate about a strong tool like Tachyon that integrates with PowerShell? The ability to achieve findings that are almost identical to those obtained with Tachyon Explorer is pretty astounding. Even existing functions and instructions may be used to create reusable cmdlets!

We’ll go through a few concrete automated use cases using PSTachyonToolkit in upcoming blogs. Killing programs that may be affecting user experience, resolving network latency problems, and categorizing devices based on observed workload are just a few examples. Watch this space!

.Criticality -ge 4’and

Tachyon from 1E is mostly, but not fully, a GUI-driven endpoint management system. As it turns out, there is a 1E PowerShell module called PSTachyonToolkit that allows you to use Tachyon PowerShell!

This module might be beneficial to administrators who wish to use PowerShell to interact with Tachyon. Consider the possibilities for automating monitoring, communication, data processing, and problem resolution.

What is the location of the module? What are some of the procedures you may be able to perform? Where can I get assistance? When I first began looking into the module, these were just a few of my concerns. Continue reading, and this article will assist you in getting started with the PSTachyonToolkit.

You’d probably think about installing a PowerShell module from PSGallery or NuGet when you need one. The 1E PowerShell module, however, is not currently accessible in any of the well-known module galleries.

Instead, 1E clients may get the module’s download link via the Support Portal. Install or extract the module’s contents to your desired directory after downloading it.

While the module includes numerous files, there are five that are required for the module to function.

File Function
PSTachyonToolkit.psd1 The manifest file for the PowerShell module.
PSTachyonToolkit.psm1 The primary file for the PowerShell module.
methods.json The primary file for the PowerShell module.
The primary file for the PowerShell module. The primary file for the PowerShell module.
The primary file for the PowerShell module. The Tachyon signing tool setup parameters in a typical.NET configuration file.

1E’s interpreted programming language is called SCALE (Simple Cross-Platform Agent Language for Extensibility).

Understanding and Creating PowerShell Modules is related.

You may import the 1E PowerShell module into your PowerShell session now that you have it.

.PSTachyonToolkit.psd1 Import-Module

After that, enter the Tachyon server FQDN to which the module will connect. Running any further Tachyon commands without first configuring the Tachyon server will result in an error.

Set-TachyonServer -Server <TACHYON SERVER FQDN>

There are 182 cmdlets available in the Version of PSTachyonToolkit Module 1.0.0.

Version of PSTachyonToolkit ModuleVersion of PSTachyonToolkit Module

Windows PowerShell 5.1 and PowerShell (Core) 7.x support the PSTachyonToolkit module. According to 1E, the module runs faster in PowerShell (Core) than in Windows PowerShell.

When utilizing the Search-TachyonServer functionality, 1E does not advocate using the toolkit in PowerShell ISE.

On 1E’s website, the official documentation for the PSTachyonToolkit does not seem to exist (yet).

Getting Device Information and Status

Machines are classified by their criticality in every company. A payroll server may be mission-critical, but a desktop PC may not be. The Get-TachyonDevice cmdlet in the PSTachyonToolkit allows you to easily query device data and status.

The FQDN of the endpoints is returned when the Get-TachyonDevice command is run without any arguments.

FQDNs for all endpoint devicesFQDNs for all endpoint devices

Add the -Full switch to the command to obtain all accessible attributes for each endpoint. Returning all attributes isn’t always essential, however. Filtering the characteristics to show makes more sense in this case, particularly for monitoring.

For example, to acquire the most important endpoint data, you may use the following command to pick which attributes to return.

Select-Object Status,Fqdn,Criticality,OsVerTxt,DeviceType | Get-TachyonDevice -Full

The output, as shown below, provides a high-level view of the endpoint state (0 = offline, 1 = online). When the device status is offline, the Code of Criticality tells you if you should respond fast (or panic). The criticality values are as follows for reference.

Code of Criticality Value
0 Unspecified (or not set)
1 Non-Critical
2 Low
3 Medium
4 High
5 Critical

Obtaining device information and statusObtaining device information and status

You may now adjust your script to meet your monitoring needs. For example, you should only monitor servers with a high criticality. In such situation, use the command shown below.

How to Use Where-Object in PowerShell to Filter Everything

Get-TachyonDevice -Full | ` Where-Object {$_.DeviceType -eq ‘Server’ ` -and $_.Criticality -ge 4 ` -and $_.Status -eq 0} | ` Select-Object Status,Fqdn,Criticality,OsVerTxt,DeviceType

Obtaining device information and status with filteringObtaining device information and status with filtering

Why not create a custom HTML report or send alerts to Teams while you’re at it?

Instructions for Tachyon Work

Instructions are at the core of Tachyon. You’d generally open a browser and traverse the Tachyon Explorer to look for and perform instructions. You may now interact with Tachyon instructions in PowerShell in a variety of ways thanks to the PSTachyonToolkit.

Search for Interactive Instructions

Explorer as a tool for learning 1E’s Tachyon

The 1E PowerShell module enables you to search for and execute Tachyon instructions interactively. For example, if you need to find out what your endpoints’ current PowerShell execution policy is, you may use an interactive search to get the relevant instructions.

Run the program below without any arguments to begin the interactive search mode.

Now enter in your search phrase, such as execution policy, and hit Enter. When searching for execution policy, there are a few results, as seen below. By hitting the matching number, you may choose which instruction to execute. In this case, you wish to execute instruction 0.

Looking for Tachyon instructionsLooking for Tachyon instructions

After that, the program prompts you to input the needed parameter value, in this case, TargetScope. Any component of the target endpoints’ FQDN might be used as the TargetScope value. The TargetScope for the following is any machine that has 1EDemoLab.com in its FQDN.

Defining the scope of the targetDefining the scope of the target

Tachyon produces an aggregated result with 7 Unrestricted and 2 RemoteSigned endpoint PowerShell execution rules, as seen below.

The Tachyon instruction result is shown.The Tachyon instruction result is shown.

Run the Search-TachyonServer command with the -Drilldown option if you want a comprehensive list of endpoints instead of an aggregated output.

-Drilldown Search-TachyonServer

As a consequence, instead of the summary, the result displays a list of the nine endpoints.

The Drilldown argument returns a thorough list result.The Drilldown argument returns a thorough list result.

The interactive search function of the 1E PowerShell module is unquestionably useful. However, Search-TachyonServer seems to be a command for seeking Tachyon servers rather than Tachyon instructions.

The cmdlet name Search-TachyonInstruction, in my view, is more clear and straightforward. Perhaps 1E’s developers can provide that cmdlet alias in future module versions.

Existing Instructions are Executed

You may activate instructions if you already know the name of the instruction, in addition to interactively searching for them. You may use the Invoke-TachyonInstruction cmdlet to run an instruction by its name.

The instruction name for displaying the PowerShell execution policy is 1E-Explorer-TachyonCore-GetExecutionPolicyPowershellCommandLine, same as the previous example. Run the following command from PowerShell to perform this instruction:

Invoke-TachyonInstruction ` -instruction 1E-Explorer-TachyonCore-GetExecutionPolicyPowershellCommandLine ` -TargetScope <scope> -Drilldown

Invoking a previously released Tachyon commandInvoking a previously released Tachyon command

Developers could incorporate Tachyon into their PowerShell automation efforts if they could invoke commands from PowerShell. If you have a list of endpoints with an Unrestricted execution policy, you may change the execution policy to RemoteSigned automatically.

Instructions for Publication

Searching and executing pre-built instructions against Tachyon devices is a rapid approach to get information and perform actions. However, every company has a unique demand that may or may not be offered out-of-the-box.

Typically, developers use the Tachyon Instruction Management Studio to create bespoke Tachyon instructions (TIMS). The resultant XML file with instructions would then be published on the Tachyon online site.

Extending Tachyon by Learning 1E’s Tachyon

However, you may now use PowerShell to publish new instructions or modifications to existing ones. For instance, the code below pulls all expired certificates from the Personal certificate store on each device.

@allCerts = Security.GetCertificates(); SELECT EffectiveDate, ExpirationDate, FriendlyName, StoreName, Subject, Thumbprint, Issuer FROM @allCerts WHERE datetime(@allCerts.ExpirationDate) >= datetime(“%environment:now%”) and StoreName = “Personal”;

This example is digitally signed in TIMS and stored as 1E-Demo-GetExpiredPersonalCertificates.xml.

In TIMS, you may save an instruction.In TIMS, you may save an instruction.

Run the Publish-TachyonInstruction cmdlet and provide the XML filename when you’re ready to publish the instruction. Also, assign the instruction to an instruction set, such as Certificate Management in this case.

Publish-TachyonInstruction’-File.1E-Demo-GetExpiredPersonalCertificates.xml’-InstructionSet ‘Certificate Management’ Publish-TachyonInstruction’-File.1E-Demo-Get

Using PowerShell to publish an instructionUsing PowerShell to publish an instruction

After publishing, you may use Tachyon Explorer and the Search-TachyonServer cmdlet to ask the inquiry.

In PowerShell, I'm looking for a new command.In PowerShell, I’m looking for a new command.

In Tachyon Explorer, I'm looking for a new instruction.In Tachyon Explorer, I’m looking for a new instruction.

Dynamic Instructions in Action

The 1E PowerShell toolkit also allows you to execute SCALE instructions and PowerShell scripts on the fly, without having to first prepare an instruction XML file. The Invoke-TachyonDynamic command allows you to use this capability.

The following events occur in the background when you use the Invoke-TachyonDynamic cmdlet:

  • Generate the instruction XML file containing your code automatically.
  • Sign the instruction XML file digitally. By default, the program utilizes the first code signing certificate in your personal certificate store (LocalMachineMy).

You’ll need to adjust the Tachyon.InstructionSigner.exe.config file if you need to change the signing certificate settings, such as the store location or the certificate subject name.

  • Publish the dynamic instruction to the DynamicScripting instruction set. The dynamic instruction name follows the <prefix>-<random characters> naming convention, such as 1E-Demo-33ce873be9b64af586ed8464a1a33265.

The default instruction prefix is 1E-Exchange. Make sure to change the prefix that corresponds to your license by running the Set-TachyonInstructionPrefix <prefix> command first.

  • Invoke the dynamic command.

When you execute the dynamic instruction without setting the prefix or with a prefix that isn’t part of your Tachyon server license, you’ll receive the following error notice.

The incorrect prefix caused a dynamic instruction fault.The incorrect prefix caused a dynamic instruction fault.

SCALE DYNAMIC

If you wanted to run a SCALE code to get the name and version of the endpoint operating system, your code would look like this.

Note: When running SCALE DYNAMIC code, the last line should assign the output to the @result table. If not, the dynamic instruction will not contain the proper data.

@os stands for OperatingSystem. @result = SELECT Caption,Version from @os; GetSummary();

Assuming that you saved the file as GetOsInfo.txt, the below command runs this SCALE DYNAMIC code. The -Scale parameter points to the file containing your SCALE code.

# Set the licensed instruction prefix Set-TachyonInstructionPrefix “1E-Demo” # Run the SCALE DYNAMIC Invoke-TachyonDynamic -Scale .GetOsInfo.txt -TargetScope “1edemolab.com”

The final product would resemble the image below.

Running a SCALE DYNAMIC in TachyonRunning a SCALE DYNAMIC in Tachyon

Scripting in Action

SCALE is often more handy than running PowerShell scripts to conduct operations or get data. PowerShell scripts may be executed directly on endpoint devices using the Invoke-TachyonDynamic command.

The script below, for example, obtains the WinRM service name and status of endpoint devices. The output is in JSON format, so you may serialize it whatever you like.

ConvertTo-Json | Get-Service WinRM | Select-Object Name,Status

The command below will execute the PowerShell script directly on the devices using Tachyon, assuming the PowerShell script filename is GetWinRMStatus.ps1. The -Force option bypasses the target device’s PowerShell execution policy.

Invoke-TachyonDynamic -Script .GetWinRMStatus.ps1 ` -TargetScope <scope> -Force ` -Schema ‘Name string(30), Status string(20)’

The -Schema argument may be used to provide a custom schema. However, in this case, introducing a custom schema that matches the object’s properties elevates the results.

Tachyon dynamic script executionTachyon dynamic script execution

Integration of WMI

The Invoke-TachyonWmiQuery command in the PSTachyonToolkit module allows you to conduct WMI query commands directly on endpoint devices. And, since the query is handled by the Tachyon server, there is no need for WMI remoting (WinRM).

You must publish the 1E-Exchange-ExecuteWMIQuery.xml instruction XML before performing the Invoke-TachyonWMIQuery command. The XML file is located in the module folder. The cmdlet will not operate otherwise.

You may use a WMI query to acquire the BIOS information for all endpoint devices, for example. Only the query string (-Query), the WMI namespace (-Namespace), and the target endpoint scope are required (-TargetScope).

Invoke-TachyonWMIQuery -Query “select * from win32_bios” -Namespace “rootcimv2” -TargetScope <scope>

Using WMI to run a queryUsing WMI to run a query

While the Invoke-TachyonWMIQuery offers a rapid method to run WMI queries on remote devices, it lacks key aspects that I find handy. There is no natural mechanism to filter the results, as the Invoke-TachyonInstruction does, or to utilize a custom schema like the Invoke-TachyonDynamic does.

Conclusion

The 1E PowerShell PSTachyonToolkit module is already feature-rich in its first official version. This tutorial has just taught you the fundamentals so far. Overall, the 1E PowerShell PSTachyonToolkit adds to Tachyon’s extensibility in a promising way.

What’s not to appreciate about a strong tool like Tachyon that integrates with PowerShell? The ability to achieve findings that are almost identical to those obtained with Tachyon Explorer is pretty astounding. Even existing functions and instructions may be used to create reusable cmdlets!

We’ll go through a few concrete automated use cases using PSTachyonToolkit in upcoming blogs. Killing programs that may be affecting user experience, resolving network latency problems, and categorizing devices based on observed workload are just a few examples. Watch this space!

.Status -eq 0 |’Select-Object Status,Fqdn,Criticality,OsVerTxt,DeviceType

Obtaining device information and status with filteringObtaining device information and status with filtering

Why not create a custom HTML report or send alerts to Teams while you’re at it?

Instructions for Tachyon Work

Instructions are at the core of Tachyon. You’d generally open a browser and traverse the Tachyon Explorer to look for and perform instructions. You may now interact with Tachyon instructions in PowerShell in a variety of ways thanks to the PSTachyonToolkit.

Search for Interactive Instructions

Explorer as a tool for learning 1E’s Tachyon

The 1E PowerShell module enables you to search for and execute Tachyon instructions interactively. For example, if you need to find out what your endpoints’ current PowerShell execution policy is, you may use an interactive search to get the relevant instructions.

Run the program below without any arguments to begin the interactive search mode.

Now enter in your search phrase, such as execution policy, and hit Enter. When searching for execution policy, there are a few results, as seen below. By hitting the matching number, you may choose which instruction to execute. In this case, you wish to execute instruction 0.

Looking for Tachyon instructionsLooking for Tachyon instructions

After that, the program prompts you to input the needed parameter value, in this case, TargetScope. Any component of the target endpoints’ FQDN might be used as the TargetScope value. The TargetScope for the following is any machine that has 1EDemoLab.com in its FQDN.

Defining the scope of the targetDefining the scope of the target

Tachyon produces an aggregated result with 7 Unrestricted and 2 RemoteSigned endpoint PowerShell execution rules, as seen below.

The Tachyon instruction result is shown.The Tachyon instruction result is shown.

Run the Search-TachyonServer command with the -Drilldown option if you want a comprehensive list of endpoints instead of an aggregated output.

-Drilldown Search-TachyonServer

As a consequence, instead of the summary, the result displays a list of the nine endpoints.

The Drilldown argument returns a thorough list result.The Drilldown argument returns a thorough list result.

The interactive search function of the 1E PowerShell module is unquestionably useful. However, Search-TachyonServer seems to be a command for seeking Tachyon servers rather than Tachyon instructions.

The cmdlet name Search-TachyonInstruction, in my view, is more clear and straightforward. Perhaps 1E’s developers can provide that cmdlet alias in future module versions.

Existing Instructions are Executed

You may activate instructions if you already know the name of the instruction, in addition to interactively searching for them. You may use the Invoke-TachyonInstruction cmdlet to run an instruction by its name.

The instruction name for displaying the PowerShell execution policy is 1E-Explorer-TachyonCore-GetExecutionPolicyPowershellCommandLine, same as the previous example. Run the following command from PowerShell to perform this instruction:

Invoke-TachyonInstruction ` -instruction 1E-Explorer-TachyonCore-GetExecutionPolicyPowershellCommandLine ` -TargetScope <scope> -Drilldown

Invoking a previously released Tachyon commandInvoking a previously released Tachyon command

Developers could incorporate Tachyon into their PowerShell automation efforts if they could invoke commands from PowerShell. If you have a list of endpoints with an Unrestricted execution policy, you may change the execution policy to RemoteSigned automatically.

Instructions for Publication

Searching and executing pre-built instructions against Tachyon devices is a rapid approach to get information and perform actions. However, every company has a unique demand that may or may not be offered out-of-the-box.

Typically, developers use the Tachyon Instruction Management Studio to create bespoke Tachyon instructions (TIMS). The resultant XML file with instructions would then be published on the Tachyon online site.

Extending Tachyon by Learning 1E’s Tachyon

However, you may now use PowerShell to publish new instructions or modifications to existing ones. For instance, the code below pulls all expired certificates from the Personal certificate store on each device.

@allCerts = Security.GetCertificates(); SELECT EffectiveDate, ExpirationDate, FriendlyName, StoreName, Subject, Thumbprint, Issuer FROM @allCerts WHERE datetime(@allCerts.ExpirationDate) >= datetime(“%environment:now%”) and StoreName = “Personal”;

This example is digitally signed in TIMS and stored as 1E-Demo-GetExpiredPersonalCertificates.xml.

In TIMS, you may save an instruction.In TIMS, you may save an instruction.

Run the Publish-TachyonInstruction cmdlet and provide the XML filename when you’re ready to publish the instruction. Also, assign the instruction to an instruction set, such as Certificate Management in this case.

Publish-TachyonInstruction’-File.1E-Demo-GetExpiredPersonalCertificates.xml’-InstructionSet ‘Certificate Management’ Publish-TachyonInstruction’-File.1E-Demo-Get

Using PowerShell to publish an instructionUsing PowerShell to publish an instruction

After publishing, you may use Tachyon Explorer and the Search-TachyonServer cmdlet to ask the inquiry.

In PowerShell, I'm looking for a new command.In PowerShell, I’m looking for a new command.

In Tachyon Explorer, I'm looking for a new instruction.In Tachyon Explorer, I’m looking for a new instruction.

Dynamic Instructions in Action

The 1E PowerShell toolkit also allows you to execute SCALE instructions and PowerShell scripts on the fly, without having to first prepare an instruction XML file. The Invoke-TachyonDynamic command allows you to use this capability.

The following events occur in the background when you use the Invoke-TachyonDynamic cmdlet:

  • Generate the instruction XML file containing your code automatically.
  • Sign the instruction XML file digitally. By default, the program utilizes the first code signing certificate in your personal certificate store (LocalMachineMy).

You’ll need to adjust the Tachyon.InstructionSigner.exe.config file if you need to change the signing certificate settings, such as the store location or the certificate subject name.

  • Publish the dynamic instruction to the DynamicScripting instruction set. The dynamic instruction name follows the <prefix>-<random characters> naming convention, such as 1E-Demo-33ce873be9b64af586ed8464a1a33265.

The default instruction prefix is 1E-Exchange. Make sure to change the prefix that corresponds to your license by running the Set-TachyonInstructionPrefix <prefix> command first.

  • Invoke the dynamic command.

When you execute the dynamic instruction without setting the prefix or with a prefix that isn’t part of your Tachyon server license, you’ll receive the following error notice.

The incorrect prefix caused a dynamic instruction fault.The incorrect prefix caused a dynamic instruction fault.

SCALE DYNAMIC

If you wanted to run a SCALE code to get the name and version of the endpoint operating system, your code would look like this.

Note: When running SCALE DYNAMIC code, the last line should assign the output to the @result table. If not, the dynamic instruction will not contain the proper data.

@os stands for OperatingSystem. @result = SELECT Caption,Version from @os; GetSummary();

Assuming that you saved the file as GetOsInfo.txt, the below command runs this SCALE DYNAMIC code. The -Scale parameter points to the file containing your SCALE code.

# Set the licensed instruction prefix Set-TachyonInstructionPrefix “1E-Demo” # Run the SCALE DYNAMIC Invoke-TachyonDynamic -Scale .GetOsInfo.txt -TargetScope “1edemolab.com”

The final product would resemble the image below.

Running a SCALE DYNAMIC in TachyonRunning a SCALE DYNAMIC in Tachyon

Scripting in Action

SCALE is often more handy than running PowerShell scripts to conduct operations or get data. PowerShell scripts may be executed directly on endpoint devices using the Invoke-TachyonDynamic command.

The script below, for example, obtains the WinRM service name and status of endpoint devices. The output is in JSON format, so you may serialize it whatever you like.

ConvertTo-Json | Get-Service WinRM | Select-Object Name,Status

The command below will execute the PowerShell script directly on the devices using Tachyon, assuming the PowerShell script filename is GetWinRMStatus.ps1. The -Force option bypasses the target device’s PowerShell execution policy.

Invoke-TachyonDynamic -Script .GetWinRMStatus.ps1 ` -TargetScope <scope> -Force ` -Schema ‘Name string(30), Status string(20)’

The -Schema argument may be used to provide a custom schema. However, in this case, introducing a custom schema that matches the object’s properties elevates the results.

Tachyon dynamic script executionTachyon dynamic script execution

Integration of WMI

The Invoke-TachyonWmiQuery command in the PSTachyonToolkit module allows you to conduct WMI query commands directly on endpoint devices. And, since the query is handled by the Tachyon server, there is no need for WMI remoting (WinRM).

You must publish the 1E-Exchange-ExecuteWMIQuery.xml instruction XML before performing the Invoke-TachyonWMIQuery command. The XML file is located in the module folder. The cmdlet will not operate otherwise.

You may use a WMI query to acquire the BIOS information for all endpoint devices, for example. Only the query string (-Query), the WMI namespace (-Namespace), and the target endpoint scope are required (-TargetScope).

Invoke-TachyonWMIQuery -Query “select * from win32_bios” -Namespace “rootcimv2” -TargetScope <scope>

Using WMI to run a queryUsing WMI to run a query

While the Invoke-TachyonWMIQuery offers a rapid method to run WMI queries on remote devices, it lacks key aspects that I find handy. There is no natural mechanism to filter the results, as the Invoke-TachyonInstruction does, or to utilize a custom schema like the Invoke-TachyonDynamic does.

Conclusion

The 1E PowerShell PSTachyonToolkit module is already feature-rich in its first official version. This tutorial has just taught you the fundamentals so far. Overall, the 1E PowerShell PSTachyonToolkit adds to Tachyon’s extensibility in a promising way.

What’s not to appreciate about a strong tool like Tachyon that integrates with PowerShell? The ability to achieve findings that are almost identical to those obtained with Tachyon Explorer is pretty astounding. Even existing functions and instructions may be used to create reusable cmdlets!

We’ll go through a few concrete automated use cases using PSTachyonToolkit in upcoming blogs. Killing programs that may be affecting user experience, resolving network latency problems, and categorizing devices based on observed workload are just a few examples. Watch this space!