Skip to content

Instantly share code, notes, and snippets.


Russom Woldezghi russom-woldezghi

View GitHub Profile
View csv-to-json.php
* Converts CSV to JSON
* Example uses Google Spreadsheet CSV feed
* csvToArray function I think I found on
header('Content-type: application/json');
// Set your CSV feed
View index.html
<!DOCTYPE html>
<title>jQuery Slider</title>
<!-- jQuery -->
<script src=""></script>
<script type="text/javascript" src="slider.js"></script>
<!--CSS -->
<link href="style.css" rel="stylesheet" media="screen">
russom-woldezghi / update.ps1
Created Feb 1, 2013
Update Active Directory users using PowerShell from .csv file (without using Quest).
View update.ps1
Import-Module ActiveDirectory
$USERS = Import-CSV c:\scripts\usersupdate.csv
Set-ADUSer -Identity $_.samaccountname -TelephoneNumber $_.TelephoneNumber -scriptPath $_.LoginScript -homeDirectory $_.HomeDirectory -title $_.JobTitle -department $_.Department -telephoneNumber $_.WorkPhone
-facsimileTelephoneNumber $_.Fax -office $_.Office -streetAddress $_.StreetAddress -l $_.City -st $_.State -postalCode $_.PostalCode -c $_.Country -company $_.Company -manager $_.ManagerAdspath }
russom-woldezghi / update_users.ps1
Created Feb 1, 2013
PoweShell script to batch update Active Directory User accounts from .csv file (using Quest)
View update_users.ps1
Import-CSV "c:\Path\to\file\usersupdate.csv" |
ForEach-Object {Set-QADUSer $_.SamAccountName -scriptPath $_.LoginScript -homeDirectory $_.HomeDirectory -title $_.JobTitle -department $_.Department -office $_.Office -streetAddress $_.StreetAddress -l $_.City -State $_.State -postalCode $_.PostalCode -company $_.Company -Manager $_.ManagerAdspath }
russom-woldezghi / all_contacts.bat
Created Feb 1, 2013
Export Active Directory contacts to a .txt file using firstname, lastname, mail, etc.
View all_contacts.bat
dsquery * domainroot -filter "(&(objectCategory=Contact)(objectClass=Contact))" -attr cn displayName givenName sn mail canonicalName distinguishedName legacyExchangeDN -limit 0 > "C:\Path\to\all_contacts.txt"
russom-woldezghi / all_users.bat
Created Feb 1, 2013
Export Active Directory users accounts details such as email, username, objectid, etc.
View all_users.bat
dsquery * domainroot -filter "(&(objectCategory=Person)(objectClass=User))" -attr cn displayName givenName sn userPrincipalName sAMAccountName mail ProfilePath scriptPath homeDrive homeDirectory uniqueMember canonicalName distinguishedName objectSid legacyExchangeDN description -limit 0 > "C:\Path\to\files\All_Users.txt"
russom-woldezghi / customloginbg.bat
Last active Dec 12, 2015
Save as a bat file and set BackgroundImageYouWantToUse to the location of the image you want to use.
View customloginbg.bat
@echo off
REG ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Authentication\LogonUI\Background /t REG_SZ /v OEMBackground /d 1 /f
mkdir %windir%\system32\oobe\info
mkdir %windir%\system32\oobe\info\backgrounds
copy C:\path\to\custombg %windir%\system32\oobe\info\backgrounds\backgroundDefault.jpg