Browsing articles in "Script"

Migrating from Citrix Receiver Enterprise 3.x to Citrix Receiver 4.0 !Updated!

Update 10/10/13:┬áSince I was handed two more factors; it had to be run for users on VPN; and it had to be absolutely bulletproof, I revised the script to do the following: – Check for installed version, so it doesn’t mess up allready installed Receivers. – Files are copied locally to computers, so it doesn’t run over the network. – I’m also running it as a scheduled task, since startup scripts don’t run well when […]


Clean up Java versions – Updated!

REVISED 11/03/13! I’m not alone in having a headache whenever there’s a new Java-version. The old one doesn’t uninstall, the new one might fail to install. It’s a mess more often than not. After spending some time trying to find a good way to clean it all up in an enterprise environment, I decided that there wasn’t a good solution. So, I decided to invent the wheel myself. The result is a powershell script which […]


Move inactive computer objects

Needed to do some AD cleaning; and obviously Powershell is the way to go. Did some digging around the web and found misc ways to do it; but ended up with this script: $time=[DateTime]::Now.AddDays(-90) $targetOU=(distinguished name for OU) $oldcomputers = Get-ADComputer -Filter * -Properties lastlogontimestamp,objectguid | where {(([DateTime]::FromFileTime($_.lastlogontimestamp) – ([system.datetime]$time)).totaldays) -lt 0 } $oldcomputers | foreach {Move-ADObject -identity $_.objectguid -TargetPath $targetOU} I had some initial troubles, since I tried using distinguishedname, which gave me all […]


“The trust relationship between this workstation and the primary domain failed”

So this isn’t really a new problem, but in Windows 7 it’s become more frequent it seems. It can happen for a number of reasons, but often it’s related to a time-skew between the domain controller and the workstation. Certain computer models seem to be more prone to this than others, though I don’t have any data on that, just my experience. Regardless. You get this: …and you don’t want it. You could log in […]