You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Any scripts that "manage" (list/add/remove) something does not fit in TRMM at the moment and require some mental gymnastics to make it work
When running scripts, it is complicated to have scripts with multiple options and or choices to help setting variables for the run
And set "profiles" inside scripts with multiple choices already pre-made
Describe the solution you'd like
When running a script if the script is set as "interactive" open a terminal to interact with the remote script currently running.
once the script is over or timeout add the whole terminal interaction to the history
this would also allow people to also integrate compiled binaries to scripts that require user interaction by calling them (i was thinking about win-acme for exemple or any other cli tool)
these would obviously not be allowed to be used in policy/tasks/checks as they by nature require user inputs
Describe alternatives you've considered
lots of work and annoying things
Additional context
Here an extreme exemple of what could be run in this feature:
Write-Host "The shadows beckon... Welcome to the PowerShell Demo, where nothing is as it seems..." -ForegroundColor DarkGray
$name = Read-Host "Enter your name, if you dare..."
$age = Read-Host "How many years have you walked this cursed earth?"
$color = Read-Host "What is the color of your soul?"
Write-Host "Ah, $name... You are $age years old, and your soul is stained with the color of $color." -ForegroundColor DarkRed
$password = Read-Host "Give me your password, the key to your inner sanctum..." -AsSecureString
$plainPassword = [System.Net.NetworkCredential]::new("", $password).Password
Write-Host "The password... has been revealed: $plainPassword" -ForegroundColor DarkYellow
do {
$number = Read-Host "A number, between 1 and 10. Choose wisely, for the consequences are real."
if ($number -lt 1 -or $number -gt 10) { Write-Host "That was a foolish choice. Try again." -ForegroundColor Red }
} while ($number -lt 1 -or $number -gt 10)
Write-Host "You dared to choose $number... A valid choice, but are you ready for what's next?" -ForegroundColor DarkRed
$file = "C:\path\to\file.txt"
$confirmation = Read-Host "Are you sure you wish to delete the cursed file $file? (yes/no)"
if ($confirmation -eq "yes") { Write-Host "The file is no more. It has been erased from existence." -ForegroundColor Black }
elseif ($confirmation -eq "no") { Write-Host "You hesitate. The file remains, a silent witness to your fear." -ForegroundColor DarkGray }
else { Write-Host "The abyss swallows your indecision. The file remains, untouched." -ForegroundColor DarkGray }
Write-Host "You cannot escape. The task must be completed..." -ForegroundColor DarkGray
$steps = 10
for ($i = 1; $i -le $steps; $i++) {
$percent = ($i / $steps) * 100
Write-Progress -PercentComplete $percent -Status "The process continues..." -Activity "Step $i of $steps"
Start-Sleep -Seconds 1
}
Write-Host "It is done. The task is complete. But at what cost?" -ForegroundColor DarkRed
Write-Host "Choose your path carefully..." -ForegroundColor DarkMagenta
Write-Host "1. Reveal the forbidden knowledge of the system."
Write-Host "2. Gaze into the abyss of the current date and time."
Write-Host "3. Escape... or try to."
$choice = Read-Host "Enter your choice (1, 2, or 3)"
switch ($choice) {
1 { Write-Host "The system groans in pain, revealing its secrets..." -ForegroundColor Black; Get-ComputerInfo }
2 { Write-Host "The current date and time: $(Get-Date). Time is but a fleeting illusion." -ForegroundColor DarkCyan }
3 { Write-Host "You seek to escape, but can you ever truly escape your fate?" -ForegroundColor DarkRed; exit }
default { Write-Host "Your choices are meaningless in the face of the void." -ForegroundColor DarkRed }
}
$timeout = 5
Write-Host "You have $timeout seconds to prove your resolve and enter your name:"
$startTime = Get-Date
do {
$elapsedTime = (Get-Date) - $startTime
if ($elapsedTime.TotalSeconds -gt $timeout) { Write-Host "Time is up. The moment has passed." -ForegroundColor DarkRed; exit }
$name = Read-Host "Enter your name, before the darkness claims it."
} while (-not $name)
Write-Host "Ah, $name... You have managed to survive, for now." -ForegroundColor DarkRed
Write-Host "Choose an option, if you dare..." -ForegroundColor DarkGray
Write-Host "1. Hear a joke... if you can still laugh."
Write-Host "2. Gaze upon the endless void of time."
Write-Host "3. Exit the demo... or do you even want to?"
$choice = Read-Host "Enter the number of your choice (1, 2, or 3)"
switch ($choice) {
1 { Write-Host "Why don't skeletons fight each other? They lack the courage... and the flesh." -ForegroundColor DarkGray }
2 { Write-Host "Today’s date is: $(Get-Date). A fleeting moment in an infinite abyss." -ForegroundColor DarkCyan }
3 { Write-Host "The demo ends. But the darkness remains. Always." -ForegroundColor Black; exit }
default { Write-Host "You failed to choose. The darkness closes in." -ForegroundColor DarkRed; exit }
}
$answer = Read-Host "Do you wish to continue in this twisted game? (yes/no)"
if ($answer -eq "yes") { Write-Host "The game continues. The abyss watches." -ForegroundColor DarkGray }
elseif ($answer -eq "no") { Write-Host "You retreat into the shadows... for now." -ForegroundColor DarkRed }
else { Write-Host "Indecision is the greatest punishment. The demo ends now." -ForegroundColor Black }
Write-Host "The demo has come to an end... or has it?" -ForegroundColor DarkRed
The text was updated successfully, but these errors were encountered:
it would fix this one too #657
let the people adapt their script to fix the premade option rather than having to redo the whole rmm scripting stuff everytime someone needs something
Is your feature request related to a problem? Please describe.
Any scripts that "manage" (list/add/remove) something does not fit in TRMM at the moment and require some mental gymnastics to make it work
When running scripts, it is complicated to have scripts with multiple options and or choices to help setting variables for the run
And set "profiles" inside scripts with multiple choices already pre-made
Describe the solution you'd like
When running a script if the script is set as "interactive" open a terminal to interact with the remote script currently running.
once the script is over or timeout add the whole terminal interaction to the history
this would also allow people to also integrate compiled binaries to scripts that require user interaction by calling them (i was thinking about win-acme for exemple or any other cli tool)
these would obviously not be allowed to be used in policy/tasks/checks as they by nature require user inputs
Describe alternatives you've considered
lots of work and annoying things
Additional context
Here an extreme exemple of what could be run in this feature:
The text was updated successfully, but these errors were encountered: