This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Get nameservers | |
| dig github.com NS +short | |
| #Dig specific nameserver | |
| dig @ns-1283.awsdns-32.org github.com +short | |
| #Get mail servers | |
| dig github.com MX +short | |
| #Reverse lookup | |
| dig -x 192.30.255.112 +short | |
| #Get zone records NS,MX,TXT,ttl, and SOA | |
| dig +nocmd +multiline +noall +answer any github.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| robocopy <local source path> <remote target path> /MT /MIR /FFT /Z /XA:H /W:5 /R:5 /log:<log file path> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #install cifs utils for SMB mount | |
| sudo apt install cifs-utils | |
| #mount SMB share | |
| sudo mkdir /mnt/share_name | |
| sudo mount -t cifs //server/share /mnt/share_name -o user=username,domain=domain_name | |
| #start snowball client | |
| snowball start -i snowball_ip -m snowball_manifest.bin -u user_key | |
| #copy to snowball in background | |
| nohup snowball cp -r /mnt/share_name s3://bucket/dir & | |
| #stop snowball client |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <QueryList> | |
| <Query Id="0" Path="Security"> | |
| <Select Path="Security">* [EventData[Data[@Name='subjectUsername']='user']]</Select> | |
| </Query> | |
| </QueryList> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rclone sync /local_directory remote:bucket/directory -P | |
| rclone check /local_directory remote:bucket/directory -P --size-only |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Get-ADComputer -SearchBase “OU=company,DC=domain,DC=com” -Filter {Enabled -eq $true} -Properties CanonicalName | Group-Object {Split-Path $_.CanonicalName} | FT -Property Count, Name -AutoSize |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Export Windows DHCP server configuration | |
| Export-DhcpServer -ComputerName "dhcp1.company.com" -File "C:\exports\dhcp-config.xml" | |
| # Import Windows DHCP server configuration | |
| Import-DhcpServer -ComputerName "dhcp2.company.com" -File "C:\exports\dhcp-config.xml" -BackupPath "C:\dhcpbackup\" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ssh-keygen -l -f id_rsa | |
| ssh-keygen -l -f id_rsa.pub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /bin/rm -v /etc/ssh/ssh_host_* | |
| dpkg-reconfigure openssh-server | |
| systemctl restart ssh |
NewerOlder