This file contains 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
## | |
## Arch Linux repository mirrorlist | |
## | |
Server = https://mirror.archlinux.no/$repo/os/$arch | |
Server = http://mirror.archlinux.no/$repo/os/$arch | |
Server = https://mirror.neuf.no/archlinux/$repo/os/$arch | |
Server = http://mirror.neuf.no/archlinux/$repo/os/$arch | |
Server = http://archlinux.uib.no/$repo/os/$arch | |
Server = http://mirror.terrahost.no/linux/archlinux/$repo/os/$arch |
This file contains 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 | |
git clone --bare https://github.com/jd-raymaker/dotfiles.git $HOME/.cfg | |
function config { | |
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@ | |
} | |
mkdir -p .config-backup | |
config checkout | |
if [ $? = 0 ]; then | |
echo "Checked out config."; | |
else |
This file contains 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-ADGroupMember -Identity "AD Group Name" | ForEach-Object { Get-ADUser -Identity $_.SamAccountName | select name,SamAccountName,UserPrincipalName } |
This file contains 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
#No need to replace any variables. Copy and paste, then enter the search string. | |
#Supports wildcards anywhere. Example: *somegroup* | |
$search = Read-Host "Search for AD Group"; Get-ADGroup -Filter {Name -like $search} | Select name |
This file contains 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
#No need to replace any variables. Just copy and paste this into your Powershell, then enter the username you wish to get the last logon time from | |
$username=Read-Host "Enter username"; $user=Get-ADUser -Identity $username | Get-ADObject -Properties LastLogon; [DateTime]::FromFileTime($user.LastLogon) |