This powershell script will apply a Mailbox Retention Policy to a Active Directory Security Group Members
This script require Quest ActiveRoles Management Shell for Active Directory, available for FREE at http://www.quest.com/powershell/
To add the ActiveRoles Management Shell snap-in from Windows PowerShell
At the Windows PowerShell prompt, enter the following command:
Add-PSSnapin Quest.ActiveRoles.ADManagement
This is the script:
Get-QADGroupMember 'Exchange Retention Exception' | ForEach-Object {set-Mailbox $_.Name -ManagedFolderMailboxPolicy "Managed-Folders-60-Days"}
Automation, AWS, Citrix, Cloud, CtxAdmTools, Microsoft, Virtualization, VMware and more...
Thursday, December 30, 2010
Wednesday, December 15, 2010
MS: set color quality to 32 bit when RDP VMware VMs
When I RDP a VMware Virtual Machine (VM) running Windows Server 2008. The color quality is 16 bit even if we set 32 bit on Remote Desktop Client.

Solution: modify the local policy using gpedit.msc and modify following policy:
Computer Configuration, Administrative Templates, Windows Components, Terminal Services, Terminal Server, Remote Session Environment

Solution: modify the local policy using gpedit.msc and modify following policy:
Computer Configuration, Administrative Templates, Windows Components, Terminal Services, Terminal Server, Remote Session Environment
MS: Report items amount and size of each manage folder in Exchange
This powershell script will show how many items and size of each managed folder of all users in a Exchange 2007/2010 organization.
Get-Mailbox foreach { $mbx = $_.DisplayName; Get-MailboxFolderStatistics $_.identity -FolderScope 'Managed Folders' select @{n="DisplayName";e={$mbx}},FolderPath,ItemsInFolder,@{n="FolderSize(MB)";e={$_.folderSize.toMB()}}} export-csv c:\reports\ManagedFolders_12152010.csv
Get-Mailbox foreach { $mbx = $_.DisplayName; Get-MailboxFolderStatistics $_.identity -FolderScope 'Managed Folders' select @{n="DisplayName";e={$mbx}},FolderPath,ItemsInFolder,@{n="FolderSize(MB)";e={$_.folderSize.toMB()}}} export-csv c:\reports\ManagedFolders_12152010.csv
Monday, December 13, 2010
MS: Windows 2008 Profile Loading Error
Check Profile List and delete key with .bak at the end.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList
Tuesday, November 30, 2010
MS: E-mail Records Management and E-mail Retention
Great posts of Adam Harmetz @ Microsoft Records Management Team Blog about e-mail retention in Exchange 2007:
http://blogs.msdn.com/b/recman/archive/2006/12/19/email-records-management-part-1.aspx
http://blogs.msdn.com/b/recman/archive/2007/01/05/e-mail-records-management-part-2.aspx
http://blogs.msdn.com/b/recman/archive/2007/01/18/e-mail-records-management-part-3-e-mail-retention.aspx
http://blogs.msdn.com/b/recman/archive/2006/12/19/email-records-management-part-1.aspx
http://blogs.msdn.com/b/recman/archive/2007/01/05/e-mail-records-management-part-2.aspx
http://blogs.msdn.com/b/recman/archive/2007/01/18/e-mail-records-management-part-3-e-mail-retention.aspx
MS: Create a Managed Folder Mailbox Policy on Exchange 2007 or 2010
Create a Managed Folder Mailbox Policy on Exchange 2007 or 2010
Create a Managed Custom Folder
>> Open Exchange Management Console.
>> Expand the Organization Configuration node and then click Mailbox.
>> Click in Managed Custom Folder tab
>> Right-click and choose the New Managed Custom Folder
>> The New Managed Custom Folder wizard appears. Complete required information.
Also we can use the following example cmdlet:
New-ManagedFolder -Name '3 Months Retention' -FolderName '3 Months Retention' StorageQuota 'unlimited'
Create a Managed Folder Mailbox Policy
>> Open Exchange Management Console.
>> Expand the Organization Configuration node and then click Mailbox.
>> Click in Managed Folder Mailbox Policies tab
>> Right-click and choose the New Managed Folder Mailbox Policy
>> The New Managed Folder Mailbox Policy wizard appears. Complete required information.
Also we can use the following example cmdlet:
new-ManagedFolderMailboxPolicy -Name "RetentionPolicy" -ManagedFolderLinks "3 Months Retention"
Assign the policy to a mailbox
>> Open Exchange Management Console.
>> Expand Recipient Configuration.
>> Double click on the desired mailbox.
>> Click on Mailbox Settings tab.
>> Select Message Records Management.
>> Click on Properties button.
>> Select the Managed Folder Mailbox Policy and make sure that Managed folder mailbox policy checkbox is checked.
Also we can use the following example cmdlet to apply to policy to a single mailbox:
Set-Mailbox -Identity GMusumeci -ManagedFolderMailboxPolicy "RetentionPolicy"
The following example cmdlet apply to policy to multiple mailboxes:
Get-Mailbox -database "EXCHSRV01\Storage Group 1\Mailbox Database 1" Set-Mailbox -ManagedFolderMailboxPolicy "RetentionPolicy"
Force the updates
We can force at server level or user level, using following two cmdlets:
Start-ManagedFolderAssistant –Identity EXCHSRV01
Start-ManagedFolderAssistant –Mailbox GMusumeci
Create a Managed Custom Folder
>> Open Exchange Management Console.
>> Expand the Organization Configuration node and then click Mailbox.
>> Click in Managed Custom Folder tab
>> Right-click and choose the New Managed Custom Folder
>> The New Managed Custom Folder wizard appears. Complete required information.
Also we can use the following example cmdlet:
New-ManagedFolder -Name '3 Months Retention' -FolderName '3 Months Retention' StorageQuota 'unlimited'
Create a Managed Folder Mailbox Policy
>> Open Exchange Management Console.
>> Expand the Organization Configuration node and then click Mailbox.
>> Click in Managed Folder Mailbox Policies tab
>> Right-click and choose the New Managed Folder Mailbox Policy
>> The New Managed Folder Mailbox Policy wizard appears. Complete required information.
Also we can use the following example cmdlet:
new-ManagedFolderMailboxPolicy -Name "RetentionPolicy" -ManagedFolderLinks "3 Months Retention"
Assign the policy to a mailbox
>> Open Exchange Management Console.
>> Expand Recipient Configuration.
>> Double click on the desired mailbox.
>> Click on Mailbox Settings tab.
>> Select Message Records Management.
>> Click on Properties button.
>> Select the Managed Folder Mailbox Policy and make sure that Managed folder mailbox policy checkbox is checked.
Also we can use the following example cmdlet to apply to policy to a single mailbox:
Set-Mailbox -Identity GMusumeci -ManagedFolderMailboxPolicy "RetentionPolicy"
The following example cmdlet apply to policy to multiple mailboxes:
Get-Mailbox -database "EXCHSRV01\Storage Group 1\Mailbox Database 1" Set-Mailbox -ManagedFolderMailboxPolicy "RetentionPolicy"
Force the updates
We can force at server level or user level, using following two cmdlets:
Start-ManagedFolderAssistant –Identity EXCHSRV01
Start-ManagedFolderAssistant –Mailbox GMusumeci
Tuesday, November 23, 2010
MS: Get Exchange Mailbox Info (Exchange 2007 / 2010 or later)
This PowerShell script show the size of the Inbox folder and export the result to CSV file (excel)
Get-Mailbox foreach { $mbx = $_.DisplayName; Get-MailboxFolderStatistics $_.identity -FolderScope 'Inbox' select @{n="DisplayName";e={$mbx}},FolderPath,ItemsInFolder,@{n="FolderSize(MB)";e={$_.folderSize.toMB()}}} export-csv c:\Inbox.csv
This is another script to show the size of the Inbox folder and export the result to CSV file (excel)
Get-Mailbox -ResultSize Unlimited Select-Object Name, @{n='Inbox';e={(Get-MailboxFolderStatistics $_.Identity -FolderScope Inbox).FolderAndSubfolderSize.ToMb() }} Export-Csv c:\Inbox.csv -NoTypeInformation
Get-Mailbox foreach { $mbx = $_.DisplayName; Get-MailboxFolderStatistics $_.identity -FolderScope 'Inbox' select @{n="DisplayName";e={$mbx}},FolderPath,ItemsInFolder,@{n="FolderSize(MB)";e={$_.folderSize.toMB()}}} export-csv c:\Inbox.csv
This is another script to show the size of the Inbox folder and export the result to CSV file (excel)
Get-Mailbox -ResultSize Unlimited Select-Object Name, @{n='Inbox';e={(Get-MailboxFolderStatistics $_.Identity -FolderScope Inbox).FolderAndSubfolderSize.ToMb() }} Export-Csv c:\Inbox.csv -NoTypeInformation
Thursday, November 11, 2010
VMware: VMUpgradeHelper service was unable to get the list of network adaptars for this computer
Error: The service was unable to get the list of network adapters for this computer. This problem can occur when the Windows Management Instrumentation service is not started. Please check that the Windows Management Instrumentation service has been started on this computer.
Solution: This issue is caused by WMI on server. Verify WMI service is running. Rebuild the WMI using following article http://musumeci.blogspot.com/2010/11/ms-windows-management-instrumentation.html
Solution: This issue is caused by WMI on server. Verify WMI service is running. Rebuild the WMI using following article http://musumeci.blogspot.com/2010/11/ms-windows-management-instrumentation.htmlCTX: Edgesight is reporting Device Model as [Unknown]
Error: When you check the Edgesight console, you will found Device Model shows [Unknown]
Solution: This issue is caused by WMI on Citrix server. Verify WMI service is running. Rebuild the WMI using following article http://musumeci.blogspot.com/2010/11/ms-windows-management-instrumentation.html
Solution: This issue is caused by WMI on Citrix server. Verify WMI service is running. Rebuild the WMI using following article http://musumeci.blogspot.com/2010/11/ms-windows-management-instrumentation.htmlWednesday, November 10, 2010
CTX: How to Import ICAClient.adm file into Active Directory to modify Citrix Plug-in client settings using GPO
How to Import ICAClient.adm file into Active Directory to modify Citrix Plug-in (formerly known as ICA Client) client settings using GPO.
http://xenapp6.musumeci.com.ar/TechnicalNotes/How_to_Import_ICAClient.adm_file.html
http://xenapp6.musumeci.com.ar/TechnicalNotes/How_to_Import_ICAClient.adm_file.html
MS: Windows Management Instrumentation ADAP failed to connect to namespace \\.\root\cimv2
Issue:
WMI is not reporting hardware information to some applications (like Citrix EdgeSight or HP Proliant Support Pack, for example). Event Viewer will show the following error:
Windows Management Instrumentation ADAP failed to connect to namespace \\.\root\cimv2 with the following error 0x80041002
Solution:
Rebuild WMI. Create a script with following lines and run on affected server:
cd /d %windir%\system32\wbem
for %i in (*.dll) do RegSvr32 -s %i
for %i in (*.exe) do %i /RegServer
Run %windir%\system32\wbem\wbemtest and click Connect button. And connect to root\cimv2 namespace, to verify is working.
If still not working, run following command to reset WMI to initial state:
%windir%\system32\wbem\winmgmt /resetrepository
WMI is not reporting hardware information to some applications (like Citrix EdgeSight or HP Proliant Support Pack, for example). Event Viewer will show the following error:
Windows Management Instrumentation ADAP failed to connect to namespace \\.\root\cimv2 with the following error 0x80041002
Solution:
Rebuild WMI. Create a script with following lines and run on affected server:
cd /d %windir%\system32\wbem
for %i in (*.dll) do RegSvr32 -s %i
for %i in (*.exe) do %i /RegServer
Run %windir%\system32\wbem\wbemtest and click Connect button. And connect to root\cimv2 namespace, to verify is working.
If still not working, run following command to reset WMI to initial state:
%windir%\system32\wbem\winmgmt /resetrepository
Tuesday, November 09, 2010
MS: Unnamed VM could not initialize error on Hyper-V
When you migrate or move (manually) virtual machines, between different hard disks or servers, you will receive the following error:

