Releases: suchsoak/Powershell_script
v.1.0.5
| _ \ ___ _ __ __ ___ _ _ ___ __ _ _ (_)| '_ \| |_
| _// _ \ \ V V // -_)| '_| (_-// _|| '_|| || .__/| _|
|_| \___/ \_/\_/ \___||_| /__/\__||_| |_||_| \__|
Github: https://github.com/schsoak
BY: suchsoak
v:1.0.5
[1] Wsl [9] IDE [17] HR CODE
[2] Firewall rules [10] Systeminfo
[3] Browser Install [11] File information
[4] Drive Reset [12] RestorePoint
[5] NetReset [13] Windows update
[6] Disk Verification [14] EventLog
[7] Telssh [15] MpScan
[8] Programming language [16] Password
Choose the option:
The addition of a new script, the qr code
, did not have any major changes. Just this addition and the correction of the name suchsoak which was written wrongly within the script. Several comments were also placed to serve as guides within the script, such as # HQCODE
_ _ ___ ___ ___ ___ ___
| || || _ \ / __| / _ \ | \ | __|
| __ || /| (__ | (_) || |) || _|
|_||_||_|_\ \___| \___/ |___/ |___|
[1] Curl
[2] QRCodeGenerator
Github:github.com/suchsoak
BY: suchsoak
The script is to generate an hrcode with a link you place. There are two options, you can use the curl tool or porwshell's QRCodeGenerator. Just remember that you will have to install its module to use it.
Readme and script | link |
---|---|
HRCODE | https://github.com/suchsoak/Powershell_script/blob/main/Doc/hrcode.md |
script | https://github.com/suchsoak/Powershell_script/blob/main/powershell/hrcode.ps1 |
QRCodeGenerator | https://techexpert.tips/powershell/powershell-creating-qr-code-url/ |
New script e more...
___ _ _ __ _
| _ \ ___ _ __ __ ___ _ _ ___ __ _ _ (_)| '_ \| |_
| _// _ \ \ V V // -_)| '_| (_-// _|| '_|| || .__/| _|
|_| \___/ \_/\_/ \___||_| /__/\__||_| |_||_| \__|
Github: https://github.com/schsoak
BY: suchsoak
v:1.0.4
[1] Wsl [9] IDE
[2] Firewall rules [10] Systeminfo
[3] Browser Install [11] File information
[4] Drive Reset [12] RestorePoint
[5] NetReset [13] Windows update
[6] Disk Verification [14] EventLog
[7] Telssh [15] MpScan
[8] Programming language [16] Password
More script has been put in place and fixes to the code
Fixes for Start-temp, Clear-host and also disk name verification. If you'd like to see more about the fixes: 6d60adc
Systeminfo
o=====ooooooo=ooooooooooo==
===========+===============
=====....................+o
===o: :=:..+===========. +o
====..=o+. ~+oo====oo+ ~==
===: ~oo==+. ~+====oo~ +o=
===. =oo=o=+. .====o+ .===
=o+ ~oo=+:. .:=oo===: :===
oo. +=:. .:~~:~~+oo=..====
o+ .=+..~+==.....:==: :o===
o+....................=o===
oo=============+====+=o====
o==o=ooooooo====oooo=======
Github:github.com/suchsoak
BY: suchsok
This script gives information about the system, such as video card, processor, wifi and so on.
Doc | Links |
---|---|
Systeminfo | https://github.com/suchsoak/Powershell_script/blob/main/Doc/systeminfo.md |
Fileinfo
+------------------------------+
|=========+~........~+=========|
|=======+..~:++==++:~..+=======|
|======~ ~+==========+~ ~======|
|=====+ ~==============~ +=====|
|=====~ :o=============: ~o====|
|====+. ~++++++++++++++~ .+====|
|==+..~~~~~~~~~~~~~~~~~~~~..+==|
|==+ ~====================~ +==|
|==+ ~=======+~.~~+=======~ +==|
|==+ ~======: .++. +======~ +==|
|==+ ~======+..:~..+======~ +==|
|==+ ~========+ :========~ +==|
|==+ .=========~~=========~ +==|
|===~ ~+=======++======++~ ~===|
|====:~..................~+====|
+------------------------------+
Github:github.com/suchsoak
BY: suchsok
This script returns information about a particular file
Doc | Links |
---|---|
Fileinfo | https://github.com/suchsoak/Powershell_script/blob/main/Doc/fileinfo.md |
restorepoint
___ _ ___ _ _
| _ \ ___ ___| |_ ___ _ _ ___ | _ \ ___ (_) _ _ | |_
| // -_)(_-/| _|/ _ \| '_|/ -_)| _// _ \| || ' \ | _|
|_|_\\___|/__/ \__|\___/|_| \___||_| \___/|_||_||_| \__|
Github:github.com/suchsoak
BY: suchsok
This script will make a restore point on the system
Doc | Links |
---|---|
Restorepoint | https://github.com/suchsoak/Powershell_script/blob/main/Doc/restorepoint.md |
eventlog
___ _ _ __ _
| __|__ __ ___ _ _ | |_ | | ___ / _` |
| _| \ V // -_)| ' \ | _|| |__ / _ \\__. |
|___| \_/ \___||_||_| \__||____|\___/|___/
Github:github.com/suchsoak
BY: suchsok
[1] 10 [5] 50 [9] 90
[2] 20 [6] 60 [10] 100
[3] 30 [7] 70 [11] 1000
[4] 40 [8] 80 [12] 10000
The provided script is a PowerShell script that displays a log and allows the user to choose the number of recent events they want to retrieve from the System event log.
Doc | Links |
---|---|
Eventlog | https://github.com/suchsoak/Powershell_script/blob/main/Doc/eventlog.md |
Mpscan
__ __ _ __ ___
| \/ || '_ \/ __| __ __ _ _ _
| |\/| || .__/\__ \/ _|/ _` || ' \
|_| |_||_| |___/\__|\__/_||_||_|
Github:github.com/suchsoak
BY: suchsok
The script in question is written in PowerShell and aims to perform checks and executions related to computer security using Windows Defender.
Doc | Link |
---|---|
mpscan | https://github.com/suchsoak/Powershell_script/blob/main/Doc/mpscan.md?plain=1 |
Password
_ __ _
| '_ \ __ _ ___ ___ _ __ __ ___ _ _ __| |
| .__// _` |(_-/(_-/ \ V V // _ \| '_|/ _` |
|_| \__/_|/__//__/ \_/\_/ \___/|_| \__/_|
Github:github.com/suchsoak
BY: suchsok
The logic of this script is to prompt the user to enter a password and a file path, and then securely save the password to a file using PowerShell commands.
scrip | link |
---|---|
password | https://github.com/suchsoak/Powershell_script/blob/main/Doc/password.md |
Windows Update
|oooooooooooooooooooooooooooo:o|
|oooooooooooooo:o::::::~~~~~~~:|
|o~:~~~~ ~ ~o~~ ~~~~~~~~~~~~o|
|: :o~~~~~~~~~~~~~ ~:|
|: :o~~~~~~~~~~~~~~~:|
|: :o~~~~ ~ ~~~~~ ~~o|
|: :o~~~~~~~~~~~~~~~o|
|o::::~::::::oo::o::o:oo:::oo:o|
|o ~ ~ ~ oo~:::::::::::::~o|
|: :o~:~:~::~:~:~:~~o|
|: ~ ~ ~ :o::~:~:::::~::::o|
|o ~ :o:~::::~:~:::~:~o|
|o:~~~~~~ ~ :o::~~:~::~:~:~::o|
|oooooooooooooo:ooo:o::::::~:~o|
|oooooooooooooooooooooooooooooo|
This script will update the Windows update if you have problem. This script will attempt to fix this.
Doc | Links |
---|---|
Windows Update | https://github.com/suchsoak/Powershell_script/blob/main/Doc/update.md |
Fix bugs and more scripts
___ _ _ __ _
| _ \ ___ _ __ __ ___ _ _ ___ __ _ _ (_)| '_ \| |_
| _// _ \ \ V V // -_)| '_| (_-// _|| '_|| || .__/| _|
|_| \___/ \_/\_/ \___||_| /__/\__||_| |_||_| \__|
Github: https://github.com/schsoak
v:1.0.3
BY: ~#M?x
[1] Wsl [9] IDE
[2] Firewall rules
[3] Browser Install
[4] Drive Reset
[5] NetReset
[6] Disk Verification
[7] Telssh
[8] Programming language
Details
Error handling
Note
Just an example of the code part
Before
}else {
Write-Host "Installing Telnet..."
Start-Sleep 3 > $null
Add-WindowsCapability -Online -Name TelnetClient~~~~0.0.1.0
Start-Sleep 2 > $null
Write-Host
Clear-Host
Write-Host "Telnet is already installed." -ForegroundColor Red
Write-Host
}}}
After
default{
Write-Host
Write-Host "Please enter a valid number." -ForegroundColor Red
} catch{
Write-Host "Error"
}}}}
The difference between the two code snippets in terms of error handling is as follows:
In the first code snippet:
default{
Write-Host
Write-Host "Please enter a valid number." -ForegroundColor Red
} catch{
Write-Host "Error"
}}}
The default block is used to catch any exception that is not handled by a specific catch block.
The catch block is used to catch specific exceptions and execute error handling code.
In the case of the first code snippet, the catch block is not specifying any type of exception to catch, so it will catch any exception that occurs and display the message "Error" in the console.
In the second code snippet:
Write-Host "Installing Telnet..."
Start-Sleep 3 > $null
Add-WindowsCapability -Online -Name TelnetClient~~~~0.0.1.0
Start-Sleep 2 > $null
Write-Host
Clear-Host
Write-Host "Telnet is already installed." -ForegroundColor Red
Write-Host
}}}
There is no default or catch block in the second code snippet.
Therefore, any exception that occurs during the execution of this code will not be explicitly handled.
The code simply continues its normal execution.
Programming Language
_ __ _ __ _
| | __ _ _ _ / _` | _ _ __ _ / _` | ___
| |/ _` || ' \ \__. || || |/ _` |\__. |/ -_)
|_|\__/_||_||_||___/ \_._|\__/_||___/ \___|
Github: https://github.com/schsoak
Buy ME A Coffe:
BY: ~#M?x
[1] Python [5] Swift
[2] Ruby [6] GO
[3] GCC (C) [7] Kotlin
[4] Nodejs [8] ALL
This scrips will install the programming languages of your choice such as python, ruby and etc..
Part of the code
switch ($language) {
1{
Clear-Host
$python =@"
___ __ __ _____ _ _ ___ _ _
| _ \\ \ / /|_ _|| || | / _ \ | \| |
| _/ \ / | | | __ || (_) || . |
|_| |_| |_| |_||_| \___/ |_|\_|
"@
Write-Host $python -ForegroundColor Blue
Start-Sleep 2 > $null
Write-Host
winget install --id=Python.Python.3.12 -e
Clear-Host
pip -V -ForegroundColor Blue
Write-Host
Write-Host "Python Installed"
break
}
2{
Clear-Host
$ruby = @"
___ _ _ ___ __ __
| _ \| | | || _ )\ \ / /
| /| |_| || _ \ \ /
|_|_\ \___/ |___/ |_|
"@
Write-Host $ruby -ForegroundColor Red
Start-Sleep 2 > $null
#Ruby on Windows
winget install --id=RubyInstallerTeam.Ruby.3.2 -e
Write-Host
if ($true) {
Ruby -v
Write-Host "Ruby Installed"
break
}else {
Write-Host "Ruby Not Installed"
Write-Host
Write-Host "Sorry there was really problem"
}
}
Here is a breakdown of how the script works:
The script starts by clearing the console screen using the Clear-Host command.
It then defines a variable called $programming that contains a multi-line string with ASCII art representing the available programming languages and some additional information.
The script displays the $programming variable using the Write-Host command, which prints the text to the console.
The script prompts the user to choose an option by reading their input using the Read-Host command and storing it in the $language variable.
The script uses a switch statement to handle different cases based on the user's input.
Each case corresponds to a different programming language option.
For example, case 1 corresponds to Python, case 2 corresponds to Ruby, case 3 corresponds to GCC (C), and so on.
Each case starts by clearing the console screen using Clear-Host and then displays ASCII art representing the selected programming language using the Write-Host command.
After displaying the ASCII art, the script installs the corresponding programming language using the winget install command.
For example, for Python, it installs the Python package using winget install --id=Python.Python.3.12.
After installing the language, the script displays a success message using Write-Host.
The script also includes a default case that is executed when the user enters an invalid option. In this case, it displays an error message using Write-Host.
Overall, the script provides a menu-driven interface for installing different programming languages on the system.
IDE
___ ___ ___
|_ _|| \ | __|
| | | |) || _|
|___||___/ |___|
Buy ME A Coffe: https://www.buymeacoffee.com/m100047r
Github: https://github.com/schsoak
BY: ~#M?x
[1] Visual Code Studio [4] Atom [7] Notepadd++
[2] PyCharm Community Edition [5] Android Studio [8] Rubymine
[3] Sublime Text [6] Arduino IDE [9] ALL
This script is a PowerShell script that allows the user to choose and install different Integrated Development Environments (IDEs) on their system. Let's break down how the script works and what it does:
Introduction
The script starts with a brief introduction that includes ASCII art logos for each IDE and some contact information for the script's author.
Displaying Options
After the introduction, the script displays a menu of IDE options using a here-string variable called $IDE. Each option is numbered, and the user is prompted to choose an option by entering the corresponding number.
Handling User Input
The script uses a switch statement to handle the user's input. Depending on the chosen option, the script executes a specific block of code for that option.
Installing IDEs
For each option, the script clears the console screen and displays the ASCII art logo for the chosen IDE. It then waits for 2 seconds before executing the installation command using the winget install command. The installation command is specific to each IDE and is passed as an argument to the winget install command.
Error Handling
If an error occurs during the installation process, the script displays an "Error" message.
Installing All IDEs
If the user chooses option 9, the script executes a block of code that installs all the IDEs sequentially. It clears the console screen, displays a progress message for each IDE being installed, and waits for 2 seconds before executing the installation command for each IDE.
Conclusion
After all the installations are complete, the script displays a message indicating that all the IDEs have been installed.
Telssh
| | |
__| _ \ | __| __| __ \
| __/ | \__ \ \__ \ | | |
\__| \___| _| ____/ ____/ _| |_|
Github: https://github.com/schsoak
BY: ~#M?x
Code
ssh = @"
| | |
__| _ \ | __| __| __ \
| __/ | \__ \ \__ \ | | |
\__| \___| _| ____/ ____/ _| |_|
Github: https://github.com/schsoak
BY: ~#M?x
"@
if ($False){
$SSHStatus = Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
}else {
Write-Host "Installing OpenSSH..."
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
Write-Host
Clear-Host
Write-Host "OpenSSH is installed" -ForegroundColor Red
Start-Sleep 3 > $null
}
if ($true){
$SSHStatus = Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
Write-Host
Write-Host
Clear-Host
else {
Write-Host "Openssh is probably not available"
}
if ($false){
$TelnetStatus = Get-WindowsCapability -Online | ? Name -like 'TelnetClient*'
}else {
Write-Host "Installing Telnet..."
Add-WindowsCapability -Online -Name TelnetClient~~~~0.0.1.0
Write-Host
Clear-Host
Write-Host "Telnet is already installed." -ForegroundColor Red
}
Details
The script checks if OpenSSH and Telnet are installed on the Windows system and performs the installation if necessary.
For OpenSSH:
If the $False variable is true, the script checks if OpenSSH is already installed and stores the status in $SSHStatus.
Otherwise, the script installs OpenSSH using the Add-WindowsCapability command and displays informative messages during the process.
After the installation of OpenSSH, the script checks if the $True variable is true and performs the following actions:
Checks again if OpenSSH is installed and updates $SSHStatus.
Starts the sshd service using the Start-Service command.
Sets the startup type of the sshd service to 'Automatic' using the Set-Service command.
Clears the screen and displays empty messages.
If the $True variable is false, the script displays a message stating that OpenSSH is not available.
For Telnet:
If the $False variable is true, the script checks if Telnet is already installed and stores the status in $TelnetStatus.
Otherwise, the script installs Telnet using the Add-WindowsCapability command and displays informative messages during the process.
If the $False variable is false, the script displays a message stating that there are problems with Telnet.
The script uses PowerShell commands to perform the checks and installations, displaying informative messages during the process.
The Documentation
The script verifies that OpenSSH and Telnet are installed on the Windows system and performs the installation if necessary.
Doc | Links |
---|---|
Telssh | https://github.com/suchsoak/Powershell_script/blob/main/Doc/Telssh.md |
More Scripts (netreset - disk verification)
More adition script
___ _ _ __ _
| _ \ ___ _ __ __ ___ _ _ ___ __ _ _ (_)| '_ \| |_
| _// _ \ \ V V // -_)| '_| (_-// _|| '_|| || .__/| _|
|_| \___/ \_/\_/ \___||_| /__/\__||_| |_||_| \__|
Github: https://github.com/schsoak
v:1.0.1
BY: ~#M?x
[1] Wsl [2] Firewall rules [5] NetReset
[3] Browser Install [4] Drive Reset [6] Disk Verification
Netreset
_ _ _ _
| \| | ___ | |_ _ _ ___ ___ ___ | |_
| . |/ -_)| _|| '_|/ -_)(_-// -_)| _|
|_|\_|\___| \__||_| \___|/__/\___| \__|
Github: https://github.com/schsoak
BY: ~#M?x
The script will reset TCP ports and other system network settings
The Documentation
Doc | Links |
---|---|
Netreset | https://github.com/suchsoak/Powershell_script/blob/main/Doc/netreset.md |
Disk Verification
Disk verification will scan for corrupted files such as the sfc /scannow command
___ _ _ _ __ _ _ _
| \ (_) ___| |__ __ __ ___ _ _ (_) / _|(_) __ __ _ | |_ (_) ___ _ _
| |) || |(_-/| / / \ V // -_)| '_|| || _|| |/ _|/ _` || _|| |/ _ \| ' \
|___/ |_|/__/|_\_\ \_/ \___||_| |_||_| |_|\__|\__/_| \__||_|\___/|_||_|
Github: https://github.com/schsoak
BY: ~#M?x
The Documentation
Doc | Links |
---|---|
Disk Verification | https://github.com/suchsoak/Powershell_script/blob/main/Doc/disk%20verification.md |
On developer
This script is under development and for now only 4 scripts. And it's likely to have errors. The script is in beta. It's still in version v:1.0.0, probably in the next version v:1.0.1 will come more scripts and fixes.
___ _ _ __ _
| _ \ ___ _ __ __ ___ _ _ ___ __ _ _ (_)| '_ \| |_
| _// _ \ \ V V // -_)| '_| (_-// _|| '_|| || .__/| _|
|_| \___/ \_/\_/ \___||_| /__/\__||_| |_||_| \__|
Github: https://github.com/schsoak
v:1.0.1
BY: ~#M?x
[1] Wsl [2] Firewall rules
[3] Browser Install [4] Drive Reset