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
| for ((i=1; i<=57; i++)); do printf "D%05dL6\n" $i; done | \ | |
| barcode -u mm -t 3x20 -g 79x17 -o label.ps -e code39 -p 210x297 -m 3,2 -c |
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
| for i in {a/{aa,ab,ac},b/{ba,bb,bc/{bca,bcb}},c}; do mkdir -p z/$i/{z1,z2}; done |
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
| ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' |
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
| grep group_name /etc/group | cut -d: -f4 | sed -e 's/,/\n/g' | wc -l |
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
| #Check Bitlocker status of OS Disks | |
| $laptops = (Get-ADComputer -SearchBase 'OU=Laptops,OU=EMEA,dc=contoso,dc=com' -Filter '*' | Select -Exp Name) | |
| $Table = @() | |
| $Row = @{ | |
| "LaptopName" = "" | |
| "OSdisk" = "" | |
| } | |
| Foreach($CN in $laptops) |
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
| #copy membership: | |
| Get-ADUser -Identity (read-host 'Copy form User') -Properties memberof | Select-Object -ExpandProperty memberof | Add-ADGroupMember -Members (read-host 'Copy to User') -PassThru | Select-Object -Property SamAccountName | |
| #find who is logged on | |
| gwmi -computername fancylaptop -class win32_computersystem -property username | select UserName | |
| #list printers | |
| Get-WMIObject Win32_Printer -ComputerName fancylaptop | |
| #get rsop: |
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
| for i in `grep -E grp[_a-z]+_aa /etc/group|cut -f1 -d:` ; do usermod-A $i username; done |
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
| netstat -tnpa | grep ESTABLISHED.*sshd |
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/bash | |
| DAT=$( date +%Y%m%d%H%M ) | |
| printf "\n-----\CLIENTNAME GRP REPORT ${DAT}\n-----\n" > AUDIT_${DAT}.TXT | |
| cat /etc/group | cut -d: -f1,4 | grep -E clientname_[a-z]+_ | sort | column -t -s: >> AUDIT_${DAT}.TXT | |
| printf "\n\n-----\nCLIENTNAME ACL REPORT ${DAT}\n-----\n" >> AUDIT_${DAT}.TXT | |
| find /SFTP_ROOT/CLIENTNAME/ -maxdepth 4 -type d -exec getfacl --tabular --omit-header --absolute-names {} \; >> AUDIT_${DAT}.TXT |
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 source destination /E /ZB /DCOPY:T /COPYALL /R:1 /W:1 /V /TEE /LOG:Robocopy.log |