Solution: Download Hyper-V Unnamed VM Fix tool from http://ctxadmtools.musumeci.com.ar/HyperVHotFixes
An error occurred while attempting to start the selected virtual machine(s).
Unnamed VM could not initialize.

Solution: Download Hyper-V Unnamed VM Fix tool from http://ctxadmtools.musumeci.com.ar/HyperVHotFixes
Monday, November 08, 2010
CtxAdmTools: HP Proliant Support Pack v1.5 Released!
HP Proliant Support Pack Cleaner v1.5 - This FREE tool remove the agents of HP Proliant Support Pack from HP/Compaq Virtualized Servers

Download at http://ctxadmtools.musumeci.com.ar
NEW in this version
- Support both x86 and x64 versions of HP Proliant Support Pack.
- Run in Unattended mode using /NOGUI parameter.

Download at http://ctxadmtools.musumeci.com.ar
Thursday, November 04, 2010
VMware: Performance Best Practices for VMware vSphere 4.1
VMware has released this document regarding Performance Best Practices for VMware vSphere 4.1
http://www.vmware.com/pdf/Perf_Best_Practices_vSphere4.1.pdf
http://www.vmware.com/pdf/Perf_Best_Practices_vSphere4.1.pdf
Monday, October 25, 2010
CTX: SMB Tuning for XenApp and File Servers on Windows Server 2008
SMB Tuning for XenApp and File Servers on Windows Server 2008
http://community.citrix.com/display/ocb/2010/10/21/SMB+Tuning+for+XenApp+and+File+Servers+on+Windows+Server+2008
http://community.citrix.com/display/ocb/2010/10/21/SMB+Tuning+for+XenApp+and+File+Servers+on+Windows+Server+2008
Thursday, October 21, 2010
CTX: Publish FireFox 3.6 on Citrix or Terminal Server
When we publish FireFox on a Citrix Server or Terminal Server, we want to avoid the default check box:


