Tuesday, April 24, 2012
Powershell - Citrix
load citrix ps adding : Add-PSSnapin Citrix.XenApp.Commands
Get the number of sessions in the farm:
$FarmRaw = Get-XAFarm
$FarmRaw.SessionCount
Get the number of sessions per app:
$Sessions = Get-XASession -BrowserName "Notepad"
$SessTotal = $sessions.count
Tuesday, April 3, 2012
Powershell : Active Directory user update and rename in 1 line
# tested and used on powershell v3
# 1 Grab username\password
# 2 Grab all users without admin in the name
# 3 For each user
# a Modify display name to include (admin)
# b Rename AD object to include (admin)
#
#It’s setup to run in a single line because I can
#
expanded
#get the admin passwords
# 1 Grab username\password
# 2 Grab all users without admin in the name
# 3 For each user
# a Modify display name to include (admin)
# b Rename AD object to include (admin)
#
#It’s setup to run in a single line because I can
#
$ninja=Get-Credential
; get-aduser -filter
'name -notlike "*Admin*"' -searchbase 'OU=Security - Administrator Accounts,DC=Coolkids,DC=local' -Properties DistinguishedName
| %{set-aduser -credential $ninja
$_ -displayname
($_.name
+ "
(Admin)"); rename-ADObject $_.DistinguishedName
-credential
$ninja -NewName
($_.name
+ "
(Admin)")}
expanded
#get the admin passwords
$ninja=Get-Credential
#
get-aduser -filter 'name -notlike "*Admin*"' -searchbase 'OU=Security - Administrator Accounts,DC=Coolkids,DC=local' -Properties DistinguishedName | %{set-aduser -credential $ninja $_ -displayname ($_.name + " (Admin)"); rename-ADObject $_.DistinguishedName -credential $ninja -NewName ($_.name + " (Admin)")}
#
get-aduser -filter 'name -notlike "*Admin*"' -searchbase 'OU=Security - Administrator Accounts,DC=Coolkids,DC=local' -Properties DistinguishedName | %{set-aduser -credential $ninja $_ -displayname ($_.name + " (Admin)"); rename-ADObject $_.DistinguishedName -credential $ninja -NewName ($_.name + " (Admin)")}
Wednesday, March 28, 2012
vhd install windows 8
after downloading the window8 (and converting to usb stick )
Insert and reboot
Follow the installation wizard until you get to the point where to select the partition
Hit Shift + F10 to bring up a Dos prompt window.
Type diskpart and press enter. Then,
DISKPART:>create vdisk file=C:\vhd\win8preview.vhd maximum=20000
DISKPART:>select vdisk file=C:\vhd\win8preview.vhd
DISKPART:>attach vdisk
exit and refresh
choose the new disk, ignore any errors about unable to boot
Sunday, March 18, 2012
batch ffmpeg convert mp4 mp3
Not my best FOR loop, quick and nasty.
Had a stack of mp4 videos to convert for the ride home.
mp4mp3.cmd <batch file>
for /f "delims=." %%a in ('dir *.mp4 /b') do G:\music\ffmpeg.exe -i "%%a.mp4" -vn -ar 44100 -ac 2 -ab 192000 -f mp3 "%%a.mp3"
Had a stack of mp4 videos to convert for the ride home.
mp4mp3.cmd <batch file>
for /f "delims=." %%a in ('dir *.mp4 /b') do G:\music\ffmpeg.exe -i "%%a.mp4" -vn -ar 44100 -ac 2 -ab 192000 -f mp3 "%%a.mp3"
Thursday, March 15, 2012
Java vs Terminal Server 2003 - CLSID
Users were experiencing a Red Cross for the applet, yet my administrative account was able to load the applet.
Looks like java or the installation process for java is not writing all the registry keys to HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID\{CAFECA-00xx…..
In IE, Java has a catch all applet version – which will always work (aka the latest version)
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93But most java call specific versions of java (for example).
The server(s) for some reason didn't have all the keys in classes root, where compared to my windows 7 desktop.I believe the install for some reason is writing the keys to HKCU instead of HKLM \classes...etc.
So fix is to add all the version to HKEY_LOCAL_MACHINE\SOFTWARE\Classes
http://pastebin.com/YhmwPTq7 contains my fix for 1.6u24 version btw, Monitoring the registry when tick/untick the “use next generation java” in the java control panel, it just write all the entries to HKCU.
changing the resolution of osx86 on virtualbox
/Library/Preferences/SystemConfiguration/com.apple.Boot.plist copy to desktop...
modify
copy back to original location
Subscribe to:
Posts (Atom)