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
# Recursivly search for a specific file in all users home folders | |
import glob | |
for f in glob.iglob('/Users/*/Library/Preferences/com.apple.spaces.plist'): | |
print f |
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
New-ADUser -SamAccountName <userName> -GivenName <firstName> -SurName <lastName> -Name "<firstName> <lastName>" -DisplayName "<firstName> <lastName>" -UserPrincipalName <userName>@<domain> -ChangePasswordAtLogon $true -AccountPassword (ConvertTo-SecureString <password> -AsPlainText -force) -Enabled $True -PasswordNeverExpires $False -PassThru -Path "OU=<ou>,OU=<path>,DC=<domain>,DC=<path" |
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-ADOrganizationalUnit -filter * -SearchBase "DC=<domain>,dc=<path>” | ft distinguishedname |
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
dsconfigldap -r <ServerAddress> |
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
dscl localhost -list /LDAPv3 |
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
systemsetup -setnetworktimeserver time.apple.com | |
systemsetup -setusingnetworktime on | |
systemsetup -settimezone America/Anchorage |
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
system_profiler SPSoftwareDataType | grep "System Version" |
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
stat -f%Su /dev/console |
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
ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p' |
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
scutil --get ComputerName |
OlderNewer