On a Windows 2008 64-bit edit following file:
C:\Program Files (x86)\Mozilla Firefox\defaults\pref\firefox.js
On a Windows 2008 32-bit edit following file:
C:\Program Files\Mozilla Firefox\defaults\pref\firefox.js
C:\Program Files\Mozilla Firefox\defaults\pref\firefox.js
and replace following file:
pref("browser.shell.checkDefaultBrowser", true);
with this one
("browser.shell.checkDefaultBrowser", false);
Friday, October 15, 2010
Error: The processing of Group Policy failed. Windows attempted to read the file \\\SYSVOL\\Policies\\gpt.ini
I found several XenApp servers (physical and virtual machines) affected by this issue. This issue cause Windows profile load and Windows profile redirection errors.
The error is The processing of Group Policy failed. Windows attempted to read the file \\\SYSVOL\\Policies\\gpt.ini where is the name of the domain controller, is the name of the domain, and is the GUID of the policy folder.

The error is The processing of Group Policy failed. Windows attempted to read the file \\

Solution: run the following command: dfsutil /spcflush
Tuesday, September 28, 2010
Printer driver is not installed on this computer error
You receive the following error:


The [print driver] printer driver is not installed on this computer.
Some printer properties will not be accessible unless you install the printer driver.
Do you want to install the driver now?

