<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5506763728066602258</id><updated>2024-08-28T20:41:26.911-04:00</updated><category term="Google Apps"/><category term="Scripts"/><category term="Active Directory"/><category term="SCCM"/><category term="Blogger Dynamic Views"/><category term="Chrome"/><category term="FirstClass"/><category term="Java"/><category term="Printing"/><category term="Server Backup"/><category term="Syntax Highlighter"/><category term="ThinStation"/><category term="WDS"/><title type='text'>Tech Blog</title><subtitle type='html'>This blog is about various tech issues and projects.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-3725056067005621030</id><published>2014-01-27T11:54:00.000-05:00</published><updated>2014-01-27T11:54:34.476-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="SCCM"/><category scheme="http://www.blogger.com/atom/ns#" term="Scripts"/><title type='text'>UAC prompt for users after Chrome Update</title><content type='html'>Hello all,&lt;br /&gt;
I migrated my deployments to SCCM a few months ago, and every time I pushed out a chrome update several users would get a UAC prompt each time they open Chrome. &lt;br /&gt;
&lt;br /&gt;
I identified the problem; the users were opening chrome during the installation, so the installation tried to complete the next time they opened chrome. &lt;br /&gt;
Chrome does this by naming the new version&lt;br /&gt;
&lt;br /&gt;
&quot;new_chrome.exe&quot;&lt;br /&gt;
&lt;br /&gt;
This file is then moved to chrome.exe, but the standard user does not have permission to do this and gets UAC prompt. &lt;br /&gt;
&lt;br /&gt;
I have built in a few checks to the deployment process to prevent this. &lt;br /&gt;
I have added the version number to the detection method for chrome.exe. &lt;br /&gt;
In the screen shot below we have the MSI detection then two detection for chrome.exe with the current version. &lt;br /&gt;
One is for program files and the other is for program files (x86). &lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidRyU5CYbCSDbO244YxN1RjaSWlgne35z1yKBQJjtLZgRCYDmswAzytdLRHDaXwAPkFrM40UoUx_PRcODdRaD5PtbtWlh4SotDkqzOHfpBvzEY4XOaEXNNHHgi3wxmpxrW8RUQGoBeIKI/s1600/chromedetection.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidRyU5CYbCSDbO244YxN1RjaSWlgne35z1yKBQJjtLZgRCYDmswAzytdLRHDaXwAPkFrM40UoUx_PRcODdRaD5PtbtWlh4SotDkqzOHfpBvzEY4XOaEXNNHHgi3wxmpxrW8RUQGoBeIKI/s1600/chromedetection.PNG&quot; height=&quot;265&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have also changed the deployment method from msi to script and use the following script to install Chrome. &lt;br /&gt;
First I kill any chrome process then install the browser. &lt;br /&gt;
Then I kill chrome again if the user has opened it and check the existence of new_chrome.exe&lt;br /&gt;
If the file exists I delete the older version of chrome and replace it with the new one. &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:plain&quot; title=&quot;chromeinstall.bat&quot;&gt;taskkill /f /im chrome.exe

msiexec.exe /i &quot;GoogleChromeStandaloneEnterprise.msi&quot; ALLUSERS=1 /q /norestart

IF EXIST &quot;%programfiles%\Google\Chrome\Application\new_chrome.exe&quot; GOTO X86

IF EXIST &quot;%ProgramFiles(x86)%\Google\Chrome\Application\new_chrome.exe&quot;  GOTO X64

exit

:X86
cd %programfiles%\Google\Chrome\Application

taskkill /im chrome.exe /f
ping -n 2 127.0.0.1
del chrome.exe /q
move new_chrome.exe chrome.exe

exit


:X64
cd %ProgramFiles(x86)%\Google\Chrome\Application
taskkill /im chrome.exe /f
ping -n 2 127.0.0.1
del chrome.exe /q
move new_chrome.exe chrome.exe

exit

&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This has greatly reduced the number of support calls I get after a chrome update, I hope it helps you as well. &lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/3725056067005621030/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2014/01/uac-prompt-for-users-after-chrome-update.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3725056067005621030'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3725056067005621030'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2014/01/uac-prompt-for-users-after-chrome-update.html' title='UAC prompt for users after Chrome Update'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEidRyU5CYbCSDbO244YxN1RjaSWlgne35z1yKBQJjtLZgRCYDmswAzytdLRHDaXwAPkFrM40UoUx_PRcODdRaD5PtbtWlh4SotDkqzOHfpBvzEY4XOaEXNNHHgi3wxmpxrW8RUQGoBeIKI/s72-c/chromedetection.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-5642178267016287301</id><published>2014-01-27T11:17:00.001-05:00</published><updated>2014-01-27T11:17:44.956-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Java"/><category scheme="http://www.blogger.com/atom/ns#" term="SCCM"/><title type='text'>Java 7u51 exception.sites deployment</title><content type='html'>Hello all,&lt;br /&gt;
Today I’ll outline how to deploy Java’s new exception sites settings for 1.7 update 51.&lt;br /&gt;
Normally the exception.sites file is a per user setting. &amp;nbsp;However we would like to deploy site exceptions to everyone.&lt;br /&gt;
I use SCCM to deploy Java, and it’s configuration files. &amp;nbsp;I have a separate application in SCCM just for deploying updated configuration files, but this can be done with GPP or logon script too. &amp;nbsp;Use the method that works best for your environment.&lt;br /&gt;
There are three files needed&lt;br /&gt;
Deployment.config &amp;nbsp;Java system level configuration file&lt;br /&gt;
Deployment.properties Java deployment properties&lt;br /&gt;
Exception.sites file containing the url exceptions&lt;br /&gt;
&lt;br /&gt;
All three of these files should be in&lt;br /&gt;
C:\WINDOWS\Sun/Java\Deployment\&lt;br /&gt;
&lt;br /&gt;
Here is a batch file I use to create the directory and copy the files&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:plain&quot; title=&quot;copyfiles.bat&quot;&gt;mkdir %SystemRoot%\Sun\Java\Deployment
copy deployment.config %SystemRoot%\Sun\Java\Deployment\ /Y
copy deployment.properties &amp;nbsp;%SystemRoot%\Sun\Java\Deployment\ /Y
copy exception.sites %SystemRoot%\Sun\Java\Deployment\ /Y&lt;/pre&gt;
&lt;br /&gt;
The deployment config file points to the location of the deployment properties file&lt;br /&gt;
&lt;pre class=&quot;brush:plain&quot; title=&quot;deployment.config&quot;&gt;deployment.system.config=file\:C\:/WINDOWS/Sun/Java/Deployment/deployment.properties
deployment.system.config.mandatory=true

&lt;/pre&gt;
The deployment properties file contains several deployment options including the location of the exception.sites file and security level.




&lt;br /&gt;
&lt;pre class=&quot;brush:plain&quot; title=&quot;deployment.properties&quot;&gt;deployment.user.security.exception.sites=C\:/WINDOWS/Sun/Java/Deployment/exception.sites
deployment.browser.vm.iexplorer.locked
deployment.browser.vm.iexplorer=true
deployment.browser.vm.mozilla.locked
deployment.browser.vm.mozilla=true
deployment.expiration.check.enabled=false
deployment.security.level=HIGH
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
The exception.sites file is a list of urls one per line&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:plain&quot; title=&quot;exception.sites&quot;&gt;http://excemple.com
https://domain.com
&lt;/pre&gt;
&lt;br /&gt;
For full details on available deployment properties, and the format of the exception.sites list see the following oracle documentation&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://docs.oracle.com/javase/7/docs/technotes/guides/deployment/deployment-guide/properties.html&quot; target=&quot;_blank&quot;&gt;Deployment Properties&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;a href=&quot;https://blogs.oracle.com/java-platform-group/entry/upcoming_exception_site_list_in&quot; target=&quot;_blank&quot;&gt;Exception Sites&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I hope this has helped you deploy the new java update, thanks for reading. </content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/5642178267016287301/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2014/01/java-7u51-exceptionsites-deployment.html#comment-form' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/5642178267016287301'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/5642178267016287301'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2014/01/java-7u51-exceptionsites-deployment.html' title='Java 7u51 exception.sites deployment'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-6517815481021868753</id><published>2013-03-10T11:56:00.000-04:00</published><updated>2013-03-10T17:07:34.672-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Scripts"/><category scheme="http://www.blogger.com/atom/ns#" term="Server Backup"/><title type='text'>wbadmin Backup Script</title><content type='html'>Hello all,

I’m back with another script. &amp;nbsp;This script will allow for multiple server backups to a network share. &amp;nbsp;The wbadmin tool does not allow for incremental / differential backups to a network location. &amp;nbsp;It takes a full backup every time you run it, overwriting the previous backup. &amp;nbsp; One method to get around this limitation is to point the backup to a different location each time it runs. &amp;nbsp;This is what my script does.





