diff --git a/FormConfiguration.cs b/FormConfiguration.cs index d59d772..006c670 100644 --- a/FormConfiguration.cs +++ b/FormConfiguration.cs @@ -68,63 +68,74 @@ namespace FHT private void buttonTasklistEnc_Click(object sender, EventArgs e) { Utilities utilities = new Utilities(log); + //Enable selecting multiple files + openFileDialog.Multiselect = true; + + if (openFileDialog.ShowDialog() == DialogResult.OK) { - string Jsonfilename = openFileDialog.FileName; - string buttonTasklistPath = openFileDialog.SafeFileName; - if (File.Exists(Jsonfilename)) + string[] Jsonfilenames = openFileDialog.FileNames; + foreach (string Jsonfilename in Jsonfilenames) { - try + if (File.Exists(Jsonfilename)) { - //read tasklist data from file - string sData = File.ReadAllText(Jsonfilename); - log.Info(string.Format("Read {0} to String", Jsonfilename)); - //encrypt data - byte[] bData = Utilities.EncryptStringAES(sData, aes.Key); + try + { + //read tasklist data from file + string sData = File.ReadAllText(Jsonfilename); + log.Info(string.Format("Read {0} to String", Jsonfilename)); + //encrypt data + byte[] bData = Utilities.EncryptStringAES(sData, aes.Key); - //write encrypted data to file - File.WriteAllBytes(Jsonfilename, bData); + //write encrypted data to file + File.WriteAllBytes(Jsonfilename, bData); + } + catch (Exception ex) + { + //could not read tasklist.json properly + log.Error(string.Format("Could not load {0} for encrypting", Jsonfilename)); + log.Error(ex); + } } - catch (Exception ex) - { - //could not read tasklist.json properly - 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); + //Enable selecting multiple files + openFileDialog.Multiselect = true; if (openFileDialog.ShowDialog() == DialogResult.OK) { - string JsonFileName = openFileDialog.FileName; - string buttonTasklistPath = openFileDialog.SafeFileName; - if (File.Exists(JsonFileName)) + string[] Jsonfilenames = openFileDialog.FileNames; + foreach (string JsonFileName in Jsonfilenames) { - try + if (File.Exists(JsonFileName)) { - //read json data from file - byte[] bData = File.ReadAllBytes(JsonFileName); - - //decrypt data and save to file + try + { + //read json data from file + byte[] bData = File.ReadAllBytes(JsonFileName); + + //decrypt data and save to file + + File.WriteAllText(JsonFileName, Utilities.DecryptStringFromBytes(bData, aes.Key)); + + } + catch (Exception ex) + { + //could not read tasklist.json properly + log.Error(string.Format("Could not load {0} for encrypting", JsonFileName)); + log.Error(ex); + } - File.WriteAllText(JsonFileName, Utilities.DecryptStringFromBytes(bData, aes.Key)); } - catch (Exception ex) - { - //could not read tasklist.json properly - log.Error(string.Format("Could not load {0} for encrypting", JsonFileName)); - log.Error(ex); - } - - } } } diff --git a/Unencrypted PS and Json files/20260515/PS/3D USI screensaver.ps1 b/Unencrypted PS and Json files/20260515/PS/3D USI screensaver.ps1 new file mode 100644 index 0000000..d818439 --- /dev/null +++ b/Unencrypted PS and Json files/20260515/PS/3D USI screensaver.ps1 @@ -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 diff --git a/Unencrypted PS and Json files/20260515/PS/ACC8 Antivirus Exclusions.ps1 b/Unencrypted PS and Json files/20260515/PS/ACC8 Antivirus Exclusions.ps1 new file mode 100644 index 0000000..60268e5 --- /dev/null +++ b/Unencrypted PS and Json files/20260515/PS/ACC8 Antivirus Exclusions.ps1 @@ -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 + + diff --git a/Unencrypted PS and Json files/20260515/PS/Avigilon Servername.ps1 b/Unencrypted PS and Json files/20260515/PS/Avigilon Servername.ps1 new file mode 100644 index 0000000..fa7622a --- /dev/null +++ b/Unencrypted PS and Json files/20260515/PS/Avigilon Servername.ps1 @@ -0,0 +1 @@ +Select-String -Path "C:\ProgramData\Avigilon\Avigilon Unity Core\Logs\VmsCore.clef" -Pattern "Acc.ServerName" -List \ No newline at end of file diff --git a/Unencrypted PS and Json files/20260515/PS/Firewall Rule.ps1 b/Unencrypted PS and Json files/20260515/PS/Firewall Rule.ps1 new file mode 100644 index 0000000..6b6a278 --- /dev/null +++ b/Unencrypted PS and Json files/20260515/PS/Firewall Rule.ps1 @@ -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 + diff --git a/Unencrypted PS and Json files/20260515/PS/Folder Options.ps1 b/Unencrypted PS and Json files/20260515/PS/Folder Options.ps1 new file mode 100644 index 0000000..6066975 --- /dev/null +++ b/Unencrypted PS and Json files/20260515/PS/Folder Options.ps1 @@ -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 diff --git a/Unencrypted PS and Json files/20260515/PS/NetworkInterfacePowermanagementDisableALL.ps1 b/Unencrypted PS and Json files/20260515/PS/NetworkInterfacePowermanagementDisableALL.ps1 new file mode 100644 index 0000000..fe913cb --- /dev/null +++ b/Unencrypted PS and Json files/20260515/PS/NetworkInterfacePowermanagementDisableALL.ps1 @@ -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 + } diff --git a/Unencrypted PS and Json files/20260515/PS/Power Options.ps1 b/Unencrypted PS and Json files/20260515/PS/Power Options.ps1 new file mode 100644 index 0000000..a038c5c --- /dev/null +++ b/Unencrypted PS and Json files/20260515/PS/Power Options.ps1 @@ -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 diff --git a/Unencrypted PS and Json files/20260515/PS/Remote Desktop Enable.ps1 b/Unencrypted PS and Json files/20260515/PS/Remote Desktop Enable.ps1 new file mode 100644 index 0000000..ff62a24 --- /dev/null +++ b/Unencrypted PS and Json files/20260515/PS/Remote Desktop Enable.ps1 @@ -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" diff --git a/Unencrypted PS and Json files/20260515/PS/Windows Update Restart.ps1 b/Unencrypted PS and Json files/20260515/PS/Windows Update Restart.ps1 new file mode 100644 index 0000000..d8cfea6 --- /dev/null +++ b/Unencrypted PS and Json files/20260515/PS/Windows Update Restart.ps1 @@ -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." +} diff --git a/Unencrypted PS and Json files/20260515/profile.json b/Unencrypted PS and Json files/20260515/profile.json new file mode 100644 index 0000000..cb1c9b0 --- /dev/null +++ b/Unencrypted PS and Json files/20260515/profile.json @@ -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": [] + } +] \ No newline at end of file diff --git a/Unencrypted PS and Json files/20260515/tasklist.json b/Unencrypted PS and Json files/20260515/tasklist.json new file mode 100644 index 0000000..b1a9a26 --- /dev/null +++ b/Unencrypted PS and Json files/20260515/tasklist.json @@ -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": {} + } +] \ No newline at end of file diff --git a/bin/Debug/FHT.exe b/bin/Debug/FHT.exe index da7c141..0eb03f8 100644 Binary files a/bin/Debug/FHT.exe and b/bin/Debug/FHT.exe differ diff --git a/bin/Debug/FHT.pdb b/bin/Debug/FHT.pdb index bfc24f3..1e4bf6d 100644 Binary files a/bin/Debug/FHT.pdb and b/bin/Debug/FHT.pdb differ diff --git a/bin/Debug/PS/ACC8 Antivirus Exclusions.ps1 b/bin/Debug/PS/ACC8 Antivirus Exclusions.ps1 new file mode 100644 index 0000000..60268e5 --- /dev/null +++ b/bin/Debug/PS/ACC8 Antivirus Exclusions.ps1 @@ -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 + + diff --git a/bin/Debug/PS/Avigilon Servername.ps1 b/bin/Debug/PS/Avigilon Servername.ps1 new file mode 100644 index 0000000..fa7622a --- /dev/null +++ b/bin/Debug/PS/Avigilon Servername.ps1 @@ -0,0 +1 @@ +Select-String -Path "C:\ProgramData\Avigilon\Avigilon Unity Core\Logs\VmsCore.clef" -Pattern "Acc.ServerName" -List \ No newline at end of file diff --git a/bin/Debug/PS/Firewall Rule.ps1 b/bin/Debug/PS/Firewall Rule.ps1 new file mode 100644 index 0000000..6b6a278 --- /dev/null +++ b/bin/Debug/PS/Firewall Rule.ps1 @@ -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 + diff --git a/bin/Debug/PS/Folder Options.ps1 b/bin/Debug/PS/Folder Options.ps1 new file mode 100644 index 0000000..6066975 --- /dev/null +++ b/bin/Debug/PS/Folder Options.ps1 @@ -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 diff --git a/bin/Debug/PS/NetworkInterfacePowermanagementDisableALl.ps1 b/bin/Debug/PS/NetworkInterfacePowermanagementDisableALl.ps1 new file mode 100644 index 0000000..fe913cb --- /dev/null +++ b/bin/Debug/PS/NetworkInterfacePowermanagementDisableALl.ps1 @@ -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 + } diff --git a/bin/Debug/PS/Power Options.ps1 b/bin/Debug/PS/Power Options.ps1 new file mode 100644 index 0000000..a038c5c --- /dev/null +++ b/bin/Debug/PS/Power Options.ps1 @@ -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 diff --git a/bin/Debug/PS/Remote Desktop Enable.ps1 b/bin/Debug/PS/Remote Desktop Enable.ps1 new file mode 100644 index 0000000..ff62a24 --- /dev/null +++ b/bin/Debug/PS/Remote Desktop Enable.ps1 @@ -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" diff --git a/bin/Debug/PS/Windows Update Restart.ps1 b/bin/Debug/PS/Windows Update Restart.ps1 new file mode 100644 index 0000000..d8cfea6 --- /dev/null +++ b/bin/Debug/PS/Windows Update Restart.ps1 @@ -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." +} diff --git a/bin/Debug/profile.json b/bin/Debug/profile.json index 39d0b56..f31dfdc 100644 Binary files a/bin/Debug/profile.json and b/bin/Debug/profile.json differ diff --git a/bin/Debug/tasklist.json b/bin/Debug/tasklist.json index 83e8ff9..3c2b47f 100644 Binary files a/bin/Debug/tasklist.json and b/bin/Debug/tasklist.json differ diff --git a/profile.json b/profile.json index 6db9b58..cb1c9b0 100644 --- a/profile.json +++ b/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}",