PowerShell Basics: Group Step

Exported on 11-Nov-2021 11:39:36

POWERSHELL BASIC BLUEPRINT (Group Step)

This is a Blueprint of Basic PowerShell commands on Attune for Group Step (Step 1 and Step 2)

Parameters

Name Type Script Reference Default Value Comment
Attune Node Windows Server attuneNode This is an Attune Node
Attune Node Credentials Windows OS Credential attuneNodeCredentials This is my Attune Node Credential

1 - Step 1

POWERSHELL BASIC BLUEPRINT (Group Step 1)

This is basic step 1 that will hold two different steps of PowerShell Script that will run one step after another (Parallel Concurrency set to 1)

1.1 - Get Service

Get Service

This gets all the services on the Target Machine

The connection details have changed from the last step.

Login as user on node

  1. Connect via RDP
    mstsc /admin /v:Attune Node
  2. Login as user {Attune Node Credentials}
  3. Then open a command prompt
This is a PowerShell Script make sure you run it with powershell.exe Click start menu, enter "powershell" in the search bar, then select the powersehll program
# Writes the text in front of the CMDLET
Write-Host "Below are the services running on the PC/Server"

# Pause the script for 3 Seconds
Start-Sleep -s 3

# Get the Services running on the Server
Get-Service

# Writes the text in front of the CMDLET
Write-Host "Completed"

1.2 - Get Process

Get Process

This gets all the processes running on the Target Machine

Login as user on node

  1. Connect via RDP
    mstsc /admin /v:Attune Node
  2. Login as user {Attune Node Credentials}
  3. Then open a command prompt
This is a PowerShell Script make sure you run it with powershell.exe Click start menu, enter "powershell" in the search bar, then select the powersehll program
# Writes the text in front of the CMDLET
Write-Host "Below are the processes running on the PC/Server"

# Pause the script for 3 Seconds
Start-Sleep -s 3

# Get the Processes running on the Server
Get-Process

# Writes the text in front of the CMDLET
Write-Host "Completed"

2 - Step 2

POWERSHELL BASIC BLUEPRINT (Group Step 2)

This is basic step 2 that will hold two different steps of PowerShell Script that will run one step after another (Parallel Concurrency set to 1)

2.1 - Get EventLog

Get EventLog

This gets the EventLog on the Target Machine

Login as user on node

  1. Connect via RDP
    mstsc /admin /v:Attune Node
  2. Login as user {Attune Node Credentials}
  3. Then open a command prompt
This is a PowerShell Script make sure you run it with powershell.exe Click start menu, enter "powershell" in the search bar, then select the powersehll program
# Writes the text in front of the CMDLET
Write-Host "Below are the services running on the PC/Server"

# Pause the script for 3 Seconds
Start-Sleep -s 3

# Get the Services running on the Server
Get-Service

# Writes the text in front of the CMDLET
Write-Host "Completed"

2.2 - Get PSDrive

Get PSDrive

This gets the list of Drives on the Target Machine

Login as user on node

  1. Connect via RDP
    mstsc /admin /v:Attune Node
  2. Login as user {Attune Node Credentials}
  3. Then open a command prompt
This is a PowerShell Script make sure you run it with powershell.exe Click start menu, enter "powershell" in the search bar, then select the powersehll program
# Writes the text in front of the CMDLET
Write-Host "Below is the list of Drives on PC/Server"

# Pause the script for 3 Seconds
Start-Sleep -s 3

# Get the Drives available on the server
Get-PSDrive | Format-Table

# Writes the text in front of the CMDLET
Write-Host "Completed"