&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Map a drive to the backup server&lt;/li&gt;
&lt;li&gt;Create a folder for the computer name and subfolder with the current date&lt;/li&gt;
&lt;li&gt;Create a log file in the folder&lt;/li&gt;
&lt;li&gt;Run wbadmin pointing it to the current date folder&lt;/li&gt;
&lt;li&gt;Email a report when complete&lt;/li&gt;
&lt;/ul&gt;
At this point you need to manually clean up the old backups, but I’ll be working on a solution to that. 



In the script you need to set the backup location, smtp server and email address.&lt;br /&gt;
&lt;br /&gt;
You may want to add -include:driveletter to the argument list for wbadmin if you need to backup&amp;nbsp;additional&amp;nbsp;drives. 



This script will work on any system with wbadmin, I have tested on windows 7/8 and server 2008/2008r2/2012. &lt;br /&gt;
It should also work on vista, but I haven&#39;t&amp;nbsp;tested it there. &amp;nbsp;You will need to make sure the windows server backup feature is installed on the machine.&lt;br /&gt;
&amp;nbsp;Now schedule the script to run with task scheduler and wait for the report.&lt;br /&gt;
&amp;nbsp;Thanks for reading.





&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;color: red;&quot;&gt;Note: The brtag puts line&amp;nbsp;breaks&amp;nbsp;in the html email report, but also put line breaks in the code below. So that there were not line breaks in the wrong place I changed &amp;lt;br&amp;gt; to brtag in the script be. &amp;nbsp;Replace all instaces of brtag with &amp;lt;br&amp;gt; for the script to work properly. &lt;/span&gt;&amp;nbsp;&lt;/blockquote&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre caption=&quot;backup.ps1&quot; class=&quot;brush:ps&quot;&gt;#script will backup computer to backup location
clear
$date = get-date -UFormat %Y-%m-%d
$comp = gc env:computername
$share = &#39;\\backupserver\backupshare&#39;
$folder = $share + &#39;\&#39;  +$comp + &#39;\&#39; + $date + &#39;\&#39;
$log = $folder + $comp + &#39;.log&#39;

# Map share
try{
$mapprocess = start -Wait  net -ArgumentList  &quot;use  i: $share backupuserpassword /USER:backupuser&quot; -PassThru  -NoNewWindow
$mapcode = $mapprocess.exitcode 
if ($mapcode  -ne 0 ){
$result = &quot;$result brtag Computer $comp FAILED to map drive brtag with error code $mapcode brtag brtag&quot;
}}
catch [exception] {
$result = &quot;$result brtag Computer $comp FAILED to map drive brtag brtag&quot;
}

#create backup folder
try {
if ( ! (Test-Path  -Path $folder ) ){
New-Item  -Path $folder  -ItemType Directory -ErrorAction Stop
}}
catch [exception] {
$result = &quot;$result brtag Computer $comp FAILED to create folder brtag brtag&quot;
}
# create log file
try {
if ( ! (Test-Path  -Path $log ) ){
New-Item  -Path $log   -ItemType File -ErrorAction Stop
}}
catch [exception] 
{
$result = &quot;$result brtag Computer $comp FAILED to create log file brtag brtag&quot;
}
$start = Get-Date 
$process = start -Wait  wbadmin.exe -ArgumentList &quot;start backup -backuptarget:$folder -allCritical  -quiet&quot; -PassThru -NoNewWindow -RedirectStandardOutput $log 
$code = $process.exitcode 
if ($code  -eq 0 ){
$end = Get-Date 
$result = &quot;$result backup complete on $comp, user $user brtag Started: $start brtag  Ended: $end brtag brtag&quot;
$status = &quot;good&quot;
start net -ArgumentList &quot;use i: /delete /Y&quot; -NoNewWindow  
}
else { 
$end = Get-Date 
$result= &quot;$result Backup Failed on $comp, brtag Started: $start brtag  Ended: $end  brtag brtag&quot;
$status = &quot;BAD&quot; }
$loghtmlfile = $log + &#39;.html&#39;
$File = Get-Content $log 
$FileLine = @()
Foreach ($Line in $File) {
 $MyObject = New-Object -TypeName PSObject
 Add-Member -InputObject $MyObject -Type NoteProperty -Name backupstatus -Value $Line
 $FileLine += $MyObject
}
$FileLine | ConvertTo-Html -Property backupstatus | Out-File $loghtmlfile 
$loghtml = gc $loghtmlfile  
$result = &quot;$result $loghtml&quot;
#Setup Email Report
$mail = New-Object system.net.Mail.MailMessage 
$mail.From  = &quot;BackupScript@yourdomain.local&quot;
$mail.To.add(&quot;youremail@yourdomain.local&quot;)
$mail.Subject = &quot;Backup Script Results $status $comp $date&quot;
$smtp = new-object system.Net.Mail.SmtpClient(&quot;your.smtp.server&quot;)
$mail.IsBodyHtml = &quot;True&quot;
$mail.body = $result  
$smtp.send($mail)
&lt;/pre&gt;
</content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/6517815481021868753/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2013/03/wbadmin-backup-script.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/6517815481021868753'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/6517815481021868753'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2013/03/wbadmin-backup-script.html' title='wbadmin Backup Script'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-3568545833508323638</id><published>2012-10-24T10:29:00.002-04:00</published><updated>2012-10-24T10:52:58.649-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Active Directory"/><category scheme="http://www.blogger.com/atom/ns#" term="Scripts"/><title type='text'>Add Users Script</title><content type='html'>&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Hello everyone, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;I have had a few people ask about my script for creating
user accounts, and thought I would share. This script is customized for my
environment, and you will have to edit it to fit your domain. Thoroughly test
in your environment first I am not responsible if something goes wrong. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;What does this script
do? &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Retrieve a csv file of user information from an ftp server &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Read the csv file and create users &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;If the user is in CSV but not AD they must be new create
account &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;If the user is in AD but not CSV they must have withdrawn
disable account &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;If the user is in CSV but their AD account is disabled, they
are a returning student enable account &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;If the internet field is blank no AUP disable account &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;If they later turn it in re enable the account. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;The month of august is a grace period where this check is
ignored.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;If a student’s name changes, rename account and user folder.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;If a student &lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;changes
year groups their files and account are moved to the new year group OU and
folder. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Call the GADS script to sync with Google Apps &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Email a report of all changes made. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;How this script works
and what you need to do.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;b style=&quot;mso-bidi-font-weight: normal;&quot;&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;My Environment&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;I do not collect student addresses in active directory, I
only use the city because Moodle requires a city.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;I use the postofficebox field to store the student ID number&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;I use the description field to store their year group
studentsxxxx this is important in determining if their year has changed.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;I write most of my notes in the web page field such as
account disabled by script.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Our elementary students have a separate password policy so there
is a separate default password for them in the script.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Usernames are generated to be last name + first initial +
last four of student ID Hyphenated names are truncated at the first hyphen. This
is coded into the script. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;There is a check box in power school to indicate if a
student has returned their AUP, if they do not have a signed AUP their account
is disabled until they do.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;I have an OU called groups were all groups are stored, each
student is put in a group called studentsxxxx The script does not create the
groups, OU’s or year group folders you must do this. The script does create the
user folders in the year group folders.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;We have a group
called general accounts, the script ignores accounts in this group.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;&lt;/span&gt;We have a group
called noiaf for students who do not have their AUP signed. They are put into
this group based on the value of the internet access field. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;We have a group called disabled, this is if you need to
manually disable a student account for some reason, the script will not re
enable accounts in this group.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;My OU and home drive directory structure is; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Students &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;GradYear &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Username &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Groups &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;Noiaf &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;General accounts &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;studentsxxxx &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;The schoolid field is an identifier assigned to each
building in powerschool, it is in the export file and I filter for it in the
script.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;I filter out the electronic
building (students the school is required to track but not actually in our
buildings, so they do not need accounts).&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp;
&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;My most recent changes, so not fully tested, is to evaluate
based on student ID instead of name. This allows me to detect name changes and
rename accounts as opposed to disabling one and creating a new one. The script
used to search for existing students based on samaccountname.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;This was changed in the most recent
version.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;I recommend using something
like bulk AD users to populate postofficebox field or modify the script to
search by samaccountname again.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Some of the code could use a cleanup and there are places I
should have used variables, but it works. Some of the paths are hard coded you
will have to change them or use the same directory structure.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;o:p&gt;&lt;span style=&quot;font-family: Calibri;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Here are some rough notes on what you need to change for
your environment. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;You will need Quest&#39;s Active directory cmdlets for this script to work.&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Create the OU and home drive directory structure &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Enter ftp ip &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Enter domain information &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Enter your default password for new accounts, and default password for elementary accounts. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Enter email information &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Edit header information to match your CSV &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Enter your school name on the new user line &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Edit the elementary year&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;&lt;/li&gt;
&lt;li&gt;&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Modify any other variables I missed, or that you want set differently &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Here are the scripts, I hope they help you to automate your
user account process. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;Again I am not responsible for any damages, use at your own
risk and test in your lab environment thoroughly.&lt;span style=&quot;mso-spacerun: yes;&quot;&gt;&amp;nbsp; &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot; style=&quot;margin: 0in 0in 10pt;&quot;&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;==========================================&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/div&gt;
Add users powershell script &lt;br /&gt;
&lt;br /&gt;
&lt;pre caption=&quot;addusers.ps1&quot; class=&quot;brush:ps&quot;&gt;clear
#This script will add users to active directory based on a csv file it retrives from ftp
#If the user is in the csv but not AD the account is created
#If the user is in AD, but not the CSV the account is disabled.
#If the user&#39;s name changes they will be renamed.
#If the users grade changes they will be moved, alog with their home directory.
#This will send an email report of all chnges. 

