Powershell: Set Mouse Pointer Scheme to NONE for XenDesktop VM's

Why to do this? Better user experience; reduced cpu load on zero client devices like xenith compared to aero mouse scheme. Powershell Script [code language=”powershell”] $RegConnect = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey([Microsoft.Win32.RegistryHive]"CurrentUser", "$env:COMPUTERNAME") $RegCursors = $RegConnect.OpenSubKey("Control Panel\Cursors", $true) $RegCursors.SetValue("", "") $RegCursors.SetValue("AppStarting", "") $RegCursors.SetValue("Arrow", "") $RegCursors.SetValue("Crosshair", "") $RegCursors.SetValue("Hand", "") $RegCursors.SetValue("Help", "") $RegCursors.SetValue("IBeam", "") $RegCursors.SetValue("No", "") $RegCursors.SetValue("NWPen", "") $RegCursors.SetValue("Scheme Source", 0, …

Powershell change wallpaper using Windows API – SystemParametersInfo from user32.dll

[code language=”powershell”] ######################################################################################################## $setwallpapersource = @" using System.Runtime.InteropServices; public class wallpaper { public const int SetDesktopWallpaper = 20; public const int UpdateIniFile = 0x01; public const int SendWinIniChange = 0x02; [DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)] private static extern int SystemParametersInfo (int uAction, int uParam, string lpvParam, int fuWinIni); public static void SetWallpaper ( …

Delete shortcut pointing to a specific URL

There will be cases where some users are asked to test a dev/training webapp. Few of these users tend to create shortcuts/bookmark to the dev/training webapp and still keep using the dev even after the webapp was rolled to production. Desktop guys to rescue to clean out these shortcuts or bookmarks 🙂 [code language=”css” title=”Powershell …

SetDefaultPrinter using Pinvoke and Powershell

[code language=”powershell” wraplines=”false” collapse=”false”] $code = @’ using System; using System.Runtime.InteropServices; namespace ChangeDefaultPrinter { public class Program { [DllImport("Winspool.drv", CharSet=CharSet.Auto, SetLastError=true)] private static extern bool SetDefaultPrinter(string printerName); public static bool Run(string PrinterName) { bool default_result = SetDefaultPrinter(PrinterName); return default_result; } } } ‘@ cls Add-Type -TypeDefinition $code -Language CSharp #Set Default Printer – for network …

Disable Particular IE add-on via registry

Step 1: Get the Class ID from IE > Tools  > Manage  Add-ons Step 2: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Ext\Settings\{47833539-D0C5-4125-9FA8-0819E2EAAC93}] “Flags”=dword:00000001 Note: 0 is for enable and 1 is for disable.

Powershell [System.Printing] – Add/Remove network printers – WMI alternative

Script ########################################################################### # # NAME: EP-Printer-Connction.ps1 # # AUTHOR: smulpuru # # COMMENT: Adding network printers using .Net System.Printing Class # # VERSION HISTORY: # 1.0 3/2/2012 – Initial release # ########################################################################### Add-Type -AssemblyName System.Printing $printerTXT = “\\FILESRV01\Printer_Scripts\EPprinters.txt” if(Test-Path $printerTXT) { $allRead = Get-Content $printerTXT #for citrix using sessionstate monitor – http://support.citrix.com/article/CTX127491 – #$endPointClientName will …

Handling UserProfile Picture Sync In VDI (Win7 – Citrix UPM)

When a domain user changes their profile picture, the following files are created. Image is created and placed in AppData\Local\Temp\<UserDomain>.bmp Config is stored in %ProgramData%\Microsoft\User Account Pictures\<UserDomain>+<UserName>.dat This change by default does not roam with the user, but can be achieved by following the steps below. Step 1 Have Citrix UPM sync the bmp image …

WordPress Appliance - Powered by TurnKey Linux