Compare commits
4 Commits
f07fe51193
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f761ff2ed6 | |||
| 97d42da9a2 | |||
| 7d35ac2b37 | |||
| fdfca14fb3 |
45
FormConfiguration.Designer.cs
generated
45
FormConfiguration.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace SSH_Test
|
||||
namespace FHT
|
||||
{
|
||||
partial class FormConfiguration
|
||||
{
|
||||
@@ -41,14 +41,17 @@
|
||||
this.label5 = new System.Windows.Forms.Label();
|
||||
this.textBoxTftpIP = new System.Windows.Forms.TextBox();
|
||||
this.groupBox3 = new System.Windows.Forms.GroupBox();
|
||||
this.groupBox5 = new System.Windows.Forms.GroupBox();
|
||||
this.buttonProfilePath = new System.Windows.Forms.Button();
|
||||
this.groupBox4 = new System.Windows.Forms.GroupBox();
|
||||
this.buttonTasklistDec = new System.Windows.Forms.Button();
|
||||
this.buttonTasklistEnc = new System.Windows.Forms.Button();
|
||||
this.buttonEncryptTaskList = new System.Windows.Forms.Button();
|
||||
this.openFileDialogTasklist = new System.Windows.Forms.OpenFileDialog();
|
||||
this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.groupBox2.SuspendLayout();
|
||||
this.groupBox3.SuspendLayout();
|
||||
this.groupBox5.SuspendLayout();
|
||||
this.groupBox4.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -154,6 +157,7 @@
|
||||
//
|
||||
// groupBox3
|
||||
//
|
||||
this.groupBox3.Controls.Add(this.groupBox5);
|
||||
this.groupBox3.Controls.Add(this.groupBox4);
|
||||
this.groupBox3.Controls.Add(this.buttonEncryptTaskList);
|
||||
this.groupBox3.Location = new System.Drawing.Point(307, 12);
|
||||
@@ -161,7 +165,27 @@
|
||||
this.groupBox3.Size = new System.Drawing.Size(240, 177);
|
||||
this.groupBox3.TabIndex = 6;
|
||||
this.groupBox3.TabStop = false;
|
||||
this.groupBox3.Text = "Encryption";
|
||||
this.groupBox3.Text = "Profile && Encryption";
|
||||
//
|
||||
// groupBox5
|
||||
//
|
||||
this.groupBox5.Controls.Add(this.buttonProfilePath);
|
||||
this.groupBox5.Location = new System.Drawing.Point(8, 87);
|
||||
this.groupBox5.Name = "groupBox5";
|
||||
this.groupBox5.Size = new System.Drawing.Size(200, 54);
|
||||
this.groupBox5.TabIndex = 10;
|
||||
this.groupBox5.TabStop = false;
|
||||
this.groupBox5.Text = "Profile Path";
|
||||
//
|
||||
// buttonProfilePath
|
||||
//
|
||||
this.buttonProfilePath.Location = new System.Drawing.Point(15, 18);
|
||||
this.buttonProfilePath.Name = "buttonProfilePath";
|
||||
this.buttonProfilePath.Size = new System.Drawing.Size(163, 29);
|
||||
this.buttonProfilePath.TabIndex = 9;
|
||||
this.buttonProfilePath.Text = "profile.json";
|
||||
this.buttonProfilePath.UseVisualStyleBackColor = true;
|
||||
this.buttonProfilePath.Click += new System.EventHandler(this.buttonProfilePath_Click);
|
||||
//
|
||||
// groupBox4
|
||||
//
|
||||
@@ -203,12 +227,12 @@
|
||||
this.buttonEncryptTaskList.Text = "Encrypt";
|
||||
this.buttonEncryptTaskList.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// openFileDialogTasklist
|
||||
// openFileDialog
|
||||
//
|
||||
this.openFileDialogTasklist.DefaultExt = "json";
|
||||
this.openFileDialogTasklist.FileName = "tasklisk.json";
|
||||
this.openFileDialogTasklist.Filter = "json file|*.json|Powershell scrips|*.ps1";
|
||||
this.openFileDialogTasklist.Title = "Task list file";
|
||||
this.openFileDialog.DefaultExt = "json";
|
||||
this.openFileDialog.FileName = "*.json";
|
||||
this.openFileDialog.Filter = "json file|*.json|Powershell scrips|*.ps1";
|
||||
this.openFileDialog.Title = "File Path";
|
||||
//
|
||||
// FormConfiguration
|
||||
//
|
||||
@@ -228,6 +252,7 @@
|
||||
this.groupBox2.ResumeLayout(false);
|
||||
this.groupBox2.PerformLayout();
|
||||
this.groupBox3.ResumeLayout(false);
|
||||
this.groupBox5.ResumeLayout(false);
|
||||
this.groupBox4.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -251,6 +276,8 @@
|
||||
private System.Windows.Forms.GroupBox groupBox4;
|
||||
private System.Windows.Forms.Button buttonTasklistDec;
|
||||
private System.Windows.Forms.Button buttonTasklistEnc;
|
||||
private System.Windows.Forms.OpenFileDialog openFileDialogTasklist;
|
||||
private System.Windows.Forms.OpenFileDialog openFileDialog;
|
||||
private System.Windows.Forms.Button buttonProfilePath;
|
||||
private System.Windows.Forms.GroupBox groupBox5;
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
namespace SSH_Test
|
||||
namespace FHT
|
||||
{
|
||||
public partial class FormConfiguration : Form
|
||||
{
|
||||
@@ -29,15 +29,17 @@ namespace SSH_Test
|
||||
public static ILog log;
|
||||
|
||||
public FormConfiguration(string tftp_IP, string sftpIP, string sftp_Username, string sftp_Password, bool bencryption
|
||||
, Aes aaes, ILog Log)
|
||||
, Aes aaes, string sprofilepath, ILog Log)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.textBoxTftpIP.Text = Tftp_IP = tftp_IP;
|
||||
this.textBoxSftpIP.Text = Sftp_IP = sftpIP;
|
||||
this.textBoxSftpUsername.Text = Sftp_Username = sftp_Username;
|
||||
this.textBoxSftpPassword.Text = Sftp_Password = sftp_Password;
|
||||
buttonProfilePath.Text = sProfilePath = sprofilepath;
|
||||
aes = aaes;
|
||||
log = Log;
|
||||
|
||||
this.Update();
|
||||
|
||||
}
|
||||
@@ -66,10 +68,15 @@ namespace SSH_Test
|
||||
private void buttonTasklistEnc_Click(object sender, EventArgs e)
|
||||
{
|
||||
Utilities utilities = new Utilities(log);
|
||||
if (openFileDialogTasklist.ShowDialog() == DialogResult.OK)
|
||||
//Enable selecting multiple files
|
||||
openFileDialog.Multiselect = true;
|
||||
|
||||
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string[] Jsonfilenames = openFileDialog.FileNames;
|
||||
foreach (string Jsonfilename in Jsonfilenames)
|
||||
{
|
||||
string Jsonfilename = openFileDialogTasklist.FileName;
|
||||
string buttonTasklistPath = openFileDialogTasklist.SafeFileName;
|
||||
if (File.Exists(Jsonfilename))
|
||||
{
|
||||
try
|
||||
@@ -90,19 +97,24 @@ namespace SSH_Test
|
||||
log.Error(string.Format("Could not load {0} for encrypting", Jsonfilename));
|
||||
log.Error(ex);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
//disable multiselect
|
||||
openFileDialog.Multiselect = false;
|
||||
}
|
||||
|
||||
private void buttonTasklistDec_Click(object sender, EventArgs e)
|
||||
{
|
||||
Utilities utilities = new Utilities(log);
|
||||
if (openFileDialogTasklist.ShowDialog() == DialogResult.OK)
|
||||
//Enable selecting multiple files
|
||||
openFileDialog.Multiselect = true;
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string[] Jsonfilenames = openFileDialog.FileNames;
|
||||
foreach (string JsonFileName in Jsonfilenames)
|
||||
{
|
||||
string JsonFileName = openFileDialogTasklist.FileName;
|
||||
string buttonTasklistPath = openFileDialogTasklist.SafeFileName;
|
||||
if (File.Exists(JsonFileName))
|
||||
{
|
||||
try
|
||||
@@ -127,4 +139,14 @@ namespace SSH_Test
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonProfilePath_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
sProfilePath = openFileDialog.FileName;
|
||||
buttonProfilePath.Text = openFileDialog.SafeFileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="openFileDialogTasklist.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<metadata name="openFileDialog.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{73DED4CD-B2B1-491E-87B7-BC1F11759C53}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>SSH_Test</RootNamespace>
|
||||
<AssemblyName>SSH_Test</AssemblyName>
|
||||
<RootNamespace>FHT</RootNamespace>
|
||||
<AssemblyName>FHT</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
@@ -86,8 +86,8 @@
|
||||
<Reference Include="BouncyCastle.Cryptography, Version=2.0.0.0, Culture=neutral, PublicKeyToken=072edcf4a5328938, processorArchitecture=MSIL">
|
||||
<HintPath>packages\BouncyCastle.Cryptography.2.6.2\lib\net461\BouncyCastle.Cryptography.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="log4net, Version=3.2.0.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>packages\log4net.3.2.0\lib\net462\log4net.dll</HintPath>
|
||||
<Reference Include="log4net, Version=3.3.1.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
|
||||
<HintPath>packages\log4net.3.3.1\lib\net462\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=10.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Microsoft.Bcl.AsyncInterfaces.10.0.2\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
@@ -135,6 +135,7 @@
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.4.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>packages\System.Threading.Tasks.Extensions.4.6.3\lib\net462\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
|
||||
162
TastList.cs
162
TastList.cs
@@ -27,14 +27,14 @@ using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
|
||||
|
||||
namespace SSH_Test
|
||||
namespace FHT
|
||||
{
|
||||
|
||||
|
||||
public partial class TastList : Form
|
||||
{
|
||||
// set to false to enable Encrypt , Decrypt Buttons
|
||||
public const bool IsAdminDisabled = true;
|
||||
public const bool IsAdminDisabled = false;
|
||||
|
||||
|
||||
public List<cTask> Tasks = new List<cTask>();
|
||||
@@ -133,27 +133,41 @@ namespace SSH_Test
|
||||
dataGridViewTask.AllowDrop = true;
|
||||
dataGridViewTask.ClipboardCopyMode = DataGridViewClipboardCopyMode.EnableWithoutHeaderText;
|
||||
dataGridViewTask.RowTemplate.ContextMenuStrip = contextMenuStripRow;
|
||||
//Load Profile list from "profile.json"
|
||||
Profiles = utilities.LoadProfile("profile.json", aes);
|
||||
|
||||
// Configure Profile list to dropdown menu
|
||||
// AES button will update the dropdown menu when AES key is inputed.
|
||||
//try
|
||||
//{
|
||||
// foreach (Profile p in Profiles)
|
||||
// {
|
||||
// log.Info(string.Format("Profile: {0}", p.ProfileName));
|
||||
// }
|
||||
//ask for AES key
|
||||
buttonAESString_Click(null, null);
|
||||
|
||||
// var comboBoxColumn = (DataGridViewComboBoxColumn)dataGridViewTask.Columns[7];
|
||||
// comboBoxColumn.DataSource = Profiles; // Set the data source of the ComboBox column
|
||||
// comboBoxColumn.DisplayMember = "profileName"; // Displayed property name
|
||||
// comboBoxColumn.ValueMember = "profileName"; //The property name of the value
|
||||
//}
|
||||
//catch (Exception ex)
|
||||
//{
|
||||
// log.Error(ex.Message);
|
||||
//}
|
||||
//Load Profile list from "Profilefilename"
|
||||
Profiles = utilities.LoadProfile(Profilefilename, aes);
|
||||
|
||||
if (!Profiles.Any())
|
||||
{
|
||||
//load "do nothing" to Profiles
|
||||
Profile temp = new Profile();
|
||||
temp.ProfileType = "";
|
||||
temp.ProfileName = "Do nothing";
|
||||
temp.ProfileCommands = new string[] { "echo Do nothing" };
|
||||
temp.ProfileParameters = new string[] { "" };
|
||||
|
||||
Profiles.Add(temp);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
foreach (Profile p in Profiles)
|
||||
{
|
||||
log.Info(string.Format("Profile: {0}", p.ProfileName));
|
||||
}
|
||||
|
||||
var comboBoxColumn = (DataGridViewComboBoxColumn)dataGridViewTask.Columns[7];
|
||||
comboBoxColumn.DataSource = Profiles; // Set the data source of the ComboBox column
|
||||
comboBoxColumn.DisplayMember = "profileName"; // Displayed property name
|
||||
comboBoxColumn.ValueMember = "profileName"; //The property name of the value
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error(ex.Message);
|
||||
}
|
||||
|
||||
dataGridViewTask.Refresh();
|
||||
|
||||
@@ -316,10 +330,12 @@ namespace SSH_Test
|
||||
row.Cells[1].Value = task.sTaskDescription;
|
||||
row.Cells[2].Value = task.sTaskDevice;
|
||||
row.Cells[4].Value = task.bTaskSelect;
|
||||
var comboBoxColumn = (DataGridViewComboBoxColumn)dataGridViewTask.Columns[7];
|
||||
// var comboBoxColumn = (DataGridViewComboBoxColumn)dataGridViewTask.Columns[7];
|
||||
// test if task.sprofile name mach any in Profiles, if true, assign that name
|
||||
if (Profiles.Any(pr => pr.ProfileName == task.sProfile))
|
||||
row.Cells[7].Value = task.sProfile;
|
||||
else
|
||||
row.Cells[7].Value = null;
|
||||
dataGridViewTask.Rows.Add(row);
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -335,18 +351,63 @@ namespace SSH_Test
|
||||
{
|
||||
FormConfiguration formConfiguration = new FormConfiguration(conInfo.sTftpIP, conInfo.sSftpIP,
|
||||
conInfo.sSftpUsername, conInfo.sSftpPassword,
|
||||
bEncryption, aes, log);
|
||||
bEncryption, aes, Profilefilename,log);
|
||||
// Disable Encrypt, Decrypt buttons
|
||||
if(IsAdminDisabled)
|
||||
{
|
||||
formConfiguration.AdminDisable();
|
||||
}
|
||||
formConfiguration.ShowDialog();
|
||||
//reload profile and task list
|
||||
Profilefilename = formConfiguration.sProfilePath;
|
||||
//try reloading Profilefilename
|
||||
Profiles.Clear();
|
||||
Profiles = utilities.LoadProfile(Profilefilename, aes);
|
||||
|
||||
// Configure Profile list to dropdown menu, first to check if profiles is empty
|
||||
if (!Profiles.Any())
|
||||
{
|
||||
//load "do nothing" to Profiles
|
||||
Profile temp = new Profile();
|
||||
temp.ProfileType = "";
|
||||
temp.ProfileName = "Do nothing";
|
||||
temp.ProfileCommands = new string[] { "echo Do nothing" };
|
||||
temp.ProfileParameters = new string[] { "" };
|
||||
|
||||
Profiles.Add(temp);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
foreach (Profile p in Profiles)
|
||||
{
|
||||
log.Info(string.Format("Profile: {0}", p.ProfileName));
|
||||
}
|
||||
|
||||
var comboBoxColumn = (DataGridViewComboBoxColumn)dataGridViewTask.Columns[7];
|
||||
comboBoxColumn.DataSource = Profiles; // Set the data source of the ComboBox column
|
||||
comboBoxColumn.DisplayMember = "profileName"; // Displayed property name
|
||||
comboBoxColumn.ValueMember = "profileName"; //The property name of the value
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error(ex.Message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//reload tasklist
|
||||
|
||||
buttonLoad_Click(null, null);
|
||||
|
||||
conInfo.sTftpIP = formConfiguration.Tftp_IP;
|
||||
conInfo.sSftpIP = formConfiguration.Sftp_IP;
|
||||
conInfo.sSftpUsername = formConfiguration.Sftp_Username;
|
||||
conInfo.sSftpPassword = formConfiguration.Sftp_Password;
|
||||
|
||||
dataGridViewTask.Refresh();
|
||||
|
||||
}
|
||||
|
||||
private void dataGridViewTask_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
@@ -451,24 +512,13 @@ namespace SSH_Test
|
||||
{
|
||||
profile = Profiles.Find(x => x.ProfileName == currentTask.sProfile.ToString());
|
||||
|
||||
|
||||
if (profile !=null && profile.ProfileName != "Do nothing")
|
||||
{
|
||||
// print out task
|
||||
log.Info(string.Format("Current task profile {0}:", currentTask.sTaskDevice.ToString()));
|
||||
|
||||
foreach (string c in profile.ProfileCommands)
|
||||
log.Info(c);
|
||||
|
||||
//hostInfo.Commands = profile.ProfileCommands;
|
||||
|
||||
|
||||
//check if task has parameters and get parameters list
|
||||
//foreach (string c in profile.ProfileParameters)
|
||||
//{
|
||||
// if (currentTask.dParameters[c] == "")
|
||||
// currentTask.dParameters.Add(c, "");
|
||||
|
||||
//}
|
||||
|
||||
if (profile.ProfileParameters.Length > 0)
|
||||
{
|
||||
//Get Values for Parameters
|
||||
@@ -489,13 +539,17 @@ namespace SSH_Test
|
||||
|
||||
// Run a Task and display result on the textbox
|
||||
|
||||
richTextBoxOutput.AppendText(Utilities.RunaTask(currentTask, profile, conInfo,aes));
|
||||
richTextBoxOutput.AppendText(Utilities.RunaTask(currentTask, profile, conInfo, aes));
|
||||
richTextBoxOutput.SelectionStart = richTextBoxOutput.Text.Length;
|
||||
richTextBoxOutput.ScrollToCaret();
|
||||
//update Status LastRun
|
||||
string ttt = DateTime.Now.ToString(("HH:mm:ss"));
|
||||
dataGridViewTask.Rows[e.RowIndex].Cells[6].Value = ttt;
|
||||
}
|
||||
else
|
||||
log.Info("Profile = Null");
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
log.Error("Can not load profile or Profile is empty");
|
||||
@@ -547,7 +601,12 @@ namespace SSH_Test
|
||||
|
||||
break;
|
||||
case 1:
|
||||
if (dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value == null)
|
||||
{
|
||||
dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = "";
|
||||
}
|
||||
Tasks[e.RowIndex].sTaskDescription = (string)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
|
||||
|
||||
break;
|
||||
case 2:
|
||||
Tasks[e.RowIndex].sTaskDevice = (string)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
|
||||
@@ -556,6 +615,7 @@ namespace SSH_Test
|
||||
|
||||
break;
|
||||
case 4:
|
||||
if ((string)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null)
|
||||
Tasks[e.RowIndex].bTaskSelect = (bool)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
|
||||
break;
|
||||
case 5:
|
||||
@@ -567,9 +627,10 @@ namespace SSH_Test
|
||||
Tasks[e.RowIndex].sProfile = (string)dataGridViewTask.Rows[e.RowIndex].Cells[e.ColumnIndex].Value;
|
||||
else
|
||||
Tasks[e.RowIndex].sProfile = "Do nothing";
|
||||
|
||||
if (!Profiles.Any())
|
||||
{
|
||||
profile = Profiles.Find(x => x.ProfileName == Tasks[e.RowIndex].sProfile.ToString());
|
||||
if ( (profile != null) && (profile.ProfileParameters.Length > 0))
|
||||
if ((profile != null) && (profile.ProfileParameters.Length > 0))
|
||||
{
|
||||
//clear task profile parameters first
|
||||
Tasks[e.RowIndex].dParameters.Clear();
|
||||
@@ -579,6 +640,8 @@ namespace SSH_Test
|
||||
Tasks[e.RowIndex].dParameters.Add(c, "");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
log.Info(string.Format("Task {0}, profile {1}", e.RowIndex, Tasks[e.RowIndex].sProfile));
|
||||
|
||||
@@ -753,10 +816,22 @@ namespace SSH_Test
|
||||
{
|
||||
aes.Key = Convert.FromBase64String(formParameter.dParameters["AES string"]);
|
||||
|
||||
//try reloading profile.json
|
||||
//try reloading Profilefilename
|
||||
Profiles.Clear();
|
||||
Profiles = utilities.LoadProfile("profile.json", aes);
|
||||
// Configure Profile list to dropdown menu
|
||||
Profiles = utilities.LoadProfile(Profilefilename, aes);
|
||||
// Configure Profile list to dropdown menu, first to check if Profiles is empty
|
||||
if (!Profiles.Any())
|
||||
{
|
||||
//load "do nothing" to Profiles
|
||||
Profile temp = new Profile();
|
||||
temp.ProfileType = "";
|
||||
temp.ProfileName = "Do nothing";
|
||||
temp.ProfileCommands = new string[] { "echo Do nothing" };
|
||||
temp.ProfileParameters = new string[]{ "" };
|
||||
|
||||
Profiles.Add(temp);
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
foreach (Profile p in Profiles)
|
||||
@@ -782,6 +857,9 @@ namespace SSH_Test
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//reload tasklist
|
||||
buttonLoad_Click(null, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
REG ADD "HKEY_CURRENT_USER\Control Panel\Desktop" /v ScreenSaveActive /t REG_SZ /d 1 /f
|
||||
REG ADD "HKCU\Control Panel\Desktop" /v SCRNSAVE.EXE /t REG_SZ /d "C:\WINDOWS\system32\sstext3d.scr" /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Screensavers\ssText3d" /v DisplayString /t REG_SZ /d "Unified Systems Inc." /f
|
||||
@@ -0,0 +1,38 @@
|
||||
#Add exclusions
|
||||
Add-MpPreference -ExclusionProcess "C:\Program Files\Avigilon\Avigilon Control Center Server\VmsAdminPanel.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Server\VmsAdminPanel.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Server\VmsAdminPanelLauncher.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Server\VmsDaemonService.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Daemon\VmsDaemon.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Core\VmsCore.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Server\VmsUpgraderApp.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Server\LPR6\LprDaemonApp.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Device Management\VmsDeviceManagement.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Analytics Add-on\AnalyticsDaemonService.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Client\VmsClientApp.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Client Framework\AvigilonUnityClientFramework.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Web Endpoint\WebEndpointService.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Web Endpoint\node.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity API Gateway\VmsApiGateway.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Cloud Bridge\VmsCloudBridge.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Orchestrator Service\VmsOrchestratorService.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Virtual Matrix\VmsVirtualMatrixApp.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Software Manager\Service\VmsLocalUpdaterService.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Player\VmsPlayerApp.exe",
|
||||
"C:\Program Files (x86)\Avigilon\Avigilon Unity Player\VmsPlayerApp.exe"
|
||||
Add-MpPreference -ExclusionExtension ".avd"
|
||||
Add-MpPreference -ExclusionPath "$Env:programdata\Avigilon",
|
||||
"$Env:appdata\Avigilon",
|
||||
"$Env:localappdata\Avigilon",
|
||||
"C:\Program Files\Avigilon",
|
||||
"D:\AvigilonData",
|
||||
"E:\AvigilonData",
|
||||
"D:\AvigilonConfig",
|
||||
"C:\AvigilonConfig"
|
||||
|
||||
#Check what is already excluded
|
||||
Get-MpPreference | Select-Object -Property ExclusionExtension -ExpandProperty ExclusionExtension
|
||||
Get-MpPreference| Select-Object -Property ExclusionPath | Format-table -wrap
|
||||
Get-MpPreference | Select-Object -Property ExclusionProcess | Format-list
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Select-String -Path "C:\ProgramData\Avigilon\Avigilon Unity Core\Logs\VmsCore.clef" -Pattern "Acc.ServerName" -List
|
||||
33
Unencrypted PS and Json files/20260515/PS/Firewall Rule.ps1
Normal file
33
Unencrypted PS and Json files/20260515/PS/Firewall Rule.ps1
Normal file
@@ -0,0 +1,33 @@
|
||||
# Create incoming rule for Ping
|
||||
New-NetFirewallRule -DisplayName "Ping" -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -Action Allow
|
||||
|
||||
# Create incoming rule for CIW on Total Care PC
|
||||
New-NetFirewallRule -DisplayName "CIW Syslog" `
|
||||
-Direction Inbound `
|
||||
-Protocol UDP `
|
||||
-LocalPort 514 `
|
||||
-Action Allow `
|
||||
-Profile Private
|
||||
New-NetFirewallRule -DisplayName "CIW Email" `
|
||||
-Direction Inbound `
|
||||
-Protocol TCP `
|
||||
-LocalPort 25 `
|
||||
-Action Allow `
|
||||
-Profile Private
|
||||
|
||||
# Create outgoing rule for CIW on NVRs
|
||||
New-NetFirewallRule -DisplayName "CIW Email" `
|
||||
-Direction Outbound `
|
||||
-Protocol TCP `
|
||||
-LocalPort 25 `
|
||||
-RemotePort 25 `
|
||||
-Action Allow `
|
||||
-Profile Private,Public
|
||||
New-NetFirewallRule -DisplayName "CIW Syslog" `
|
||||
-Direction Outbound `
|
||||
-Protocol UDP `
|
||||
-LocalPort 514 `
|
||||
-RemotePort 514 `
|
||||
-Action Allow `
|
||||
-Profile Private,Public
|
||||
|
||||
62
Unencrypted PS and Json files/20260515/PS/Folder Options.ps1
Normal file
62
Unencrypted PS and Json files/20260515/PS/Folder Options.ps1
Normal file
@@ -0,0 +1,62 @@
|
||||
# Show favorites in navigation pane
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'NavPaneShowFavorites' -Value 1
|
||||
|
||||
# Show all folders in navigation pane
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'NavPaneShowAllFolders' -Value 1
|
||||
|
||||
# Automatically expand to current folder
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'NavPaneExpandToCurrentFolder' -Value 1
|
||||
|
||||
# Show libraries in navigation pane
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'NavPaneShowLibraries' -Value 1
|
||||
|
||||
# Always show menus
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'AlwaysShowMenus' -Value 1
|
||||
|
||||
# Display file icon on thumbnails
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'IconsOnly' -Value 0
|
||||
|
||||
# Display file size information in folder tips
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'FolderContentsInfoTip' -Value 1
|
||||
|
||||
# Show hidden files and folders
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'Hidden' -Value 1
|
||||
|
||||
# Unhide empty drives
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideDrivesWithNoMedia' -Value 0
|
||||
|
||||
# Uncheck "Hide extensions for known file types"
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideFileExt' -Value 0
|
||||
|
||||
# Uncheck "Hide folder merge conflicts"
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideFolderMergeConflicts' -Value 0
|
||||
|
||||
# Hide protected operating system files
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ShowSuperHidden' -Value 0
|
||||
|
||||
# Restore previous folder windows at logon
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'PersistBrowsers' -Value 1
|
||||
|
||||
# Show drive letters
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ShowDriveLetters' -Value 1
|
||||
|
||||
# Show encrypted or compressed NTFS files in color
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ShowEncryptedCompressedColor' -Value 1
|
||||
|
||||
# Show pop-up description for folders and desktop items
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ShowInfoTip' -Value 1
|
||||
|
||||
# Show previous handlers in preview pane
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ShowPreviewHandlers' -Value 1
|
||||
|
||||
# Show status bar
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'StatusBar' -Value 1
|
||||
|
||||
# Apply the changes by restarting File Explorer
|
||||
Stop-Process -Name explorer -Force
|
||||
Start-Process explorer
|
||||
|
||||
# Apply settings to all folders (This usually requires user action; automate if necessary)
|
||||
$wshell = New-Object -ComObject wscript.shell
|
||||
$wshell.SendKeys('%(ve)') # Opens Folder Options -> View
|
||||
$wshell.SendKeys('{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}') # Select "Apply to Folders" and Confirm
|
||||
@@ -0,0 +1,8 @@
|
||||
$adapters = Get-NetAdapter -Physical | Get-NetAdapterPowerManagement
|
||||
foreach ($adapter in $adapters)
|
||||
{
|
||||
$adapter.WakeOnMagicPacket = 'Enabled'
|
||||
$adapter.WakeOnPattern = 'Enabled'
|
||||
$adapter.AllowComputerToTurnOffDevice = 'Disabled'
|
||||
$adapter | Set-NetAdapterPowerManagement
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
# Set computer to never sleep
|
||||
powercfg /change standby-timeout-ac 0
|
||||
|
||||
# Set monitor to never turn off
|
||||
powercfg /change monitor-timeout-ac 0
|
||||
|
||||
# Set hard drives to never turn off
|
||||
powercfg /change disk-timeout-ac 0
|
||||
@@ -0,0 +1,9 @@
|
||||
# Enable Remote Desktop
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0
|
||||
|
||||
# Enable Remote Desktop through Windows Firewall
|
||||
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
|
||||
|
||||
# Allow "Everyone" group to connect
|
||||
$rdpAccessGroup = "Remote Desktop Users"
|
||||
Add-LocalGroupMember -Group $rdpAccessGroup -Member "Everyone"
|
||||
@@ -0,0 +1,49 @@
|
||||
# Import the Update Session COM object
|
||||
$updateSession = New-Object -ComObject Microsoft.Update.Session
|
||||
|
||||
# Create an update searcher object
|
||||
$updateSearcher = $updateSession.CreateUpdateSearcher()
|
||||
|
||||
# Search for available updates
|
||||
$searchResult = $updateSearcher.Search("IsInstalled=0")
|
||||
|
||||
# Check if updates are available
|
||||
if ($searchResult.Updates.Count -gt 0) {
|
||||
Write-Output "$($searchResult.Updates.Count) updates found. Installing..."
|
||||
|
||||
# Create an update downloader object
|
||||
$updateDownloader = $updateSession.CreateUpdateDownloader()
|
||||
$updateDownloader.Updates = $searchResult.Updates
|
||||
|
||||
# Download updates
|
||||
$downloadResult = $updateDownloader.Download()
|
||||
|
||||
if ($downloadResult.ResultCode -eq 2) {
|
||||
Write-Output "Updates downloaded successfully."
|
||||
|
||||
# Create an update installer object
|
||||
$updateInstaller = $updateSession.CreateUpdateInstaller()
|
||||
$updateInstaller.Updates = $searchResult.Updates
|
||||
|
||||
# Install updates
|
||||
$installResult = $updateInstaller.Install()
|
||||
|
||||
if ($installResult.ResultCode -eq 2) {
|
||||
Write-Output "Updates installed successfully."
|
||||
|
||||
# Check if a restart is required
|
||||
if ($installResult.RebootRequired) {
|
||||
Write-Output "Restart is required. Restarting the computer..."
|
||||
Restart-Computer -Force
|
||||
} else {
|
||||
Write-Output "No restart is required."
|
||||
}
|
||||
} else {
|
||||
Write-Error "Failed to install updates. Result code: $($installResult.ResultCode)"
|
||||
}
|
||||
} else {
|
||||
Write-Error "Failed to download updates. Result code: $($downloadResult.ResultCode)"
|
||||
}
|
||||
} else {
|
||||
Write-Output "No updates are available."
|
||||
}
|
||||
520
Unencrypted PS and Json files/20260515/profile.json
Normal file
520
Unencrypted PS and Json files/20260515/profile.json
Normal file
@@ -0,0 +1,520 @@
|
||||
[
|
||||
{
|
||||
"ProfileName": "Do nothing",
|
||||
"ProfileType": "",
|
||||
"ProfileCommands": [
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{P00}",
|
||||
"{P01}",
|
||||
"{P02}",
|
||||
"{P03}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ProfileName": "Test",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"command 1 {P00} {P01} {P02}",
|
||||
"command 2 {P00} {P01}",
|
||||
"command 3 {P00} {P03}"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{P00}",
|
||||
"{P01}",
|
||||
"{P02}",
|
||||
"{P03}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ProfileName": "Change Hostname",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"Rename-Computer -NewName {New Host Name} -Force -PassThru",
|
||||
"hostname"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{New Host Name}"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Show_NetworkInterfaces",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"netsh interface show interface"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Assign_IPv4Address",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"netsh interface ipv4 set address name=\"{Name of Interface}\" source=static addr={IP Address} mask={Net mask} gateway={Gateway}",
|
||||
"netsh interface set interface \"{Name of Interface}\" admin=disable",
|
||||
"netsh interface set interface \"{Name of Interface}\" admin=enable",
|
||||
"netsh interface ipv4 show config name=\"{Name of Interface}\" "
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{Name of Interface}",
|
||||
"{IP Address}",
|
||||
"{Net mask}",
|
||||
"{Gateway}"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "Powershell_Assign_IPv4Address",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"New-NetIPAddress -InterfaceAlias \"{Name of Interface}\" -IPAddress {IP Address} -PrefixLength {PrefixLength} -DefaultGateway {Gateway}",
|
||||
"Get-NetIPAddress -InterfaceAlias \"{Name of Interface}\""
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{Name of Interface}",
|
||||
"{IP Address}",
|
||||
"{PrefixLength}",
|
||||
"{Gateway}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ProfileName": "SSH_Cisco_Tftp_Running",
|
||||
"ProfileType": "SSH",
|
||||
"ProfileCommands": [
|
||||
"copy run tftp://"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{IP Address}",
|
||||
"{User Name}",
|
||||
"{Password}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ProfileName": "SSH_Cisco_Catalyst_Tftp_Running",
|
||||
"ProfileType": "SSH_Catalyst",
|
||||
"ProfileCommands": [
|
||||
"copy running-config tftp://"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{IP Address}",
|
||||
"{User Name}",
|
||||
"{Password}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ProfileName": "SSH_Cisco_Tftp_Startup",
|
||||
"ProfileType": "SSH",
|
||||
"ProfileCommands": [
|
||||
"copy startup-config tftp://"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{IP Address}",
|
||||
"{User Name}",
|
||||
"{Password}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ProfileName": "SSH_Cisco_Catalyst_Tftp_Startup",
|
||||
"ProfileType": "SSH_Catalyst",
|
||||
"ProfileCommands": [
|
||||
"copy startup-config tftp://"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{IP Address}",
|
||||
"{User Name}",
|
||||
"{Password}"
|
||||
]
|
||||
},
|
||||
{
|
||||
"ProfileName": "RAC9_PS_status_dual",
|
||||
"ProfileType": "RAC9",
|
||||
"ProfileCommands": [
|
||||
"get system.power.supply.1",
|
||||
"get system.power.supply.2"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "RAC9_storage_pdisks",
|
||||
"ProfileType": "RAC9",
|
||||
"ProfileCommands": [
|
||||
"storage get get pdisks -o"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "RAC9_networkinterfaces",
|
||||
"ProfileType": "RAC9",
|
||||
"ProfileCommands": [
|
||||
"gethostnetworkinterfaces"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "CMD_OS_name",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"systeminfo | findstr /B /C:\"OS Name\" /B /C:\"OS Version\""
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "CMD_Windows_Activation_status",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"cscript c:\\Windows\\System32\\slmgr.vbs /dlv"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "CMD_Windows_Enable_RemoteDesktop",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"REG ADD \"HKLM\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\" /v fDenyTSConnections /t REG_DWORD /d 0 /f",
|
||||
"netsh advfirewall firewall add rule name=\"Remote Desktop (TCP-In)\" dir=in action=allow protocol=TCP localport=3389",
|
||||
"net start TermService"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Avigilon_Version",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"Get-WmiObject -Class Win32_Product | where vendor -eq Avigilon | select Name, Version"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "Powershell_VideoController",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"Get-CimInstance -ClassName Win32_VideoController"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "Powershell_Avigilon_Servername",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"-File \"Avigilon_Servername.ps1\""
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "Powershell_Get_NetworkInterface",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"Get-NetAdapter | Select-Object Name, MacAddress, InterfaceDescription| Sort-Object -Property Name"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "Powershell_NetworkInterface_Team_LACP_Dynamic",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"New-NetLbfoTeam -Name \"{Team Name}\" -TeamMembers \"{NIC1}\", \"{NIC2}\" -TeamingMode LACP -LoadBalancingAlgorithm Dynamic -Confirm:$false",
|
||||
"Set-NetAdapterAdvancedProperty -Name \"{NIC1}\" -DisplayName \"Speed & Duplex\" -DisplayValue \"10 Gbps Full Duplex\" ",
|
||||
"Set-NetAdapterAdvancedProperty -Name \"{NIC2}\" -DisplayName \"Speed & Duplex\" -DisplayValue \"10 Gbps Full Duplex\" ",
|
||||
"Set-NetAdapterAdvancedProperty -Name \"{NIC1}\" -DisplayName \"Energy-Efficient Ethernet\" -DisplayValue \"Disabled\" ",
|
||||
"Set-NetAdapterAdvancedProperty -Name \"{NIC2}\" -DisplayName \"Energy-Efficient Ethernet\" -DisplayValue \"Disabled\" ",
|
||||
"Get-NetAdapterAdvancedProperty -Name \"{NIC1}\" ",
|
||||
"Get-NetAdapterAdvancedProperty -Name \"{NIC2}\" ",
|
||||
"Get-NetAdapterAdvancedProperty -Name \"{Team Name}\" "
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{Team Name}",
|
||||
"{NIC1}",
|
||||
"{NIC2}"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "Powershell_ACC8 Antivirus Exclusions",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"-File \"ACC8 Antivirus Exclusions.ps1\""
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "Powershell_Firewall Rule",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"-File \"Firewall Rule.ps1\""
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "Powershell_Folder Options",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"-File \"Folder Options.ps1\""
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "Powershell_Power Options",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"-File \"Power Options.ps1\""
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "Powershell_Remote Desktop Enable",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"-File \"Remote Desktop Enable.ps1\""
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "Powershell_Windows Update Restart",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"-File \"Windows Update Restart.ps1\""
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Add_Local_Admin_User",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"Net user {Local Admin User 1} {Password 1} /add /Y",
|
||||
"net localgroup administrators {Local Admin User 1} /add ",
|
||||
"net localgroup administrators"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{Local Admin User 1}",
|
||||
"{Password 1}"
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Add_Local_2_Admin_Users",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"Net user {Local Admin User 1} {Password 1} /add /Y",
|
||||
"net localgroup administrators {Local Admin User 1} /add ",
|
||||
"Net user {Local Admin User 2} {Password 2} /add /Y",
|
||||
"net localgroup administrators {Local Admin User 2} /add ",
|
||||
"net localgroup administrators"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{Local Admin User 1}",
|
||||
"{Password 1}",
|
||||
"{Local Admin User 2}",
|
||||
"{Password 2}"
|
||||
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_ScreenSaver",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"cd C:\\USI\\Images\\ & C:\\USI\\Images\\bg.bat"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Install_FoxitReader",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"C:\\USI\\Apps\\FoxitPDFReader.exe /QUIET"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Install_TeamViewer.msi",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"C:\\USI\\Apps\\TeamViewer.msi /qn",
|
||||
"winget list --disable-interactivity --accept-source-agreements| FINDSTR /i \"TeamViewer\""
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_ShowAllSoftwareVersion",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
|
||||
"winget list --disable-interactivity --accept-source-agreements "
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Timezone_CanCentralStandardTime_6",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"tzutil /s \"Central Standard Time\"",
|
||||
"tzutil /g"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Meinberg ntp-4.2.8",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"C:\\USI\\Apps\\\"Meinberg ntp-4.2.8p15a-win32-setup.exe\" /USE_FILE=\"C:\\USI\\Apps\\MeinbergSetup.ini\"",
|
||||
"ntpd --version",
|
||||
"echo server {IP Address 1} iburst minpoll 6 maxpoll 7 >> C:\\\"Program Files (x86)\"\\NTP\\etc\\ntp.conf",
|
||||
"echo server {IP Address 2} iburst minpoll 6 maxpoll 7 >> C:\\\"Program Files (x86)\"\\NTP\\etc\\ntp.conf"
|
||||
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{IP Address 1}",
|
||||
"{IP Address 2}"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Ipv6_Disable_ALL",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"powershell \"Disable-NetAdapterBinding -Name \"*\" -ComponentID ms_tcpip6\"",
|
||||
"powershell \"Get-NetAdapterBinding -ComponentID ms_tcpip6| Sort-Object -Property Name\""
|
||||
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "CMD_Ipv6_Disable_Interface",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"powershell \"Disable-NetAdapterBinding -Name \"{Interface Name}\" -ComponentID ms_tcpip6\"",
|
||||
"powershell \"Get-NetAdapterBinding -ComponentID ms_tcpip6| Sort-Object -Property Name\""
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{Interface Name}"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "RAC9_IDRAC_Assign_IP_Network_Interface",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"racadm setniccfg -s {IP Address} {Network Mask} {Gateway}"
|
||||
],
|
||||
"ProfileParameters": [ "{IP Address}", "{Network Mask}", "{Gateway}" ]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "RAC9_IDRAC_Configure_User",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"racadm set iDRAC.Users.{Index}.Username {Username}",
|
||||
"racadm set iDRAC.Users.{Index}.Password {Password}",
|
||||
"racadm get iDRAC.Users.{Index}.Username",
|
||||
"racadm set iDRAC.Users.{Index}.Enable 1",
|
||||
"racadm set iDRAC.Users.{Index}.IpmiLanPriv 4"
|
||||
|
||||
],
|
||||
"ProfileParameters": [ "{Index}", "{Username}", "{Password}" ]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "RAC9_IDRAC_Configure_Users_at_234",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"racadm set iDRAC.Users.2.Password {Password 2 root}",
|
||||
"racadm set iDRAC.Users.3.Username {Username 3}",
|
||||
"racadm set iDRAC.Users.3.Password {Password 3}",
|
||||
"racadm set iDRAC.Users.4.Username {Username 4}",
|
||||
"racadm set iDRAC.Users.4.Password {Password 4}",
|
||||
"racadm get iDRAC.Users.2.Username",
|
||||
"racadm get iDRAC.Users.3.Username",
|
||||
"racadm get iDRAC.Users.4.Username",
|
||||
"racadm set iDRAC.Users.3.Enable 1",
|
||||
"racadm set iDRAC.Users.3.IpmiLanPriv 4",
|
||||
"racadm set iDRAC.Users.4.Enable 1",
|
||||
"racadm set iDRAC.Users.4.IpmiLanPriv 4"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{Password 2 root}",
|
||||
"{Username 3}",
|
||||
"{Password 3}",
|
||||
"{Username 4}",
|
||||
"{Password 4}"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "RAC9_IDRAC_Get_ServiceTag",
|
||||
"ProfileType": "CMD",
|
||||
"ProfileCommands": [
|
||||
"racadm getsvctag"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "RAC9_ACPwrRcvry_On",
|
||||
"ProfileType": "RAC9",
|
||||
"ProfileCommands": [
|
||||
"set bios.Syssecurity.ACPwrRcvry On"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "RAC9_Power_redundancy",
|
||||
"ProfileType": "RAC9",
|
||||
"ProfileCommands": [
|
||||
" get system.power.RedundancyPolicy"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "RAC9_storage_vdisks",
|
||||
"ProfileType": "RAC9",
|
||||
"ProfileCommands": [
|
||||
"storage get vdisks -o -p layout,status,size"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
|
||||
{
|
||||
"ProfileName": "RAC9_Commit_Changes_reboot_NOW",
|
||||
"ProfileType": "RAC9",
|
||||
"ProfileCommands": [
|
||||
"jobqueue create BIOS.Setup.1-1 -r pwrcycle -s TIME_NOW"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "RAC9_Jobview_checkresult",
|
||||
"ProfileType": "RAC9",
|
||||
"ProfileCommands": [
|
||||
"jobqueue view"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
},
|
||||
{
|
||||
"ProfileName": "RAC9_Reboot",
|
||||
"ProfileType": "RAC9",
|
||||
"ProfileCommands": [
|
||||
"serveraction hardreset"
|
||||
],
|
||||
"ProfileParameters": []
|
||||
}
|
||||
]
|
||||
310
Unencrypted PS and Json files/20260515/tasklist.json
Normal file
310
Unencrypted PS and Json files/20260515/tasklist.json
Normal file
@@ -0,0 +1,310 @@
|
||||
[
|
||||
{
|
||||
"iTaskNum": 1,
|
||||
"sTaskDescription": "Remote Desktop Enable",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "Powershell_Remote Desktop Enable",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 2,
|
||||
"sTaskDescription": "Bios enable Power on AC Recovery",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "RAC9_ACPwrRcvry_On",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 3,
|
||||
"sTaskDescription": "Change HostName",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "Change Hostname",
|
||||
"dParameters": {
|
||||
"{New Host Name}": "dfghdfhdfgh"
|
||||
}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 4,
|
||||
"sTaskDescription": "Create 2 Windows Admins",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Add_Local_2_Admin_Users",
|
||||
"dParameters": {
|
||||
"{Local Admin User 1}": "USI-Admin",
|
||||
"{Password 1}": "",
|
||||
"{Local Admin User 2}": "SIGA-Admin",
|
||||
"{Password 2}": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 5,
|
||||
"sTaskDescription": "Reboot by IDRAC",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "RAC9_Commit_Changes_reboot_NOW",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 6,
|
||||
"sTaskDescription": "Get Service Tag",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "RAC9_IDRAC_Get_ServiceTag",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 7,
|
||||
"sTaskDescription": "Server have 2nd power supply?",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "RAC9_PS_status_dual",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 8,
|
||||
"sTaskDescription": "10GB ports",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "RAC9_networkinterfaces",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 9,
|
||||
"sTaskDescription": "OS",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_OS_name",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 10,
|
||||
"sTaskDescription": "GPU",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "Powershell_VideoController",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 11,
|
||||
"sTaskDescription": "Power redundancy",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "RAC9_Power_redundancy",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 12,
|
||||
"sTaskDescription": "Raid volume check",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "RAC9_storage_vdisks",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 13,
|
||||
"sTaskDescription": "Windows Activation Status",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Windows_Activation_status",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 14,
|
||||
"sTaskDescription": "Avigilon Version",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Avigilon_Version",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 15,
|
||||
"sTaskDescription": "Get Network Interface Name",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "Powershell_Get_NetworkInterface",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 16,
|
||||
"sTaskDescription": "Create NIC team for Cameras",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "Powershell_NetworkInterface_Team_LACP_Dynamic",
|
||||
"dParameters": {
|
||||
"{Team Name}": "Camera Lan",
|
||||
"{NIC1}": "Integrated NIC 1 Port 1-1",
|
||||
"{NIC2}": "Integrated NIC 1 Port 2-1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 17,
|
||||
"sTaskDescription": "IDRAC Assigned IP address",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "RAC9_IDRAC_Assign_IP_Network_Interface",
|
||||
"dParameters": {
|
||||
"{IP Address}": "192.168.39.2",
|
||||
"{Network Mask}": "255.255.255.0",
|
||||
"{Gateway}": "192.168.39.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 18,
|
||||
"sTaskDescription": "IDRAC Set User Password root, 3,4",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "RAC9_IDRAC_Configure_Users_at_234",
|
||||
"dParameters": {
|
||||
"{Password 2 root}": "",
|
||||
"{Username 3}": "USI-Admin",
|
||||
"{Password 3}": "",
|
||||
"{Username 4}": "SIGA-Admin",
|
||||
"{Password 4}": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 19,
|
||||
"sTaskDescription": "Firewall",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "Powershell_Firewall Rule",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 20,
|
||||
"sTaskDescription": "ACC Antivirus Exclusions",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "Powershell_ACC8 Antivirus Exclusions",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 21,
|
||||
"sTaskDescription": "Folder Options",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "Powershell_Folder Options",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 22,
|
||||
"sTaskDescription": "Power Options",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "Powershell_Power Options",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 23,
|
||||
"sTaskDescription": "Show network Interface names, using CMD ",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Show_NetworkInterfaces",
|
||||
"dParameters": {
|
||||
"{P00}": "",
|
||||
"{P01}": "",
|
||||
"{P02}": "",
|
||||
"{P03}": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 24,
|
||||
"sTaskDescription": "Assign an IPv4 address to an interface Camera Lan",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Assign_IPv4Address",
|
||||
"dParameters": {
|
||||
"{Name of Interface}": "LAN 1 (Workstation)",
|
||||
"{IP Address}": "192.168.38.41",
|
||||
"{Net mask}": "255.255.255.0",
|
||||
"{Gateway}": "192.168.38.1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 25,
|
||||
"sTaskDescription": "Assign an IPv4 address to an interface Workstation",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Assign_IPv4Address",
|
||||
"dParameters": {
|
||||
"{Name of Interface}": "",
|
||||
"{IP Address}": "",
|
||||
"{Net mask}": "",
|
||||
"{Gateway}": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 26,
|
||||
"sTaskDescription": "Enable ScreenSaver for current user",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_ScreenSaver",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 27,
|
||||
"sTaskDescription": "Install Foxit Reader",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Install_FoxitReader",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 28,
|
||||
"sTaskDescription": "Set timezone to SK Canada Central Standard -6",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Timezone_CanCentralStandardTime_6",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 29,
|
||||
"sTaskDescription": "IPv6 Disable All",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Ipv6_Disable_ALL",
|
||||
"dParameters": {
|
||||
"{P00}": "",
|
||||
"{P01}": "",
|
||||
"{P02}": "",
|
||||
"{P03}": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 30,
|
||||
"sTaskDescription": "Install Meinberg ntp-4.2.8p",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Meinberg ntp-4.2.8",
|
||||
"dParameters": {
|
||||
"{IP Address 1}": "",
|
||||
"{IP Address 2}": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 31,
|
||||
"sTaskDescription": "Windows Update Restart",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "Powershell_Windows Update Restart",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 32,
|
||||
"sTaskDescription": "Install Teamviewer 15",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_Install_TeamViewer.msi",
|
||||
"dParameters": {}
|
||||
},
|
||||
{
|
||||
"iTaskNum": 33,
|
||||
"sTaskDescription": "Show all software version",
|
||||
"sTaskDevice": "",
|
||||
"bTaskSelect": false,
|
||||
"sProfile": "CMD_ShowAllSoftwareVersion",
|
||||
"dParameters": {}
|
||||
}
|
||||
]
|
||||
BIN
bin/Debug/FHT.exe
Normal file
BIN
bin/Debug/FHT.exe
Normal file
Binary file not shown.
31
bin/Debug/FHT.exe.config
Normal file
31
bin/Debug/FHT.exe.config
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.4.0" newVersion="4.2.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.6.0" newVersion="4.1.6.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.IO.Pipelines" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.2" newVersion="10.0.0.2" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
BIN
bin/Debug/FHT.pdb
Normal file
BIN
bin/Debug/FHT.pdb
Normal file
Binary file not shown.
38
bin/Debug/PS/ACC8 Antivirus Exclusions.ps1
Normal file
38
bin/Debug/PS/ACC8 Antivirus Exclusions.ps1
Normal file
@@ -0,0 +1,38 @@
|
||||
#Add exclusions
|
||||
Add-MpPreference -ExclusionProcess "C:\Program Files\Avigilon\Avigilon Control Center Server\VmsAdminPanel.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Server\VmsAdminPanel.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Server\VmsAdminPanelLauncher.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Server\VmsDaemonService.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Daemon\VmsDaemon.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Core\VmsCore.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Server\VmsUpgraderApp.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Server\LPR6\LprDaemonApp.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Device Management\VmsDeviceManagement.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Analytics Add-on\AnalyticsDaemonService.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Client\VmsClientApp.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Client Framework\AvigilonUnityClientFramework.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Web Endpoint\WebEndpointService.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Web Endpoint\node.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity API Gateway\VmsApiGateway.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Cloud Bridge\VmsCloudBridge.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Orchestrator Service\VmsOrchestratorService.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Virtual Matrix\VmsVirtualMatrixApp.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Software Manager\Service\VmsLocalUpdaterService.exe",
|
||||
"C:\Program Files\Avigilon\Avigilon Unity Player\VmsPlayerApp.exe",
|
||||
"C:\Program Files (x86)\Avigilon\Avigilon Unity Player\VmsPlayerApp.exe"
|
||||
Add-MpPreference -ExclusionExtension ".avd"
|
||||
Add-MpPreference -ExclusionPath "$Env:programdata\Avigilon",
|
||||
"$Env:appdata\Avigilon",
|
||||
"$Env:localappdata\Avigilon",
|
||||
"C:\Program Files\Avigilon",
|
||||
"D:\AvigilonData",
|
||||
"E:\AvigilonData",
|
||||
"D:\AvigilonConfig",
|
||||
"C:\AvigilonConfig"
|
||||
|
||||
#Check what is already excluded
|
||||
Get-MpPreference | Select-Object -Property ExclusionExtension -ExpandProperty ExclusionExtension
|
||||
Get-MpPreference| Select-Object -Property ExclusionPath | Format-table -wrap
|
||||
Get-MpPreference | Select-Object -Property ExclusionProcess | Format-list
|
||||
|
||||
|
||||
1
bin/Debug/PS/Avigilon Servername.ps1
Normal file
1
bin/Debug/PS/Avigilon Servername.ps1
Normal file
@@ -0,0 +1 @@
|
||||
Select-String -Path "C:\ProgramData\Avigilon\Avigilon Unity Core\Logs\VmsCore.clef" -Pattern "Acc.ServerName" -List
|
||||
33
bin/Debug/PS/Firewall Rule.ps1
Normal file
33
bin/Debug/PS/Firewall Rule.ps1
Normal file
@@ -0,0 +1,33 @@
|
||||
# Create incoming rule for Ping
|
||||
New-NetFirewallRule -DisplayName "Ping" -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -Action Allow
|
||||
|
||||
# Create incoming rule for CIW on Total Care PC
|
||||
New-NetFirewallRule -DisplayName "CIW Syslog" `
|
||||
-Direction Inbound `
|
||||
-Protocol UDP `
|
||||
-LocalPort 514 `
|
||||
-Action Allow `
|
||||
-Profile Private
|
||||
New-NetFirewallRule -DisplayName "CIW Email" `
|
||||
-Direction Inbound `
|
||||
-Protocol TCP `
|
||||
-LocalPort 25 `
|
||||
-Action Allow `
|
||||
-Profile Private
|
||||
|
||||
# Create outgoing rule for CIW on NVRs
|
||||
New-NetFirewallRule -DisplayName "CIW Email" `
|
||||
-Direction Outbound `
|
||||
-Protocol TCP `
|
||||
-LocalPort 25 `
|
||||
-RemotePort 25 `
|
||||
-Action Allow `
|
||||
-Profile Private,Public
|
||||
New-NetFirewallRule -DisplayName "CIW Syslog" `
|
||||
-Direction Outbound `
|
||||
-Protocol UDP `
|
||||
-LocalPort 514 `
|
||||
-RemotePort 514 `
|
||||
-Action Allow `
|
||||
-Profile Private,Public
|
||||
|
||||
62
bin/Debug/PS/Folder Options.ps1
Normal file
62
bin/Debug/PS/Folder Options.ps1
Normal file
@@ -0,0 +1,62 @@
|
||||
# Show favorites in navigation pane
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'NavPaneShowFavorites' -Value 1
|
||||
|
||||
# Show all folders in navigation pane
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'NavPaneShowAllFolders' -Value 1
|
||||
|
||||
# Automatically expand to current folder
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'NavPaneExpandToCurrentFolder' -Value 1
|
||||
|
||||
# Show libraries in navigation pane
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'NavPaneShowLibraries' -Value 1
|
||||
|
||||
# Always show menus
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'AlwaysShowMenus' -Value 1
|
||||
|
||||
# Display file icon on thumbnails
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'IconsOnly' -Value 0
|
||||
|
||||
# Display file size information in folder tips
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'FolderContentsInfoTip' -Value 1
|
||||
|
||||
# Show hidden files and folders
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'Hidden' -Value 1
|
||||
|
||||
# Unhide empty drives
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideDrivesWithNoMedia' -Value 0
|
||||
|
||||
# Uncheck "Hide extensions for known file types"
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideFileExt' -Value 0
|
||||
|
||||
# Uncheck "Hide folder merge conflicts"
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'HideFolderMergeConflicts' -Value 0
|
||||
|
||||
# Hide protected operating system files
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ShowSuperHidden' -Value 0
|
||||
|
||||
# Restore previous folder windows at logon
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'PersistBrowsers' -Value 1
|
||||
|
||||
# Show drive letters
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ShowDriveLetters' -Value 1
|
||||
|
||||
# Show encrypted or compressed NTFS files in color
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ShowEncryptedCompressedColor' -Value 1
|
||||
|
||||
# Show pop-up description for folders and desktop items
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ShowInfoTip' -Value 1
|
||||
|
||||
# Show previous handlers in preview pane
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'ShowPreviewHandlers' -Value 1
|
||||
|
||||
# Show status bar
|
||||
Set-ItemProperty -Path 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced' -Name 'StatusBar' -Value 1
|
||||
|
||||
# Apply the changes by restarting File Explorer
|
||||
Stop-Process -Name explorer -Force
|
||||
Start-Process explorer
|
||||
|
||||
# Apply settings to all folders (This usually requires user action; automate if necessary)
|
||||
$wshell = New-Object -ComObject wscript.shell
|
||||
$wshell.SendKeys('%(ve)') # Opens Folder Options -> View
|
||||
$wshell.SendKeys('{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}{ENTER}') # Select "Apply to Folders" and Confirm
|
||||
@@ -0,0 +1,8 @@
|
||||
$adapters = Get-NetAdapter -Physical | Get-NetAdapterPowerManagement
|
||||
foreach ($adapter in $adapters)
|
||||
{
|
||||
$adapter.WakeOnMagicPacket = 'Enabled'
|
||||
$adapter.WakeOnPattern = 'Enabled'
|
||||
$adapter.AllowComputerToTurnOffDevice = 'Disabled'
|
||||
$adapter | Set-NetAdapterPowerManagement
|
||||
}
|
||||
8
bin/Debug/PS/Power Options.ps1
Normal file
8
bin/Debug/PS/Power Options.ps1
Normal file
@@ -0,0 +1,8 @@
|
||||
# Set computer to never sleep
|
||||
powercfg /change standby-timeout-ac 0
|
||||
|
||||
# Set monitor to never turn off
|
||||
powercfg /change monitor-timeout-ac 0
|
||||
|
||||
# Set hard drives to never turn off
|
||||
powercfg /change disk-timeout-ac 0
|
||||
9
bin/Debug/PS/Remote Desktop Enable.ps1
Normal file
9
bin/Debug/PS/Remote Desktop Enable.ps1
Normal file
@@ -0,0 +1,9 @@
|
||||
# Enable Remote Desktop
|
||||
Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\Terminal Server" -Name "fDenyTSConnections" -Value 0
|
||||
|
||||
# Enable Remote Desktop through Windows Firewall
|
||||
Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
|
||||
|
||||
# Allow "Everyone" group to connect
|
||||
$rdpAccessGroup = "Remote Desktop Users"
|
||||
Add-LocalGroupMember -Group $rdpAccessGroup -Member "Everyone"
|
||||
49
bin/Debug/PS/Windows Update Restart.ps1
Normal file
49
bin/Debug/PS/Windows Update Restart.ps1
Normal file
@@ -0,0 +1,49 @@
|
||||
# Import the Update Session COM object
|
||||
$updateSession = New-Object -ComObject Microsoft.Update.Session
|
||||
|
||||
# Create an update searcher object
|
||||
$updateSearcher = $updateSession.CreateUpdateSearcher()
|
||||
|
||||
# Search for available updates
|
||||
$searchResult = $updateSearcher.Search("IsInstalled=0")
|
||||
|
||||
# Check if updates are available
|
||||
if ($searchResult.Updates.Count -gt 0) {
|
||||
Write-Output "$($searchResult.Updates.Count) updates found. Installing..."
|
||||
|
||||
# Create an update downloader object
|
||||
$updateDownloader = $updateSession.CreateUpdateDownloader()
|
||||
$updateDownloader.Updates = $searchResult.Updates
|
||||
|
||||
# Download updates
|
||||
$downloadResult = $updateDownloader.Download()
|
||||
|
||||
if ($downloadResult.ResultCode -eq 2) {
|
||||
Write-Output "Updates downloaded successfully."
|
||||
|
||||
# Create an update installer object
|
||||
$updateInstaller = $updateSession.CreateUpdateInstaller()
|
||||
$updateInstaller.Updates = $searchResult.Updates
|
||||
|
||||
# Install updates
|
||||
$installResult = $updateInstaller.Install()
|
||||
|
||||
if ($installResult.ResultCode -eq 2) {
|
||||
Write-Output "Updates installed successfully."
|
||||
|
||||
# Check if a restart is required
|
||||
if ($installResult.RebootRequired) {
|
||||
Write-Output "Restart is required. Restarting the computer..."
|
||||
Restart-Computer -Force
|
||||
} else {
|
||||
Write-Output "No restart is required."
|
||||
}
|
||||
} else {
|
||||
Write-Error "Failed to install updates. Result code: $($installResult.ResultCode)"
|
||||
}
|
||||
} else {
|
||||
Write-Error "Failed to download updates. Result code: $($downloadResult.ResultCode)"
|
||||
}
|
||||
} else {
|
||||
Write-Output "No updates are available."
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
bin/Debug/profile - laptop.json
Normal file
BIN
bin/Debug/profile - laptop.json
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="BouncyCastle.Cryptography" version="2.6.2" targetFramework="net48" />
|
||||
<package id="log4net" version="3.2.0" targetFramework="net48" />
|
||||
<package id="log4net" version="3.3.1" targetFramework="net48" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="10.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="8.0.2" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="8.0.3" targetFramework="net48" />
|
||||
|
||||
20
profile.json
20
profile.json
@@ -217,7 +217,14 @@
|
||||
"ProfileName": "Powershell_NetworkInterface_Team_LACP_Dynamic",
|
||||
"ProfileType": "Powershell",
|
||||
"ProfileCommands": [
|
||||
"New-NetLbfoTeam -Name \"{Team Name}\" -TeamMembers \"{NIC1}\", \"{NIC2}\" -TeamingMode LACP -LoadBalancingAlgorithm Dynamic -Confirm:$false"
|
||||
"New-NetLbfoTeam -Name \"{Team Name}\" -TeamMembers \"{NIC1}\", \"{NIC2}\" -TeamingMode LACP -LoadBalancingAlgorithm Dynamic -Confirm:$false",
|
||||
"Set-NetAdapterAdvancedProperty -Name \"{NIC1}\" -DisplayName \"Speed & Duplex\" -DisplayValue \"10 Gbps Full Duplex\" ",
|
||||
"Set-NetAdapterAdvancedProperty -Name \"{NIC2}\" -DisplayName \"Speed & Duplex\" -DisplayValue \"10 Gbps Full Duplex\" ",
|
||||
"Set-NetAdapterAdvancedProperty -Name \"{NIC1}\" -DisplayName \"Energy-Efficient Ethernet\" -DisplayValue \"Disabled\" ",
|
||||
"Set-NetAdapterAdvancedProperty -Name \"{NIC2}\" -DisplayName \"Energy-Efficient Ethernet\" -DisplayValue \"Disabled\" ",
|
||||
"Get-NetAdapterAdvancedProperty -Name \"{NIC1}\" ",
|
||||
"Get-NetAdapterAdvancedProperty -Name \"{NIC2}\" ",
|
||||
"Get-NetAdapterAdvancedProperty -Name \"{Team Name}\" "
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{Team Name}",
|
||||
@@ -417,7 +424,10 @@
|
||||
"ProfileCommands": [
|
||||
"racadm set iDRAC.Users.{Index}.Username {Username}",
|
||||
"racadm set iDRAC.Users.{Index}.Password {Password}",
|
||||
"racadm get iDRAC.Users.{Index}.Username"
|
||||
"racadm get iDRAC.Users.{Index}.Username",
|
||||
"racadm set iDRAC.Users.{Index}.Enable 1",
|
||||
"racadm set iDRAC.Users.{Index}.IpmiLanPriv 4"
|
||||
|
||||
],
|
||||
"ProfileParameters": [ "{Index}", "{Username}", "{Password}" ]
|
||||
},
|
||||
@@ -433,7 +443,11 @@
|
||||
"racadm set iDRAC.Users.4.Password {Password 4}",
|
||||
"racadm get iDRAC.Users.2.Username",
|
||||
"racadm get iDRAC.Users.3.Username",
|
||||
"racadm get iDRAC.Users.4.Username"
|
||||
"racadm get iDRAC.Users.4.Username",
|
||||
"racadm set iDRAC.Users.3.Enable 1",
|
||||
"racadm set iDRAC.Users.3.IpmiLanPriv 4",
|
||||
"racadm set iDRAC.Users.4.Enable 1",
|
||||
"racadm set iDRAC.Users.4.IpmiLanPriv 4"
|
||||
],
|
||||
"ProfileParameters": [
|
||||
"{Password 2 root}",
|
||||
|
||||
Reference in New Issue
Block a user