#Function list

function ftpexport {
#get ftp export.csv
cd c:\psscript
ftp -s:c:\psscript\ftpcmd.txt -n enter ftp IP here
#end function
}

function report {
#send report

$table |Sort-Object -Property Action | Export-Csv &quot;c:\report.csv&quot; -NoTypeInformation
$table | Select-Object Name, Year, Action | Sort-Object Action | ConvertTo-Html | Out-File  c:\report.html 
$mail.IsBodyHtml = &quot;True&quot;
$body = $table | Select-Object Name, Year, Action |Sort-Object Action| ConvertTo-Html 
#$body = Get-Content c:\report.html 
$mail.body = $body 
$mail.Attachments.Add(&quot;c:\report.html&quot;)
$smtp.send($mail)
#END Function
}


#test for and load quest cmdlets
if (!(Get-PSSnapin -Name Quest.ActiveRoles.ADManagement )){Add-PSSnapin Quest.ActiveRoles.ADManagement }

#set constant vars
$domain =&quot;your.domains.fqdn&quot;;$nbdomain = &quot;yournbdomain&quot;; $edomain = &quot;@youremaildomain&quot;
$password = &quot;yourdefaultpassword&quot;
$homepathroot = &quot;\\yourserver\\yourshare\students&quot;;$homedrive = &quot;S:&quot;
#year for elementary students needs updated yearly 
$elemyear = 2019

#Setup Email Report
$mail = New-Object system.net.Mail.MailMessage 
$mail.From  = &quot;your from address&quot;
$mail.To.add(&quot;your email address&quot;)
$mail.Subject = &quot;Script Results&quot; #+ {get-date)
$mail.Body = $table 
$smtp = new-object system.Net.Mail.SmtpClient(&quot;your smtp server&quot;)

# Create Data Table for Reporting
$table = New-Object system.Data.DataTable &quot;Account Report&quot;
$table.Columns.Add(&quot;Name&quot;, [string]) | Out-Null ;$table.Columns.Add(&quot;Year&quot;,[string]) | Out-Null ;$table.Columns.Add(&quot;Action&quot;,[string]) | Out-Null 


#CSV Setup
#powerschool feild list 
@&quot;
last_name
first_name
student_number
grade_level
city
state
zip
schoolid
zz_Internet_Access_Allowed
&quot;@

ftpexport

$csvfile = &quot;C:\psscript\exportAD.csv&quot;
if ((Get-Content $csvfile ) -eq $null )
{
$row = $table.NewRow();$row.Name =&#39;Null File&#39;; $row.Year = &#39;check ftp&#39; ; $row.Action = &quot;export file is blank exit and check files &quot;
$table.Rows.Add($row)
report

Copy-Item  c:\psscript\exportAD.csv c:\psscript\$date-exportAD.csv
del c:\psscript\exportAD.csv
exit
}

#edit hearder information to match your CSV
$csvusers = import-csv  $csvfile -Header lastname,firstname,postofficebox,grade,City,State,PostalCode,schoolid,internet

#current Date
$date = Get-Date 

#Usernames are generated to be last name + first initial + last four of student ID
#Hyphenated names a truncated at the first hyphen.  