This is a bug on some HP print drivers. This error appears when the following key value is equal to zero
HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers\[Printer Name]\PrinterDriverData\HPTrayCount
We need to set the value of this key to 0×12 (decimal 18)
HKLM\SYSTEM\CurrentControlSet\Control\Print\Printers\[Printer Name]\PrinterDriverData\HPTrayCount
We need to set the value of this key to 0×12 (decimal 18)
If you a couple of printer servers and hundred of printers (like my current environment), you can download a small tool I created call Ctx Print Fix. This tool can scan the printer server for printers with the issue, export results to a text file and fix affected printers.

The FREE tool is available at http://ctxadmtools.musumeci.com.ar/ctxhotfixes
Thursday, September 23, 2010
CtxAdmTools: CtxCertifiedPrinters v1.2 released!
I was working on last weeks with a few 64-bit Citrix farms and I was reading about XenApp 6 Printing this morning on the metro to Downtown DC, so I decided to create a new tool called CtxCertifiedPrinters to list all certified, native, non-native and manufacturer 64-bit print drivers. The tool can export results to a Excel file.
If you are looking for 32-bit print driver tool, I created a tool called PrintCert, on July 2008 (in fact this is one of my first CtxAdmTools).

If you are looking for 32-bit print driver tool, I created a tool called PrintCert, on July 2008 (in fact this is one of my first CtxAdmTools).

This Free tool is available at http://ctxadmtools.musumeci.com.ar/CtxCertifiedPrinters
Monday, September 20, 2010
SCRIPT: How to enumerate citrix applications in a remote citrix server using WMI and VB.NT
How to enumerate citrix applications in a remote citrix server using WMI and VB.NET (no MFCOM required)
Imports System
Imports System.Management
Dim strComputer As String = "ctxserver01"
Dim oConn As ConnectionOptions = New ConnectionOptions
oConn.Username = "domain\username"
oConn.Password = "password"
Dim scope As New ManagementScope("\\" & strComputer & "\root\Citrix", oConn)
scope.Connect()
Dim objectQuery As New ObjectQuery("SELECT * FROM MetaFrame_ApplicationsPublishedOnServer")
Dim searcher As New ManagementObjectSearcher(scope, objectQuery)
For Each ctxApp In searcher.Get()
lstAppList.Items.Add(ctxApp("WinApp"))
Next ctxApp
Imports System
Imports System.Management
Dim strComputer As String = "ctxserver01"
Dim oConn As ConnectionOptions = New ConnectionOptions
oConn.Username = "domain\username"
oConn.Password = "password"
Dim scope As New ManagementScope("\\" & strComputer & "\root\Citrix", oConn)
scope.Connect()
Dim objectQuery As New ObjectQuery("SELECT * FROM MetaFrame_ApplicationsPublishedOnServer")
Dim searcher As New ManagementObjectSearcher(scope, objectQuery)
For Each ctxApp In searcher.Get()
lstAppList.Items.Add(ctxApp("WinApp"))
Next ctxApp
Subscribe to:
Posts (Atom)