Skip to content

Instantly share code, notes, and snippets.

View supermarsx's full-sized avatar
💫

Mariana M supermarsx

💫
View GitHub Profile
@supermarsx
supermarsx / setHostname.sh
Created December 26, 2023 18:55
Set hostname with hostnamectl
hostnamectl set-hostname <newhostname>
@supermarsx
supermarsx / wazuhIndexerChangeAllPasswords.sh
Last active December 27, 2023 17:34
Wazuh indexer change all passwords
apt update
apt install curl -y
cd /usr/share/wazuh-indexer/plugins/opensearch-security/tools/
chmod +x ./wazuh-passwords-tool.sh
./wazuh-passwords-tool.sh --change-all
@supermarsx
supermarsx / viewAllRunningServices.sh
Created December 25, 2023 22:59
View all running services with systemctl
systemctl --type=service --state=running
@supermarsx
supermarsx / disableCockpitMotd.sh
Created December 25, 2023 22:56
Disable cockpit motd
ln -sfn /dev/null /etc/motd.d/cockpit
@supermarsx
supermarsx / repairSafeModeLoop.cmd
Last active November 19, 2023 11:15
Resolve startup repair loop on Windows safe mode
bcdedit /set {default} recoveryenabled no
@supermarsx
supermarsx / clearExchangeOwaSearchQuery.ps1
Created November 6, 2023 17:38
Exchange clear search query history OWA, Exchange Management Shell
Remove-MailboxUserConfiguration -Mailbox [email protected] -Identity Configuration\IPM.Configuration.Search.QueryHistoryInput
Remove-MailboxUserConfiguration -Mailbox [email protected] -Identity Configuration\IPM.Configuration.OWA.AutocompleteCache
Remove-MailboxUserConfiguration -Mailbox [email protected] -Identity Configuration\IPM.Configuration.Search.TopN
Remove-MailboxUserConfiguration -Mailbox [email protected] -Identity Configuration\IPM.Configuration.OWA.ViewStateConfiguration
@supermarsx
supermarsx / testSmbclient.sh
Created November 6, 2023 16:04
Test smb access to windows network share using smbclient
smbclient -L "//NETWORKIP/NETWORKSHARE" -U "DOMAIN\USER%PASSWORD" -m SMB2
@supermarsx
supermarsx / moveMailboxToTargetDatabase.ps1
Created November 6, 2023 16:00
Exchange move one mailbox to target database, Exchange Management Shell
New-MoveRequest -Identity [email protected] -TargetDatabase TARGETDATABASE
@supermarsx
supermarsx / moveAllMailboxesToTargetDatabase.ps1
Created November 6, 2023 15:58
Exchange move all mailboxes from one database to another, Exchange Management Shell
Get-Mailbox -Database ORIGINDATABASE -ResultSize Unlimited | New-MoveRequest -TargetDatabase TARGETDATABASE
@supermarsx
supermarsx / winTimeFix.bat
Created November 6, 2023 15:56
Windows Time update fix for PT
w32tm.exe /config /manualpeerlist:"3.pt.pool.ntp.org 1.europe.pool.ntp.org 3.europe.pool.ntp.org" /syncfromflags:manual /reliable:YES /update