ForEach ($csvuser in $csvusers){
$a = $csvuser.postofficebox;$a = $a.substring($a.length - 4, 4)
$lastname = $csvuser.lastname.split(&quot;-&quot;)
$user = $lastname[0].tolower() + $csvuser.firstname.substring(0,1).tolower() + $a
$user = $user -replace &#39; &#39; ,&#39;&#39; 
if ($csvuser.schoolid -eq xxxx) {continue} #electronic building, enter school ID to exclude
if ($csvuser.grade -eq &quot;KG&quot;) {continue}
if ([int]$csvuser.grade -ge 13) {continue}
#if ([int]$csvuser.grade -lt 5) {continue} #Uncommnet to exclude elementary 

if ($date.month -lt 7 )
{
$year = (12 - [int]$csvuser.grade + $date.year)
}
else {$year = (12 - [int]$csvuser.grade + $date.year + 1)}

$parDN = $domain + &quot;/Students/&quot; + $year ;$userDN = $parDN + &quot;/&quot; + $user
$groupid= $domain + &quot;/groups/&quot; + &quot;Students$year&quot;
$dname = $csvuser.Firstname + &quot; &quot; + $csvuser.Lastname
$upn = $user+&quot;@&quot;+$domain; $email =$user+$edomain
$homepath = $homepathroot + &quot;\&quot; + $year + &quot;\&quot; + $user
$noiaf = $domain + &quot;/Groups/noiaf&quot;
#$renamed = $domain + &quot;/Groups/renamed&quot;
#Array of CSV user to  test AD users agaist
[array]$csvtest = $csvtest + $user
#chek if user is in AD
$quser = Get-QADUser -PostOfficeBox $csvuser.postofficebox
if ($quser.SamAccountName -eq $user)
{#user is in AD
#Grade period August
if ($date.month -ne 8){
#test for NO AUP
[string]$group = $quser.MemberOf 
if ($group -notlike  &quot;*noIAF*&quot; -and $csvuser.internet -eq &quot;&quot; ) {
Set-QADUser -Identity $user -WebPage &quot;Disabled No AUP&quot; -Fax &quot;NO AIF&quot;
Set-QADGroup -Identity $noiaf -Member @{append=@($user)}
Disable-QADUser -Identity $user  
$row = $table.NewRow();$row.Name =$quser.DisplayName ; $row.Year = $year ; $row.Action = &quot;NO AUP Account Disabled&quot;
$table.Rows.Add($row)
continue}}

# Disabled group if students are in this group script will ignore them

if ($quser.MemberOf -like &quot;*disabled*&quot;  ) {continue}

#check for disabled accout returning student
if ($quser.AccountIsDisabled -eq &quot;True&quot;){
#user is in AD with disabled account
#check for Internet AUP
if ($csvuser.internet -eq &quot;&quot;) 
#user does not have form skip to next user
{continue}
#Check for disabled accounts with allow internet
if ($group -like &quot;*noIAF*&quot;){
Set-QADUser -Identity $user -Fax &quot;&quot; -WebPage &quot;Enable has AUP&quot;
Set-QADGroup -Identity $noiaf -Member @{delete=@($user)}
Enable-QADUser -Identity $user 
$row = $table.NewRow();$row.Name =$quser.DisplayName ; $row.Year = $year ; $row.Action = &quot;Has AUP Account Enabled&quot;
$table.Rows.Add($row)
continue
}

#student account is enabled and active
Enable-QADUser -Identity $user 
Set-QADUser -Identity $user -WebPage &quot;returned vis script&quot;
#report Line
$row = $table.NewRow();$row.Name =$quser.DisplayName ; $row.Year = $year ; $row.Action = &quot;Returning Student Account Enabled&quot;
$table.Rows.Add($row)}


#Update User Info
#Update city
if ($quser.City -ne $csvuser.City){
set-QADUser -Identity $user  -City $csvuser.City  -PostalCode $csvuser.postalcode 
Add-QADGroupMember -Identity $groupid -Member $userdn
$row = $table.NewRow();$row.Name =$quser.DisplayName ; $row.Year = $year ; $row.Action = &quot;student info update to &quot; + $quser.City  
$table.Rows.Add($row)}

#uncommnet to update email for 6th graders
#if ($year -eq $elemyear){ Set-QADUser -Identity $user -Email $email }

#update year
$desc = $quser.Description 
$desc = $desc.substring($desc.length - 4, 4)
if ($desc -ne $year){
set-QADUser -Identity $user -Description &quot;Students$year&quot;
Add-QADGroupMember -Identity $groupid -Member $quser.DN 
Remove-QADMemberOf -Group  &quot;$domain/groups/Students$desc&quot; -Identity $quser.DN 
Move-Item $quser.HomeDirectory -Destination &quot;$homepathroot\$year\&quot; 
set-QADUser -Identity $user -HomeDirectory $homepath 
Move-QADObject -Identity $quser.DN -NewParentContainer &quot;$domain/students/$year&quot;
$row = $table.NewRow();$row.Name =$quser.DisplayName ; $row.Year = $year ; $row.Action = &quot;update Year From &quot; + $desc  
$table.Rows.Add($row)}

}

if ( $quser.samaccountname -eq $null)
{#Create User info
#Create AD account
New-QADUser -ParentContainer $parDN -Name $user -SamAccountName $user -LastName $csvuser.LastName -FirstName $csvuser.FirstName -City $csvuser.City -StateOrProvince $csvuser.State -PostalCode $csvuser.PostalCode -PostOfficeBox $csvuser.PostofficeBox -Description &quot;Students$year&quot;  -UserPassword $password -DisplayName $dname -UserPrincipalName $upn -Email $email -HomeDrive $homedrive -HomeDirectory $homepath -Company &quot;Your School Name&quot; 
Add-QADGroupMember -Identity $groupid -Member $userdn
Set-QADUser -Identity $user -UserMustChangePassword $true -ObjectAttributes @{c=&#39;US&#39;;userAccountControl=512;}
#if elementary password never expires and user can&#39;t change password
if ($year -gt $elemyear) 
{
Set-QADUser -Identity $user -UserMustChangePassword $false -PasswordNeverExpires $true  -UserPassword passwordforelem

}
$row = $table.NewRow();$row.Name = $dname ; $row.Year = $year ; $row.Action = &quot;New Student Account Created&quot;
$table.Rows.Add($row)
#folder info
if (!(test-path -path $homepath )){ 
#Create Home Directories
New-Item -ItemType directory $homepath
#Assign Access Rights
$account=$nbdomain + &quot;\&quot;+$user
$rights=[System.Security.AccessControl.FileSystemRights]::FullControl
$inheritance=[System.Security.AccessControl.InheritanceFlags]&quot;ContainerInherit,ObjectInherit&quot;
$propagation=[System.Security.AccessControl.PropagationFlags]::None
$allowdeny=[System.Security.AccessControl.AccessControlType]::Allow
$dirACE=New-Object System.Security.AccessControl.FileSystemAccessRule ($account,$rights,$inheritance,$propagation,$allowdeny)
$dirACL=Get-Acl $homepath
$dirACL.AddAccessRule($dirACE)
Set-Acl $homepath $dirACL
#Report Lne
$row = $table.NewRow();$row.Name =$dname ; $row.Year = $year ; $row.Action = &quot;Home Folder Created&quot;
$table.Rows.Add($row)}
continue
}

#updated name
if ($quser.samaccountname -ne $user ){

Move-Item -Path  $quser.HomeDirectory -Destination $homepath

Set-QADUser -Identity $quser.DN -SamAccountName $user -LastName $csvuser.LastName -FirstName $csvuser.FirstName -City $csvuser.City -StateOrProvince $csvuser.State -PostalCode $csvuser.PostalCode -PostOfficeBox $csvuser.PostofficeBox -Description &quot;Students$year&quot;  -DisplayName $dname -UserPrincipalName $upn -Email $email -HomeDrive $homedrive -HomeDirectory $homepath -Company &quot;your school name&quot; 
Rename-QADObject -Identity $quser.DN -NewName $user 

$row = $table.NewRow();$row.Name =$quser.DisplayName ; $row.Year = $year ; $row.Action = &quot;0Renamed  &quot;  + $user + $user.displayname 
$table.Rows.Add($row)
continue
}
}

#Get AD Users 
$ADusers = get-qaduser -sizelimit 3000 -SearchScope subtree -SearchRoot &quot;$domain/students&quot; 
echo &quot;ad loop&quot;
#Disable accounts not is CSV
foreach ($aduser in $ADusers){
if ($aduser.MemberOf -like &quot;*noiaf*&quot; -and $aduser.AccountIsDisabled -eq &quot;False&quot; ) 
#user does not have form disable account
{disable-QADUser -Identity $aduser.CanonicalName 
Set-QADUser -Identity $aduser.CanonicalName -WebPage &quot;Disabled by Script NO AUP&quot;

}
#if ($aduser.MemberOf -like &quot;*renamed*&quot; ){continue}


if ($csvtest -notcontains  $aduser.SamAccountName){
if ($aduser.AccountIsDisabled -eq &quot;True&quot;) {Continue}
if ($aduser.MemberOf -like &quot;*General Accounts*&quot;  ) {continue}
if ($aduser.MemberOf -like &quot;*disabled*&quot;  ) {continue}
disable-QADUser -Identity $aduser.CanonicalName 
Set-QADUser -Identity $aduser.CanonicalName -WebPage &quot;Disabled by Script&quot;
$year = $aduser.Description 

#Report Line
$row = $table.NewRow();$row.Name =$aduser.DisplayName ; $row.Year = $year  ; $row.Action = &quot;Withdrawn Student Account Disabled&quot;
$table.Rows.Add($row)}}

report
$date = get-date -UFormat %Y-%m-%d

Copy-Item  c:\psscript\exportAD.csv c:\psscript\$date-exportAD.csv
del c:\psscript\exportAD.csv
c:\GADS\gads.bat


&lt;/pre&gt;
ftpcmd.txt used in the ftpexport function
 class=&quot;brush:ps&quot;&amp;gt;

&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;USER ftpusername
ftppassword
get exportAD.csv
bye

&lt;/pre&gt;
GADS.bat called at the end to sync with Google Apps


&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;c:
cd &quot;C:\Program Files (x86)\Google Apps Directory Sync&quot;
sync-cmd.exe -c &quot;C:\GADS\gadsStudent.xml&quot; -a 

sync-cmd.exe -c &quot;C:\GADS\groups.xml&quot; -a

&lt;/pre&gt;
script to call the power shell script from a scheduled task 

&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;powershell -file c:\psscript\addusers.ps1
&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;http://dlehman.googlecode.com/hg/syntaxhighlight-blogger-dynamic/out/syntaxhighlighter.js&quot; type=&quot;text/javascript&quot;&gt;
&lt;/script&gt;


</content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/3568545833508323638/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2012/10/add-users-script.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3568545833508323638'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3568545833508323638'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2012/10/add-users-script.html' title='Add Users Script'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-3668029310215332744</id><published>2012-03-25T13:05:00.001-04:00</published><updated>2012-03-25T19:06:42.492-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Blogger Dynamic Views"/><category scheme="http://www.blogger.com/atom/ns#" term="Syntax Highlighter"/><title type='text'>Syntax Highlighter and Blogger Dynamic Views</title><content type='html'>I recently switched to Bloggers dynamic views, and lost use of Alex Gorbatchev’s syntax highlighter.&amp;nbsp; It took quite a bit of time but I got it working again.&amp;nbsp; Instead of rewriting what others I have I just want to thank them and provide links to their work.&amp;nbsp; &lt;br /&gt;
First Alex Gorbatchev for the Syntax Highlighter it’s self &lt;a href=&quot;http://alexgorbatchev.com/SyntaxHighlighter/&quot; title=&quot;http://alexgorbatchev.com/SyntaxHighlighter/&quot;&gt;http://alexgorbatchev.com/SyntaxHighlighter/&lt;/a&gt;&lt;br /&gt;
The crux framework blog &lt;a href=&quot;http://blog.cruxframework.org/2011/10/easy-code-syntax-highlight-on-blogger.html&quot; title=&quot;http://blog.cruxframework.org/2011/10/easy-code-syntax-highlight-on-blogger.html&quot;&gt;http://blog.cruxframework.org/2011/10/easy-code-syntax-highlight-on-blogger.html&lt;/a&gt;&lt;br /&gt;
The syntaxhighlight-blogger-dynamic project is what finally worked for me &lt;a href=&quot;http://code.google.com/p/syntaxhighlight-blogger-dynamic/&quot; title=&quot;http://code.google.com/p/syntaxhighlight-blogger-dynamic/&quot;&gt;http://code.google.com/p/syntaxhighlight-blogger-dynamic/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
I of course built my own Google code project to host the highlighter myself so that I could compile it with the brushes I wanted.&amp;nbsp; &lt;br /&gt;
The SVN repo also contains the script I used to build my version and the wiki has a copy of the code used to insert code into your blog.&amp;nbsp; &lt;br /&gt;
&lt;a href=&quot;http://dlehman.googlecode.com/&quot;&gt;http://dlehman.googlecode.com&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thanks to all of these projects for helping me get syntax highlighting working.&amp;nbsp;</content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/3668029310215332744/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2012/03/syntax-highlighter-and-blogger-dynamic.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3668029310215332744'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3668029310215332744'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2012/03/syntax-highlighter-and-blogger-dynamic.html' title='Syntax Highlighter and Blogger Dynamic Views'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-4418357858099862793</id><published>2012-03-10T16:20:00.000-05:00</published><updated>2012-03-26T10:09:25.793-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ThinStation"/><category scheme="http://www.blogger.com/atom/ns#" term="WDS"/><title type='text'>Thinstation 5.0 and Windows Deployment Services</title><content type='html'>&lt;br /&gt;
&lt;h2&gt;




My scenario&lt;/h2&gt;
I have several old PC’s with 256 MB ram the hard drives are slow and the processors are not too speedy either. They are 7 years old, purchased in 2005. Some of them are just too slow to use effectively.&lt;br /&gt;
&lt;br /&gt;
We are a windows shop, I have server 2008 WDS for imaging, which has tftp, and MS DHCP. Rather than setup another tftp and manage DHCP reservations I opted to install pxelinux on my WDS server.&lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;






What you need&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Old pcs capable of pxebooting or look at Etherboot.  &lt;/li&gt;
&lt;li&gt;PXElinux  &lt;/li&gt;
&lt;li&gt;WDS server  &lt;/li&gt;
&lt;li&gt;DHCP server  &lt;/li&gt;
&lt;li&gt;Linux box to build thinstation  &lt;/li&gt;
&lt;li&gt;Web server to store and download configuration files  &lt;/li&gt;
&lt;li&gt;Time and patience&lt;/li&gt;
&lt;/ul&gt;
Optional helpful tools&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Filezilla (to upload and download your conf files and the files you build later)  &lt;/li&gt;
&lt;li&gt;Notepad++ (to edit the conf files, use shell syntax highlighting)  &lt;/li&gt;
&lt;li&gt;vmware (to test changes faster)  &lt;/li&gt;
&lt;li&gt;putty (to login to the Linux box)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;h2&gt;



&lt;a name=&#39;more&#39;&gt;&lt;/a&gt;


Install pxelinux to your WDS server&lt;/h2&gt;
&lt;br /&gt;
The following is a copy and paste of the first section&amp;nbsp; on WDS from syslinux.org. I do not create the Linux folder because I am not deploying Linux, I create a thinstation folder.&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/goog_1271322955&quot;&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.syslinux.org/wiki/index.php/WDSLINUX&quot; target=&quot;_blank&quot;&gt;http://www.syslinux.org/wiki/index.php/WDSLINUX&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;
Download syslinux from &lt;a href=&quot;http://www.kernel.org/pub/linux/utils/boot/syslinux/&quot; target=&quot;_blank&quot;&gt;http://www.kernel.org/pub/linux/utils/boot/syslinux/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Extract core\pxelinux.0 com32\menu\vesamenu.c32 andcom32\modules\chain.c32 from the syslinux download and put it on your WDS server in $WDS-ROOT\Boot\x86\ and $WDS-ROOT\Boot\x64\(substitute WDS-ROOT for where your WDS root folder is)&lt;br /&gt;
&lt;br /&gt;
In the $WDS-ROOT\Boot\$ARCH folders Rename pxelinux.0 to pxelinux.com&lt;br /&gt;
&lt;br /&gt;
Create a folder named pxelinux.cfg (in the $WDS-ROOT\Boot\x86\and$WDS-ROOT\Boot\x64\ folder)&lt;br /&gt;
&lt;br /&gt;
In the pxelinux.cfg folder create a text file named default and add the following to it (you can substitute MyMenuBackgroundPicture640x480.jpg for any image you want as your menu background)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;DEFAULT vesamenu.c32 

PROMPT 0 

NOESCAPE 0 

ALLOWOPTIONS 0 

# Timeout in units of 1/10 s 

TIMEOUT 300 

MENU MARGIN 10 

MENU ROWS 16 

MENU TABMSGROW 21 

MENU TIMEOUTROW 26 

MENUCOLOR BORDER 30;44 #20ffffff #00000000 none 

MENU COLOR SCROLLBAR 30;44 #20ffffff #00000000 none 

MENU COLOR TITLE 0 #ffffffff #00000000 none 

MENU COLOR SEL 30;47 #40000000 #20ffffff 

MENU BACKGROUND MyMenuBackgroundPicture640x480.jpg 

MENU TITLE PXE Boot Menu 

#--- 

LABEL wds 

MENU LABEL Windows Deployment Services 

KERNEL pxeboot.0 

#--- 

LABEL Abort 

MENU LABEL AbortPXE 

Kernel abortpxe.0 

#--- 

LABEL local 

MENU DEFAULT 

MENU LABEL Boot from Harddisk 

LOCALBOOT 0 

Type 0x80&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
Make a copy of pxeboot.n12 and name it pxeboot.0&lt;br /&gt;
&lt;br /&gt;
make a copy from abortpxe.com and rename it to abortpxe.0&lt;br /&gt;
&lt;br /&gt;
Create a folder named Linux (in the $WDS-ROOT\Boot\x86\ and$WDS-ROOT\Boot\x64\ folder)&lt;br /&gt;
&lt;br /&gt;
Open the Windows Deployment Services Console,&lt;br /&gt;
&lt;br /&gt;
Right Click on your Server and Select Properties,&lt;br /&gt;
&lt;br /&gt;
From the Boot Tab change the default boot program for your architecture(x86 and x64 as well) toBoot\x86\pxelinux.com and Boot\x64\pxelinux.com respectively&lt;br /&gt;
&lt;br /&gt;
NOTE: In the WDS included in Windows Server 2008 R2 the UI has changed and you have to use the command line to set the the default boot program.&lt;br /&gt;
&lt;br /&gt;
Thus to change the boot program to pxelinux.com, the wdsutil command line tool has to be used: (do this also for x64 if you have x64clientsalso)&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;wdsutil /set-server /bootprogram:boot\x86\pxelinux.com/architecture:x86&lt;br /&gt;&lt;br /&gt;wdsutil /set-server/N12bootprogram:boot\x86\pxelinux.com/architecture:x86&lt;br /&gt;&lt;code&gt;&lt;/code&gt;&lt;/code&gt;&lt;br /&gt;
Now when you pxe boot a machine you will get your custom boot menu.&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
I recommend booting a machine to make sure you get the custom menu before going any further. &lt;br /&gt;
&lt;br /&gt;
&lt;h2&gt;






Getting and Installing Thinstation&lt;/h2&gt;
&lt;br /&gt;
&lt;br /&gt;
I recommend reading the getting started and FAQ’s they cover a lot of information. Looking at the sample conf files provides a lot of insight as well.&lt;br /&gt;
&lt;a href=&quot;http://sourceforge.net/apps/mediawiki/thinstation/index.php?title=Developer:2.5-starting&quot; target=&quot;_blank&quot;&gt;http://sourceforge.net/apps/mediawiki/thinstation/index.php?title=Developer:2.5-starting&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://sourceforge.net/apps/mediawiki/thinstation/index.php?title=FAQ&quot; target=&quot;_blank&quot;&gt;http://sourceforge.net/apps/mediawiki/thinstation/index.php?title=FAQ&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://thinstation.sourceforge.net/faq.html&quot; target=&quot;_blank&quot;&gt;http://thinstation.sourceforge.net/faq.html&lt;/a&gt; (the configuration section explains the order precedence of the conf files)&lt;br /&gt;
I chose to use the new http wget method for downloading conf files because tftp on WDS requires modifying the registry and it didn&#39;t work for me.&amp;nbsp; Having the conf files on a webserver made them easier to edit in the long run.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;






Download thinstation from source forage&lt;/h3&gt;
&lt;br /&gt;
&lt;a href=&quot;http://thinstation.org/&quot; target=&quot;_blank&quot;&gt;http://thinstation.org/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
There are two options an ISO which you can boot and install the buildenviroment or a tar ball to set up the &lt;span style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;&quot;&gt;environment&lt;/span&gt; on an existing Linux box. &lt;br /&gt;
&lt;br /&gt;
I chose the tar ball&lt;br /&gt;
&lt;br /&gt;
download, extract, and run the setup chroot script&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;






Building and Configuring Thinstation&lt;/h3&gt;
CD to /ts and edit build.conf and thinstation.buildtime.conf&lt;br /&gt;
&lt;br /&gt;
these are the two files that control build time options&lt;br /&gt;
&lt;br /&gt;
build.conf controls what modules (think of drivers in the windows world) and packages that are included in the image.&amp;nbsp; packages are the software, remote desktop ssh firefox etc. &lt;br /&gt;
&lt;br /&gt;
some of the packages I added are;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;rdesktop (windows rdp client) &lt;/li&gt;
&lt;li&gt;ssh (to access conf files) &lt;/li&gt;
&lt;li&gt;xterm (to access conf files) &lt;/li&gt;
&lt;li&gt;icewm (window manager)&lt;br /&gt;&lt;br /&gt;you will want to add extensions-x if you want to use hwlister &lt;br /&gt;&lt;br /&gt;thinstation.conf.buildtime sets all options in the image.&lt;br /&gt;&lt;br /&gt;These options include what sessions are available, sound and video options, but the most &lt;span style=&quot;font-family: Calibri, sans-serif; font-size: 11pt; line-height: 115%;&quot;&gt;important&lt;/span&gt; ones to set are the settings related to finding your network configuration files.&lt;br /&gt;&lt;br /&gt;near the bottom of build.conf you will find this&lt;br /&gt;&lt;br /&gt;&lt;pre class=&quot;brush:plain&quot;&gt;param baseurl http://yourwebserver.local/thinconf/&lt;/pre&gt;
&lt;br /&gt;Now in thinstation.conf.buildtime you need to ensure these options areset&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;margin-left: 40px;&quot;&gt;
&lt;pre class=&quot;brush:plain&quot;&gt;NET_FILE_ENABLED=On



NET_FILE_METHOD=wget&lt;/pre&gt;
&lt;/div&gt;
&lt;pre&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The rest needs to be relevant to your environment but here is what I chose and why.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
There are no sessions defined at build time, this was to make sure I was pulling a conf file from the network, I could build one in now that network configuration is working, but probably won’t.The build time file contains items such as default audio level, ntp server time zone and much more. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Thinstation.conf.network contains the default window manager and its options. This allows me to get an environment to work in when no sessions are defined, or the machine doesn’t belong to a group yet. &lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
thinstation.conf.network Snippet&lt;/div&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;div =&quot;&quot;=&quot;&quot;&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;SCREEN=0

WORKSPACE=1

KEYBOARD_MAP=en_us

USB_ENABLED=On

DAILY_REBOOT=On

RECONNECT_PROMPT=off

ICONMODE=OFF

MENU_SHOWRES=On

MENU_SHOWAPPS=on

MENU_SHOWABOUT=On

MENU_SHOWLOGOUT=on

SESSION_0_TYPE=icewm

ICEWM_THEME=blueCrux

SESSION_0_AUTOSTART=On

SESSION_0_ICON=Off&lt;/pre&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;h3&gt;






Building the image&lt;/h3&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Thinstation recommends&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
./build–allmodules&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Run hwlister.sh&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Add machine profile&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Rebuild with only selected modules ./build&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;see getting started with thinstation 2.5 for details&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
There was no noticeable performance hit by using the all modules build. I used the all modules build because when I add another model machine I won’t have to rebuild and get a profile for it. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
After running ./build –allmodules you will find your pxeimages in; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
/ts/5.0/boot-images/pxe/&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The only two files you need are &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Initrd&lt;o:p&gt;&lt;/o:p&gt; &lt;/li&gt;
&lt;li&gt;Vmlinuz&lt;o:p&gt;&lt;/o:p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
All the other files were setup when we installed pxelinux to the WDS server&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
These files go in the folder you created for thinstation on WDS,&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
$WDS-ROOT\boot\x86\thinstation&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
/ts/5.0/boot-images/pxe/pxelinux.cfg&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Contains a default file which is where I got the information to modify the default file we created earlier&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
this is my default file, I also added another subdirectory to test new builds and features now that this is in production.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div =&quot;&quot;=&quot;&quot;&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;pre class=&quot;brush:bash&quot;&gt;DEFAULT
vesamenu.c32

 PROMPT 0

 NOESCAPE 0

 #ALLOWOPTIONS 0

 # Timeout in units of 1/10 s

 TIMEOUT 30

 MENU MARGIN 10

 MENU ROWS 16

 MENU TABMSGROW 21

 MENU TIMEOUTROW 26

 #MENU COLOR BORDER 30;44 #20ffffff #00000000 none

 #MENU COLOR SCROLLBAR 30;44 #20ffffff #00000000 none

 #MENU COLOR TITLE 0 #ffffffff #00000000 none

 #MENU COLOR SEL 30;47 #40000000 #20ffffff

 #MENU BACKGROUND MyMenuBackgroundPicture640x480.jpg

 MENU TITLE PXE Boot Menu

&amp;nbsp;

 #---

LABEL Thinstation

MENU Default

KERNEL thinstation/vmlinuz

APPEND initrd=thinstation/initrd video=uvesafb:1024x768-32,mtrr:0,ywrap
splash=verbose,theme:default intel_iommu=off amd_iommu=off console=tty1
loglevel=3 LM=3 

 #---

LABEL Thinstation Testing

KERNEL thinstation/test/vmlinuz

APPEND initrd=thinstation/test/initrd
video=uvesafb:1024x768-32,mtrr:0,ywrap splash=verbose,theme:default
intel_iommu=off amd_iommu=off console=tty1 loglevel=3 LM=3 

 #---

 LABEL wds

 MENU LABEL Windows Deployment Services

 KERNEL pxeboot.0

 #---

 LABEL Abort

 MENU LABEL AbortPXE

 Kernel abortpxe.0

 #---

 LABEL local 



 MENU LABEL Boot from Harddisk

 LOCALBOOT 0

 Type 0x80&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3&gt;






Adding Groups&lt;/h3&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
I have this working in my elementary and left myself room to add by using the groups feature.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
I defined the rdesktop sessions for the elementary in a group called ES&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
thinstation.conf.group-ES&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
you add machines to a group by editing&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
thinstation.hosts&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
The group names are case sensitive and each host is required to have a comment after it. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
I had to visit each machine to set it to pxe boot so populating the group file wasn’t much extra work.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
After your in the icewm session use xterm to ssh to your webserver. The default hostname of your machine is ts_macaddress&amp;nbsp; This makes it easy to get the current machines mac address for your hosts file. You can define a new host name and any number of groups like this.&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;code&gt;Hostname macaddress groupname # comment &lt;code&gt;&lt;/code&gt;&lt;/code&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Reboot the machine and you should have the sessions you defined in your group file. &lt;o:p&gt;&lt;/o:p&gt;&lt;/div&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;MsoNormal&quot;&gt;
Congratulations if everything went will you have a working thinstation setup, I hope this article helped you find all the resources you needed to get this done faster than I did. &lt;o:p&gt;&lt;/o:p&gt;


&lt;script src=&#39;http://dlehman.googlecode.com/hg/syntaxhighlight-blogger-dynamic/out/syntaxhighlighter.js&#39; type=&#39;text/javascript&#39;&gt;
&lt;/script&gt;







&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/4418357858099862793/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2012/03/thinstation-50-and-windows-deployment.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/4418357858099862793'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/4418357858099862793'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2012/03/thinstation-50-and-windows-deployment.html' title='Thinstation 5.0 and Windows Deployment Services'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-3388532965686950806</id><published>2012-02-26T09:04:00.001-05:00</published><updated>2012-02-26T09:04:32.150-05:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Chrome"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Apps"/><category scheme="http://www.blogger.com/atom/ns#" term="Printing"/><title type='text'>Printing in Chrome</title><content type='html'>&lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;Recently my staff and students have had 3 separate issues with printing from chrome, all with the same solution.&lt;/p&gt; &lt;p&gt;1. Printing PDFs are low quality and the letters are not fully formed on the page.&amp;nbsp; &lt;/p&gt; &lt;p&gt;2. Print preview shows everything on one page but the last line or two is cut off when the document is printed.&amp;nbsp; &lt;/p&gt; &lt;p&gt;3. The printer prints a kernel error instead of your document.&amp;nbsp; &lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;To solve all of these issues skip the chrome built in print settings and use the traditional windows print dialog.&lt;/p&gt; &lt;p&gt;press ctrl + shift + P&lt;/p&gt; &lt;p&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj39reUn2yTIIMnfdrHPh2WPbGh_wiq-7iymm42EHA2qbii8OnRIZSYsFhAc-wf627iiNw8AudOr5aZCmzSzqWcVJjnbiitNVMnZspf4PM_5UKsNsBCNRcnf-cRER-WBXNCnGcBiNQNgjk/s1600-h/chroneprint%25255B2%25255D.png&quot;&gt;&lt;img style=&quot;background-image: none; border-bottom: 0px; border-left: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top: 0px; border-right: 0px; padding-top: 0px&quot; title=&quot;chroneprint&quot; border=&quot;0&quot; alt=&quot;chroneprint&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJbBFpeHsyu73rYdKZLqRfBwWuqy0fU1u_F18q7oWXJqPmqwipBlQZrNs7XAie18rhlKdN51vdbqE8FhQPCRJEC-kQKbbR37S3M2HpiQew8_cRMnEEylDS5mRrTwTzTx0jAun44c_g1ME/?imgmax=800&quot; width=&quot;146&quot; height=&quot;244&quot;&gt;&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;I hope this helps some of you solve your chrome printing issue. &lt;/p&gt;  </content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/3388532965686950806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2012/02/printing-in-chrome.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3388532965686950806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3388532965686950806'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2012/02/printing-in-chrome.html' title='Printing in Chrome'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJbBFpeHsyu73rYdKZLqRfBwWuqy0fU1u_F18q7oWXJqPmqwipBlQZrNs7XAie18rhlKdN51vdbqE8FhQPCRJEC-kQKbbR37S3M2HpiQew8_cRMnEEylDS5mRrTwTzTx0jAun44c_g1ME/s72-c?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-3890192417032377426</id><published>2011-07-15T17:18:00.000-04:00</published><updated>2012-03-26T10:12:54.681-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Active Directory"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Apps"/><title type='text'>Google Apps Active Directory Real Time Password Sync</title><content type='html'>&lt;b&gt;Tools needed&lt;/b&gt;  &lt;br /&gt;
&lt;a href=&quot;http://www.google.com/support/a/bin/answer.py?answer=106368&quot;&gt;Google Apps Directory Sync&lt;/a&gt;  &lt;br /&gt;
&lt;a href=&quot;http://code.google.com/p/google-apps-manager/&quot;&gt;Google Apps Manager&lt;/a&gt;  &lt;br /&gt;
&lt;a href=&quot;http://code.google.com/p/sha1hexfltr/&quot;&gt;sha1hexfltr&lt;/a&gt;  &lt;br /&gt;
&lt;a href=&quot;http://sourceforge.net/projects/passwdhk/&quot;&gt;passwordhk&lt;/a&gt;  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are a number of ways to sync passwords to Google Apps, the most common method is to use Google’s own tool, Google Apps Directory Sync (GADS) or the Google API. This tool does not natively read Active Directory’s binary password field. GADS will accept a sha1 hashed password, and that’s exactly what the sha1hexfltr does.  &lt;br /&gt;
Sha1hexfltr captures the user’s password and puts the sha1 hash in the division field of active directory.  &lt;br /&gt;
Setup GADS to use the division field as the password attribute. Once this is working correctly move on to the real time syncing.  &lt;br /&gt;
&lt;b&gt;Real Time Syncing&lt;/b&gt;  &lt;br /&gt;
I have used GADS and sha1hexfltr combination successfully for a few months with my test users. GADS runs nightly to sync up.  &lt;br /&gt;
Moving everyone to Google this summer, I wanted to head off as much confusion as possible in regard to what password to use. I knew of a password filter that would run the password through a script.&lt;br /&gt;
Setup gam to use OAuth and copy the gam directory and token to each domain controller. &lt;br /&gt;
Passwordhk will take any program or script that accepts two arguments, username and password&lt;br /&gt;
&lt;pre class=&quot;brush:bash&quot; title=&quot;sync.bat&quot;&gt;
&lt;/pre&gt;
&lt;pre class=&quot;brush:bash&quot; title=&quot;sync.bat&quot;&gt;gam update user %1 password %2


&lt;/pre&gt;
&lt;br /&gt;
Set the batch file as the pre change program with no arguments, the temp working directory to your gam folder&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Problems and Solutions&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;Problem&lt;/strong&gt;&lt;br /&gt;
The biggest problem with this setup is creating new user accounts. The password will be passed to gam and fail because the user is not in Google yet.&amp;nbsp; &lt;br /&gt;
If you have users that are not in Google, this will be a problem.&amp;nbsp; &lt;br /&gt;
&lt;strong&gt;Solution&lt;/strong&gt;&lt;br /&gt;
I added two lines to my user creation script.&amp;nbsp; one to rem out the gam update statement, and the other to put it back when the script finished&lt;br /&gt;
I added another line to call GADS.&amp;nbsp; &lt;br /&gt;
With this setup Active directory and Google will stay in sync.&amp;nbsp; The only gotcha to watch out for is changing, resetting a Password, or creating a user that will not have access to Google.

&lt;script src=&#39;http://dlehman.googlecode.com/hg/syntaxhighlight-blogger-dynamic/out/syntaxhighlighter.js&#39; type=&#39;text/javascript&#39;&gt;
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/3890192417032377426/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2011/07/google-apps-active-directory-real-time.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3890192417032377426'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3890192417032377426'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2011/07/google-apps-active-directory-real-time.html' title='Google Apps Active Directory Real Time Password Sync'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-7467200675214639167</id><published>2011-07-14T18:10:00.000-04:00</published><updated>2012-03-26T10:11:31.376-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Google Apps"/><title type='text'>Google Apps + Postini with directory sync</title><content type='html'>&lt;div&gt;
&lt;script src=&#39;http://dlehman.googlecode.com/hg/syntaxhighlight-blogger-dynamic/out/syntaxhighlighter.js&#39; type=&#39;text/javascript&#39;&gt;
&lt;/script&gt;



The process of getting Google apps and Postini in sync with your Active Directory can be challenging. Here is an overview of what you will need.&amp;nbsp;&amp;nbsp; &lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;writely-toc&quot; toctype=&quot;none+none&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258#Passwords__6257697992941817&quot; target=&quot;_self&quot;&gt;Passwords&lt;/a&gt; &lt;/div&gt;
&lt;div class=&quot;writely-toc&quot; toctype=&quot;none+none&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258#Directory_Sync__20265690213891624&quot; target=&quot;_self&quot;&gt;Directory Sync&lt;/a&gt; &lt;/div&gt;
&lt;div class=&quot;writely-toc&quot; toctype=&quot;none+none&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258#Postini_Mail_Filtering_11571011310886953&quot; target=&quot;_self&quot;&gt;Postini Mail Filtering&lt;/a&gt; &lt;/div&gt;
&lt;div class=&quot;writely-toc&quot; toctype=&quot;none+none&quot;&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258#Resources_2662246704926201_8366684889815933&quot; target=&quot;_self&quot;&gt;Resources&lt;/a&gt; &lt;/div&gt;
&lt;/div&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258&quot; id=&quot;Passwords&quot; name=&quot;Passwords&quot;&gt;&lt;/a&gt; &lt;br /&gt;
&lt;h2&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258&quot; id=&quot;Passwords__6257697992941817&quot; name=&quot;Passwords__6257697992941817&quot;&gt;&lt;/a&gt;Passwords &lt;/h2&gt;
The first challenge is getting the user password to Google. As of this writing Google Apps Directory Sync (GADS) does not support Microsoft Active Directory Passwords (NTLM)&lt;br /&gt;
However it does support passwords hashed as sha-1 A project called sha1hexfltr is a password filter you can install on your domain controllers to rehash the user password into sha-1 and store it in the division field. You can get more information on this from the project &lt;a href=&quot;http://code.google.com/p/sha1hexfltr/&quot; target=&quot;_blank&quot;&gt;home page&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258&quot; id=&quot;Directory&quot; name=&quot;Directory&quot;&gt;&lt;/a&gt; &lt;br /&gt;
&lt;h2&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258&quot; id=&quot;Directory_Sync__20265690213891624&quot; name=&quot;Directory_Sync__20265690213891624&quot;&gt;&lt;/a&gt;Directory Sync &lt;/h2&gt;
After installing &lt;a href=&quot;http://www.google.com/support/a/bin/answer.py?hl=en&amp;amp;answer=106368&quot; target=&quot;_blank&quot;&gt;GADS&lt;/a&gt; you need to setup your configuration file. Most of this is straight forward just walk through the wizard and fill in all the information. In my case I am only syncing users. &lt;br /&gt;
The challenge I had here was excluding disabled users, my normal query gave me errors. This is one I found to work. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;
All users except disabled accounts&lt;/blockquote&gt;
&lt;br /&gt;
&lt;blockquote&gt;
 &lt;br /&gt;
&lt;pre class=&quot;brush:plain&quot;&gt;

(&amp;amp;(objectCategory=person)(objectClass=user)(!(userAccountControl:1.2.840.113556.1.4.803:=2))) 

&lt;/pre&gt;
&lt;/blockquote&gt;
The administration guide has lots of examples and will walk you through step by step. This is the only query that gave me trouble. I recommend doing several simulations starting out with a test OU. &lt;br /&gt;
To apply the changes you have to run the sync tool from the command line. I wrote a simple batch file to do this and made it a scheduled task, this keeps everything in sync. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258&quot; id=&quot;Postini&quot; name=&quot;Postini&quot;&gt;&lt;/a&gt; &lt;br /&gt;
&lt;h2&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258&quot; id=&quot;Postini_Mail_Filtering_11571011310886953&quot; name=&quot;Postini_Mail_Filtering_11571011310886953&quot;&gt;&lt;/a&gt;Postini Mail Filtering&lt;/h2&gt;
I will make a few things clear up front because Google&#39;s documentation is lacking. &lt;br /&gt;
I have the free version of Postini that came intergraded with Google apps. My users are synced over to Postini from Google. Postini &lt;b&gt;DOES NOT&lt;/b&gt; replicate your Google apps OU structure. &lt;br /&gt;
The Google Apps Directory Sync for Email Security &lt;b&gt;DOES NOT&lt;/b&gt; work with the intergraded version of Postini. I believe this tool is for syncing with Postini if you have it as a separate paid service. &lt;br /&gt;
The purpose of Postini is to provide spam and virus protection in addition to custom content filters. A custom content filter will allow you to allow or deny email based on a number of criteria, including who the message is to, or if the body contains certain words. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can manually create org units to apply different filters to different users. There is two ways to get users into an org. Postini has a form you can just put the email addresses in, or they have batch processing commands you can use as well. &lt;br /&gt;
If you want to just keep email in your domain there is now an easier way. In your admin panel under advanced tools you will find email delivering options. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For details on configuring Postini suited to K12 environments go to &lt;a href=&quot;http://www.appsusergroup.org/&quot; target=&quot;_blank&quot;&gt;www.appsusergroup.org&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
Apps User Group was started to connect and assist schools who want to use Google Apps. The site contains links to Google&#39;s administration guide, and links to example configurations and policy guidelines. &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258&quot; id=&quot;Resources&quot; name=&quot;Resources&quot;&gt;&lt;/a&gt; &lt;br /&gt;
&lt;h2&gt;

&lt;a href=&quot;http://www.blogger.com/blogger.g?blogID=5506763728066602258&quot; id=&quot;Resources_2662246704926201_8366684889815933&quot; name=&quot;Resources_2662246704926201_8366684889815933&quot;&gt;&lt;/a&gt;Resources&lt;/h2&gt;
sha1hexfltr &lt;a href=&quot;http://code.google.com/p/sha1hexfltr/&quot; target=&quot;_blank&quot;&gt;http://code.google.com/p/sha1hexfltr/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.google.com/support/a/bin/answer.py?hl=en&amp;amp;answer=106368&quot; target=&quot;_blank&quot;&gt;Google Apps Directory Sync&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.postini.com/dir_sync/&quot; target=&quot;_blank&quot;&gt;Google Apps Directory Sync for Email Security&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Apps user group &lt;a href=&quot;http://www.appsusergroup.org/&quot; target=&quot;_blank&quot;&gt;http://www.appsusergroup.org&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/7467200675214639167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2011/02/google-apps-postini-with-directory-sync.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/7467200675214639167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/7467200675214639167'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2011/02/google-apps-postini-with-directory-sync.html' title='Google Apps + Postini with directory sync'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-1348750110812557748</id><published>2011-07-14T17:06:00.000-04:00</published><updated>2012-03-26T10:11:12.465-04:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="FirstClass"/><category scheme="http://www.blogger.com/atom/ns#" term="Google Apps"/><title type='text'>FirstClass Google Apps duel Delivery</title><content type='html'>&lt;script src=&#39;http://dlehman.googlecode.com/hg/syntaxhighlight-blogger-dynamic/out/syntaxhighlighter.js&#39; type=&#39;text/javascript&#39;&gt;
&lt;/script&gt;


Here is a how-to on setting up FirstClass and Google apps for dual delivery, with two domains.  &lt;br /&gt;
&lt;h2&gt;
&amp;nbsp;&lt;/h2&gt;
&lt;h2&gt;
My setup&lt;/h2&gt;
&lt;span style=&quot;font-family: Calibri;&quot;&gt;I am not moving existing mail at this time.&amp;nbsp; My hope is that by giving users access to both systems, the email that is in FirstClass and not Google will be irrelevant for the majority of my users when the time comes to shut FirstClass down.&amp;nbsp; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
FirstClass original domain with all staff accounts, no students &lt;br /&gt;
Google apps new domain has student and staff accounts &lt;br /&gt;
This distinction is important later. &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;h2&gt;
My domains&lt;/h2&gt;
school.k12.oh.us original domain for staff (FirstClass)  &lt;br /&gt;
school.org Google apps domain &lt;br /&gt;
ga.school.org &lt;br /&gt;
With this setup staff have three email addresses.  &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;h2&gt;
Configure Google to route mail to first class.&lt;/h2&gt;
&lt;h2&gt;
Email settings&lt;/h2&gt;
Add route &lt;br /&gt;
Enter public IP of FirstClass server &lt;br /&gt;
Do not change SMTP envelope &lt;br /&gt;
Deliver for provisioned accounts &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;h2&gt;
Configure FirstClass to accept mail from Google&lt;/h2&gt;
This was easier than I thought. Shay Smith has a lot of information about this migration but the instructions for duel delivery did not work for me and generated undeliverable messages for non FirstClass accounts, such as students. This setup may have worked if Google and FirstClass had the same users.  &lt;br /&gt;
&lt;a href=&quot;https://sites.google.com/a/ddouglas.k12.or.us/shay_smith/Home/FirstClass-Migration-Plan&quot;&gt;https://sites.google.com/a/ddouglas.k12.or.us/shay_smith/Home/FirstClass-Migration-Plan&lt;/a&gt; &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;h2&gt;
Setup Aliases&lt;/h2&gt;
Use batch admin to set aliases for all users &lt;br /&gt;

&lt;pre class=&quot;brush:plain&quot;&gt;
PUT USER username 1252 0 username@school.k12.oh.us,username@school.org &lt;br /&gt;
&lt;/pre&gt;

I used a&amp;nbsp; spreadsheet to parse this for a list of users  &lt;br /&gt;
This allows FirstClass to accept mail for only those aliases specified and does not try to deliver to nonexistent student accounts.  &lt;br /&gt;
Internet Services &amp;gt;&amp;gt; Advanced Directory &amp;gt;&amp;gt; Aliases &amp;gt;&amp;gt; inbound mail address set to Aliases only  &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;h2&gt;
Setup internal forwarding&lt;/h2&gt;
Use batch admin to setup a forward rule for all users to send internal mail to the Google apps sub domain &lt;br /&gt;
&lt;br /&gt;
&lt;pre class=&quot;brush:plain&quot;&gt;
PUT PREFERENCES username 1104 7 1 1157 7 0 4 -1 username@ga.school.org &lt;br /&gt;
&lt;/pre&gt;

&lt;br /&gt;
Again use a spreadsheet &lt;br /&gt;
This subdomain is not set as an alias in FirstClass, this avoids duplicate messages in FirstClass. &lt;br /&gt;
Forwarding internet mail is not necessary because it is already getting delivered to Google first.  &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;h2&gt;
Conferences&lt;/h2&gt;
Create a Google group that corresponds to your conferences &lt;br /&gt;
Setup and advanced rule on the conference to redirect all messages to the group.  &lt;br /&gt;
It is not necessary to have group postings sent to the conference because it is delivered to the user’s inbox.  &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;h2&gt;
Migrated users&lt;/h2&gt;
For users that have gone completely to Google and do not wish to use FirstClass anymore, set up forward and delete rules. &lt;br /&gt;
Setup an advanced mailbox rule to forward and delete if match local name &lt;br /&gt;
This will continue to forward the messages to the Google accounts that are sent internally on FirstClass. &lt;br /&gt;
Setup an advanced mailbox rule to delete messages that match internet address, these do not need forwarded because mail is delivered to Google first. &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
I hope this rough how to saves you all the research and mistakes I went through.</content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/1348750110812557748/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2011/07/fistclass-google-apps-duel-delivery.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/1348750110812557748'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/1348750110812557748'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2011/07/fistclass-google-apps-duel-delivery.html' title='FirstClass Google Apps duel Delivery'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5506763728066602258.post-3162996884151060241</id><published>2011-02-13T20:41:00.001-05:00</published><updated>2011-02-13T20:41:14.464-05:00</updated><title type='text'>Hello World</title><content type='html'>&lt;span xmlns=&#39;&#39;&gt;&lt;p&gt;Well, this is my first blog post.  This blog is planned primarily for my own reference of documentation and how-tos, in the hope that others can benefit from my experience as well.    &lt;/p&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://dlehman.blogspot.com/feeds/3162996884151060241/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dlehman.blogspot.com/2011/02/hello-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3162996884151060241'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5506763728066602258/posts/default/3162996884151060241'/><link rel='alternate' type='text/html' href='http://dlehman.blogspot.com/2011/02/hello-world.html' title='Hello World'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>