Skip to content

Instantly share code, notes, and snippets.

View Techlogist's full-sized avatar
:octocat:
Focusing

Miguel Techlogist

:octocat:
Focusing
View GitHub Profile
@Techlogist
Techlogist / Add_the_Wifi_Profile.cmd
Last active May 15, 2023 21:17
Map Wifi network via CMD
netsh wlan add profile filename="C:\path\to\network.xml"
@Techlogist
Techlogist / 7ZipDefault.bat
Last active July 20, 2024 09:22
This batch script set 7-Zip as the default application to open the specified compressed file extensions.
REM License: GNU General Public License v2.0
REM Author: Miguel
REM Website: www.techlogist.net
REM Post: https://techlogist.net/scripts-terminal/batch/how-to-set-7zip-as-the-default-application-to-open-certain-compressed-files-type-via-script/
REM Description: This script makes 7Zip the default app for the following extensions:
REM .7z, .zip, .rar, .gz, .tgz, .tar
REM OS/Language/Region: Windows/EN-US
REM Notes:
REM 1) Does not require administrator rights to make changes for current logged in user but displays "Access Denied"
REM 2) If ran as administrator will change for all users.
@Techlogist
Techlogist / AD_computer_group_membership.ps1
Last active November 28, 2021 12:33
Export all Active Directory computers group membership
foreach ($computer in (Get-ADComputer -Filter 'enabled -eq "True"')){foreach ($group in (Get-ADPrincipalGroupMembership (Get-ADComputer $computer))){ $computer.name+";"+$group.name|Out-File -Append .\Desktop\OUT-VLAN.txt}}
@Techlogist
Techlogist / Auto_FreeFileSync_W10_Startup.bat
Last active October 3, 2021 12:28
Free File Sync automatically during Windows 10 startup
REM License: GNU General Public License v2.0
REM Author: Miguel
REM Website: www.techlogist.net
REM Post: https://techlogist.net/batch/
REM Description:
REM OS/Language/Region: Windows/EN-US
REM IMPORTANT : Always place the script at the startup folder for the user
REM IMPORTANT : ie: C:\Users\%miguel%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
REM IMPORTANT : Replace %miguel% with the correct username
REM IMPORTANT : Add the path to each .ffs_batch in the :_run label
@Techlogist
Techlogist / CheckSum7Zip.bat
Last active October 3, 2021 12:29
Confirm if two folders are identical with Batch
REM License: GNU General Public License v2.0
REM Author: Miguel
REM Website: www.techlogist.net
REM Post: https://techlogist.net/batch/confirm-if-two-folders-are-identical-with-batch/
REM Description: This script will compare if 2 files or folders are identical by calculating their hashes in SHA-256 using 7-Zip
REM OS/Language/Region: Windows/EN-US
:_start
REM Start of script
@echo off
@Techlogist
Techlogist / Wake-On-LAN_list_in_text_file.bat
Last active October 3, 2021 12:30
Wake-On-LAN from a list in a text file
REM License: GNU General Public License v2.0
REM Author: Miguel
REM Website: www.techlogist.net
REM Post: https://techlogist.net/uncategorised-en/wake-on-lan-from-a-list-in-a-text-file/
REM Description: Tries to wake all computers from a list in a TXT file
REM ATTENTION: Its recommeded to have a static IP
REM OS/Language/Region: Windows/EN-US
:_start
REM Start of script
@Techlogist
Techlogist / Wake-On-LAN-muiltiple-computers.bat
Last active September 3, 2024 00:27
Wake-On-LAN multiple computers at once!
REM License: GNU General Public License v2.0
REM Author: Miguel
REM Website: www.techlogist.net
REM Post: https://techlogist.net/batch/wake-on-lan-multiple-computers-at-once/
REM Description: Wakes up the computers on LAN
REM OS/Language/Region: Windows/EN-US
REM Links for the application you need:
REM https://www.depicus.com/wake-on-lan/wake-on-lan-cmd
:_start
@Techlogist
Techlogist / Map_drives.ps1
Created February 7, 2021 15:11
How to map drives and folders with Powershell?
$New_Folder_Path="c:\Folderoo2"
$Share_Name="Name"
$Domain="Domain"
$USername="SamAccountname"
New-Item $New_Folder_Path –type directory
New-SMBShare –Name $Share_Name –Path $New_Folder_Path –FullAccess "$Domain\$USername"
@Techlogist
Techlogist / Upload_files_to_FTP.ps1
Last active October 3, 2021 12:30
Uploading files to a FTP with Powershell
# License: GNU General Public License v2.0
# Author: Miguel
# Website: www.techlogist.net
# Post: https://techlogist.net/powershell/uploading-files-to-a-ftp-with-powershell/
# Description: Uploading files to a FTP with Powershell
# OS/Language/Region: Windows/EN-US
# Example of powershell report output to a report in HTML and upload to FTP
# Set the output and FTP file folder
@Techlogist
Techlogist / Output_Powershell_reports_in_HTML.ps1
Last active October 3, 2021 12:31
How to output Powershell reports in HTML?
# License: GNU General Public License v2.0
# Author: Miguel
# Website: www.techlogist.net
# Post: https://techlogist.net/powershell/how-to-output-powershell-reports-in-html/
# Description: Example of powershell report output to a report in HTML. Set the ports which will not be checked
# OS/Language/Region: Windows/EN-US
$NARemotePort="0"
$NARemoteAddress="::","127.0.0.1"
$Array=""