Drive Error

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, January 31, 2013

SharePoint Navigation Limited to 50 Items

Posted on 5:14 PM by Unknown

There is a limit set in SharePoint by default which only allows fifty links to show up in the navigation. If you add pages and/or subsites beyond the limit of 50, they stop showing up in the navigation.

The right thing to do would be to re-evaluate your SharePoint site structure at this point. Chances are though, that you will need a more immediate work around to get you past this issue in the meantime.

The limit is set in the PortalSiteMapProvider class in SharePoint. Microsoft’s explanation behind this limit is that “Showing a large number of items in the navigation menu is not useful and can have a negative impact on performance”.


The workaround for this issue is to use the DynamicChildLimit in your sharepoint web site’s web.config file to either set a higher limit, or remove the limit all together by setting it to zero. In the sitemap section of the web.config, there is a line that look like this:

<add name="CurrentNavSiteMapProvider" description="CMS provider for Current navigation" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Current" EncodeOutput="true" IncludePages="PerWeb" IncludeHeadings="true" IncludeAuthoredLinks="true" />

That line needs the DynamicChildLimit added to it like this:

<add name="CurrentNavSiteMapProvider" description="CMS provider for Current navigation" type="Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider, Microsoft.SharePoint.Publishing, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" NavigationType="Current" EncodeOutput="true" DynamicChildLimit="0" IncludePages="PerWeb" IncludeHeadings="true" IncludeAuthoredLinks="true" />



Also see http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.publishing.navigation.portalsitemapprovider.aspx
Read More
Posted in CurrentNavSiteMapProvider, DynamicChildLimit, fix, libraries, limit, lists, menu, Navigation, pages, PortalSiteMapProvider, SharePoint, sitemap, sites, subsites, web.config, webs, work around | No comments

Wednesday, January 30, 2013

Powershell Script to Delete Out Temporary Internet Files

Posted on 6:34 PM by Unknown
If you have a lot of user profiles on a box, the user profiles can start to take up a lot of disk space. This is especially so on a Citrix or terminal services server, but can affect any system where more than a few people logon. I wrote a quick powershell script that can be scheduled to clean these out.




############################################################
## Remove Temporary Internet Files From User Profiles
## Caution: Use at your own risk.
## No warranty expressed or implied.
## Written by: Greg Kjono on 12/1/2011
############################################################
$version = gwmi win32_operatingsystem | select version
$version = $version.version.substring(0,4)
$ErrorActionPreference = "Continue"

## Set profile root path based on OS.
if ($version -ge "6.0."){
[STRING]$ds = "C:\Users\"
}else{
[STRING]$ds = "C:\Documents and Settings\"
}

sl $ds
## Loop through each of the profiles and get temporary internet directories
foreach ($directory in get-childitem $ds -Force | where {$_.PsIsContainer}){
$dir = $ds + $directory + "\Local Settings\Temporary Internet Files\Content.IE5"
get-childitem $dir -Force | where {$_.PsIsContainer} | Remove-Item -Force -Recurse
}

## Delete any temporary internet files in %windir%\temp
$WinTempInet = $env:windir + '\temp\Temporary Internet Files\Content.IE5'
if ($WinTempInet){
sl $WinTempInet
foreach ($WinTempInetDir in get-childitem $WinTempInet -Force | where {$_.PsIsContainer}){
get-childitem $WinTempInetDir -Force | where {$_.PsIsContainer} | Remove-Item -Force -Recurse
}
}

Read More
Posted in Citrix, disk space, free disk space, powershell, script, scripting, Server Administration, temporary internet files, Windows Server | No comments

IIS Log Management Script in Powershell

Posted on 5:08 PM by Unknown
IIS logs on a busy webserver can use up a lot of disk space. I wrote this little powershell script that I schedule to run on all of my web servers. It goes in and deletes out any IIS logs older than 1 year. Then it compresses any IIS logs that are left which are older than 1 day and are not already compressed. You can change the length of time for these to suit your needs by changeing the numbers in the "AddDays(-123)" parts of the script. Just make sure it's a negative number, or else you won't have any logs left.


########################################################
## IIS Log Management
## Caution: Use at your own risk.
## No warranty expressed or implied.
## Written by: Greg Kjono on 12/1/2011
########################################################

$version = gwmi win32_operatingsystem | select version
$version = $version.version.substring(0,4)
$ErrorActionPreference = "Continue"

if ($version -ge "6.0."){
## If the OS is 2k8 or higher, set this log path
[STRING]$dir = "c:\inetpub\logs\logfiles\"
}else{
## Otherwise set this log path
[STRING]$dir = $env:windir + "\system32\LogFiles\"
}

if ($dir){
Set-Location $dir

## For all directories that start with "W3SVC" run the following
foreach ($LogDir in Get-ChildItem $dir | Where {$_.PsIsContainer -and $_.Name -match "^W3SVC"}){
[STRING]$wrkDir = $dir + $LogDir + "\"
Set-Location $wrkDir

## Delete iis logs older than 1 year
Get-ChildItem $wrkDir | where {$_.lastWriteTime -lt (Get-Date).AddDays(-365)} | Remove-Item -Force

## compress IIS logs older than 1 day that aren't already compressed
Foreach ($log in Get-ChildItem $wrkDir | where {$_.lastWriteTime -lt (Get-Date).AddDays(-1) -and $_.Attributes -notcontains 'Compressed'}){
$file = $wrkDir + $log.Name
$tempCmd = "Compact /C " + $file
Invoke-Expression -command $tempCmd
}
}
}

Read More
Posted in disk space, free disk space, IIS, Log Management, LogFiles, powershell, reclaim disk space, script, scripting, Server Administration, Windows 2000, Windows 2003, Windows 2008, Windows 2008 R2, WMI | No comments

Friday, January 18, 2013

Configuring a CRM Email Router to Run Under a Domain Service Account

Posted on 9:30 PM by Unknown
If you tried running the CRM 2011 email router under a domain service account, you probably ran into some issues. Please, do not take the easy way out and make the account an administrator, you can give it the rights it needs without going to that extent.

The first thing it needs is the "log on as service" user right, but it should get that granted when you configure the service to run under your service account in services.msc. So, I'm going to assume that's already taken care of.


At this point, you are probably getting an error something like this:


Log Name:      Application
Source: MSCRMEmail
Date: 1/15/2013 7:59:07 AM
Event ID: 16192
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: CrmServer.domain.com
Description:
#16192 - The E-mail Router service could not run the service main background thread. The E-mail Router service cannot continue and will now shut down. System.Configuration.ConfigurationErrorsException: System information was not specified in the E-mail Router service configuration file. The E-mail Router service cannot continue and will now shut down. ---> System.UnauthorizedAccessException: Access to the path 'D:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.xml' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Threading.CompressedStack.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at Microsoft.Crm.Tools.Email.Providers.ConfigFileReader..ctor(String filePath, ServiceLogger serviceLogger)
at Microsoft.Crm.Tools.Email.Providers.SystemConfiguration.Initialize(ServiceLogger serviceLogger)
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.InitializeSystemConfiguration()
--- End of inner exception stack trace ---
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.InitializeSystemConfiguration()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteService()
Event Xml:



16192
2
0
0x80000000000000

27722306
Application
CrmServer.domain.com



#16192 - The E-mail Router service could not run the service main background thread. The E-mail Router service cannot continue and will now shut down. System.Configuration.ConfigurationErrorsException: System information was not specified in the E-mail Router service configuration file. The E-mail Router service cannot continue and will now shut down. ---> System.UnauthorizedAccessException: Access to the path 'D:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.xml' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Threading.CompressedStack.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at Microsoft.Crm.Tools.Email.Providers.ConfigFileReader..ctor(String filePath, ServiceLogger serviceLogger)
at Microsoft.Crm.Tools.Email.Providers.SystemConfiguration.Initialize(ServiceLogger serviceLogger)
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.InitializeSystemConfiguration()
--- End of inner exception stack trace ---
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.InitializeSystemConfiguration()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteService()





Start by granting your service account read/execute rights to your email router service directory, which is something like D:\Program Files\Microsoft CRM Email\Service

Some of the files under this directory have broken security inheritance, so you will need to grant some more rights as well. Now, you need to grant your service account read/execute rights to the Microsoft.Crm.Tools.EmailAgent.xml file in that same email router service directory. After that you will probably get an error like this:


Log Name:      Application
Source: MSCRMEmail
Date: 1/15/2013 8:02:37 AM
Event ID: 16192
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: CrmServer.domain.com
Description:
#16192 - The E-mail Router service could not run the service main background thread. The E-mail Router service cannot continue and will now shut down. System.UnauthorizedAccessException: Access to the path 'D:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.SystemState.xml.bak' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
at Microsoft.Crm.Tools.Email.Providers.ConfigFileReader.Backup()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.UpdateConfiguration()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ScheduleProviderWork()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteService()
Event Xml:



16192
2
0
0x80000000000000

27722309
Application
CrmServer.domain.com



#16192 - The E-mail Router service could not run the service main background thread. The E-mail Router service cannot continue and will now shut down. System.UnauthorizedAccessException: Access to the path 'D:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.SystemState.xml.bak' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.File.InternalCopy(String sourceFileName, String destFileName, Boolean overwrite)
at Microsoft.Crm.Tools.Email.Providers.ConfigFileReader.Backup()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.UpdateConfiguration()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ScheduleProviderWork()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteService()





Now, you need to grant your service account full control rights to the Microsoft.Crm.Tools.EmailAgent.SystemState.xml.bak file in that CRM email router service directory. After which, you will probably get this error:


Log Name:      Application
Source: MSCRMEmail
Date: 1/15/2013 8:06:19 AM
Event ID: 26234
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: CrmServer.domain.com
Description:
#26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider. System.TypeInitializationException: The type initializer for 'Microsoft.Crm.Tools.Email.Providers.ProviderConfiguration' threw an exception. ---> System.UnauthorizedAccessException: Access to the path 'D:\Program Files\Microsoft CRM Email\Service\EncryptionKey.xml' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Threading.CompressedStack.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at Microsoft.Crm.Encryptor..ctor(String filePath)
at Microsoft.Crm.Tools.Email.Providers.ProviderConfiguration..cctor()
--- End of inner exception stack trace ---
at Microsoft.Crm.Tools.Email.Providers.Utility.GetCrmService(ProviderConfiguration providerConfiguration)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)
Event Xml:



26234
2
0
0x80000000000000

27722313
Application
CrmServer.domain.com



#26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider. System.TypeInitializationException: The type initializer for 'Microsoft.Crm.Tools.Email.Providers.ProviderConfiguration' threw an exception. ---> System.UnauthorizedAccessException: Access to the path 'D:\Program Files\Microsoft CRM Email\Service\EncryptionKey.xml' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn)
at System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver)
at System.Threading.CompressedStack.runTryCode(Object userData)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state)
at System.Xml.XmlTextReaderImpl.OpenUrl()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at System.Xml.XmlDocument.Load(String filename)
at Microsoft.Crm.Encryptor..ctor(String filePath)
at Microsoft.Crm.Tools.Email.Providers.ProviderConfiguration..cctor()
--- End of inner exception stack trace ---
at Microsoft.Crm.Tools.Email.Providers.Utility.GetCrmService(ProviderConfiguration providerConfiguration)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)





Now you need to grant your service account read/execute rights to the EncryptionKey.xml, which is in that same email router service directory. Then, it's on to the next error:


Log Name:      Application
Source: MSCRMEmail
Date: 1/15/2013 8:34:40 AM
Event ID: 26234
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: CrmServer.domain.com
Description:
#26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider. System.UnauthorizedAccessException: Access to the path 'D:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.SystemState.xml' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Xml.XmlDocument.Save(String filename)
at Microsoft.Crm.Tools.Email.Providers.ConfigFileReader.Save()
at Microsoft.Crm.Tools.Email.Providers.ConfigNodeReader.SetStringValue(String elementName, String setValue)
at Microsoft.Crm.Tools.Email.Providers.PollingMailboxProvider.Run()
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)
Event Xml:



26234
2
0
0x80000000000000

27729613
Application
CrmServer.domain.com



#26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.ExchangePollingMailboxProvider. System.UnauthorizedAccessException: Access to the path 'D:\Program Files\Microsoft CRM Email\Service\Microsoft.Crm.Tools.EmailAgent.SystemState.xml' is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at System.Xml.XmlDocument.Save(String filename)
at Microsoft.Crm.Tools.Email.Providers.ConfigFileReader.Save()
at Microsoft.Crm.Tools.Email.Providers.ConfigNodeReader.SetStringValue(String elementName, String setValue)
at Microsoft.Crm.Tools.Email.Providers.PollingMailboxProvider.Run()
at Microsoft.Crm.Tools.Email.Providers.CrmPollingMailboxProvider.Run()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)





To fix this error, you need to grant your service account full control rights to the Microsoft.Crm.Tools.EmailAgent.SystemState.Xml file in that same email router service directoy. After that, it should work.

So, to wrap things up in one place, you need to grant the following files/folders the corresponding rights.

File/FolderPermissions
D:\Program Files\Microsoft CRM Email\Serviceread/execute
Microsoft.Crm.Tools.EmailAgent.xmlread/execute
Microsoft.Crm.Tools.EmailAgent.SystemState.xml.bakfull control
EncryptionKey.xmlread/execute
Microsoft.Crm.Tools.EmailAgent.SystemState.Xmlfull control


Read More
Posted in domain account, email router, error, event ID# 16192, Event ID# 26234, Microsoft Dynamics CRM 2011, MSCRMEmail, Security, server, service account, services | No comments

MSCRMEmail: Metadata contains a reference that cannot be resolved

Posted on 7:31 PM by Unknown
Below is an error that can appear when you are running the CRM email router on the same server as your CRM web services. I experienced it after adding a second web site on the CRM server to run a portal that is back-ended by CRM. The error was also accompanied by high CPU and memory usage as well.


Log Name:      Application
Source: MSCRMEmail
Date: 1/15/2013 8:10:43 AM
Event ID: 26234
Task Category: None
Level: Error
Keywords: Classic
User: N/A
Computer: CrmServer.domain.com
Description:
#26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider. System.InvalidOperationException: Metadata contains a reference that cannot be resolved: 'https://crm.domain.com/organization/XrmServices/2011/Discovery.svc?wsdl'. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
--- End of inner exception stack trace ---
at Microsoft.Crm.ServiceProxyCache`1.GetNewServiceProxy(Uri serviceUrl, Credential credentials, Uri homeRealmUrl, String passportEnvironment, String onlineServiceEnvironment)
at Microsoft.Crm.Tools.Email.Providers.Utility.GetOrganizationUrl(Uri discoveryServiceUrl, Credential credentials, String organizationName)
at Microsoft.Crm.Tools.Email.Providers.Utility.GetCrmService(Uri discoveryUri, String authMode, String userName, String password)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)
Event Xml:



26234
2
0
0x80000000000000

27728919
Application
CrmServer.domain.com



#26234 - The E-mail Router service could not process a provider work item using assembly: Microsoft.Crm.Tools.EmailProviders.dll and class: Microsoft.Crm.Tools.Email.Providers.SmtpPollingSendEmailProvider. System.InvalidOperationException: Metadata contains a reference that cannot be resolved: 'https://crm.domain.com/organization/XrmServices/2011/Discovery.svc?wsdl'. ---> System.Net.WebException: The underlying connection was closed: An unexpected error occurred on a send. ---> System.IO.IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Net.TlsStream.ProcessAuthentication(LazyAsyncResult result)
at System.Net.TlsStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.ConnectStream.WriteHeaders(Boolean async)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Description.MetadataExchangeClient.MetadataLocationRetriever.DownloadMetadata(TimeoutHelper timeoutHelper)
at System.ServiceModel.Description.MetadataExchangeClient.MetadataRetriever.Retrieve(TimeoutHelper timeoutHelper)
--- End of inner exception stack trace ---
at Microsoft.Crm.ServiceProxyCache`1.GetNewServiceProxy(Uri serviceUrl, Credential credentials, Uri homeRealmUrl, String passportEnvironment, String onlineServiceEnvironment)
at Microsoft.Crm.Tools.Email.Providers.Utility.GetOrganizationUrl(Uri discoveryServiceUrl, Credential credentials, String organizationName)
at Microsoft.Crm.Tools.Email.Providers.Utility.GetCrmService(Uri discoveryUri, String authMode, String userName, String password)
at Microsoft.Crm.Tools.Email.Providers.CrmPollingSendEmailProvider.Run()
at Microsoft.Crm.Tools.Email.Agent.ServiceCore.ExecuteProviderWork(Object providerQueueRequestObject)



The problem stems from having the IIS website that CRM runs listening on a specific IP address, and not "All Unassigned". When you run the site under a specified IP binding, it no longer listens on the loopback IP 127.0.0.1. Consequently, the external email router service can no longer contact the CRM web services on that loopback connection.

Resolution:
To fix it, you have to set the bindings for the web site that CRM 2011 is running on to "All Unassigned" instead of the specified IP address that it's set to. To do that,
  1. Open the Internet Information Services (IIS) Manager.
  2. Click on Sites.
  3. Then click on your CRM web site.
  4. Click Bindings.
  5. Click Edit.
  6. Set the IP address to "All Unassigned".
  7. Click OK.
Option#2
Another possible issue is that the account that is running your CRM router service is having authentication issues. Make sure it isn't locked out, expired, or experiencing ADFS issues, and that it has all of the rights it needs in CRM. Check the account in the email router config that is used to connect to CRM too.
    Read More
    Posted in discovery service, email router, error, Event ID# 26234, IIS, loopback, Microsoft Dynamics CRM 2011, MSCRMEmail, reference, unexpected error, web services | No comments

    Saturday, January 12, 2013

    Tips on How to Free Disk Space on Your PC or Server

    Posted on 9:25 PM by Unknown
    I have noticed a lot of people on the internet having issues with their hard drives filling up "mysteriously" and they are not sure what to do to reclaim some of that disk space. I've already written a handful of articles that touch on various consumers of disk space, so I am going to bring all of them together in one place for your convenience. I will keep adding to this page as I write more articles that are along these same lines.


    One file that is often the culprit for using a bunch of disk space is your hibernation file (hiberfil.sys). Instructions on how to remove it are at http://nerdsknowbest.blogspot.com/2013/01/how-to-delete-hiberfilsys-on-windows.html

    Along those same lines, your page file (pagefil.sys) can suck up a lot more space than it necessarily needs to. Instructions on reconfiguring your page file to save disk space are available at http://nerdsknowbest.blogspot.com/2013/01/how-to-configure-your-page-file-to-save.html

    Shadow copy storage can use a use a lot of space as well. You can set a limit to the amount of storage shadow copies use on each drive in your PC and save disk space by doing so. Step-by-step directions on how to do that are at http://nerdsknowbest.blogspot.com/2013/01/phantom-space-used-in-windows-7-windows.html

    Your $TOPS file can build up and become rather large as well. You can reset this data on your next reboot and free up disk space. http://nerdsknowbest.blogspot.com/2013/01/phantom-space-used-in-windows-7-windows.html will walk you through how to do that.

    Read More
    Posted in $TOPS, disk space, free disk space, hard drive, hiberfil.sys, hibernation, no disk, page file, pagefile, pagefile.sys, reclaim disk space, shadow copy storage, transaction resource manager, Windows | No comments

    Friday, January 11, 2013

    How to Configure Your Page File to Save Disk Space

    Posted on 8:08 PM by Unknown
    Written by Greg Kjono

    There are a couple of hidden files that typically use up a lot of disk space, especially in systems that have large amounts of RAM. These are the pagefile.sys and hiberfil.sys. Hiberfil.sys can be deleted if you don't use the hibernation feature. Instructions on how to do that are available at http://nerdsknowbest.blogspot.com/2013/01/how-to-delete-hiberfilsys-on-windows.html.

    I don't recommend completely removing the pagefile, especially on desktops and laptops, however. You can configure them to not use so much disk space though. By default they are set to "system managed" and are probably close in size to the amount of memory you have in your PC. Chances are that you aren't actually using most of that space in the page file, and that your computer is just allocating that space in case it needs it in the future.


    There is a slight perfomance hit everytime your pagefile needs to expand itself, and that's the tradeoff of starting it with a smaller size. However, if you have a lot of RAM, you probably won't be using the page file much, and therefore it won't have to expand very often. This performance hit probalby won't be noticible to the average user either.

    To change the size of the page file, right-click on "Computer" or "My Computer" depending on what OS you have. This is usually located on your desktop and/or your start menu. Then click on "properties" from the menu that opens up. If you are running Windows 7, Vista or 2008, click on "Advanced system settings" on the left side of the window that opens. Windows XP, 2000 or 2003 users just need to click on the advanced tab. Click on "settings" in the performance section, and then click on the advanced tab. Next, click on the "Change..." button in the virtual memory section.

    Uncheck the box that says "Automatically manage paging file size for all drives". Select you C: drive from the drives shown, and select the "custom size" radial button. I recommend setting the "Initial size (MB)" somewhere between 512 and 1024 (set it to a number divisible by 8). If you only have one hard drive in your PC, then set the maximum to recommended  amount shown towards the bottom of the window. Then click "set".

    If you have multiple hard drives, you can split this up between the drives by selecting each of the drives and configuring the "Custom size" on each of them. If you do that, just split the maximum size between the amount of drives you are putting a page file on.

    When you are all done, click "OK" through all of the screens. It will warn you that you need to reboot before the changes take effect, and give you the option whether to reboot now or at a later time.

    You can also you this method to completely move the pagefile to a different drive if you want, but doing so will eliminate the ability for your system to create dump files that can be helpful in troubleshooting issues.


     Also see: Tips on How to Free Disk Space on Your PC or Server


    Read More
    Posted in configure, disk space, hiberfil.sys, hibernation, page file, pagefile, pagefile.sys, shrink, Windows 2000, Windows 2003, Windows 2008, Windows 2008 R2, Windows 7, Windows Vista, Windows XP | No comments

    Wednesday, January 9, 2013

    How to associate a second YouTube channel with a Google Adsense account

    Posted on 7:23 PM by Unknown
    If you created a second YouTube channel and you are want to link it to your original adsense account, then you are in the right place. It's not a hard thing to do. It's just that some of the peices are kind of hidden on YouTube's site.

    I am going to assume that you have already created a second YouTube channel and that you want to link it to your adsense account. First, log into the YouTube channel that you want to tie to your adsense account.


    After that, you need to click on the down-arrow next to your avatar in the upper-right corner of your screen, and choose "Settings".

    Then you have to click on "Monetization" on the left side of the screen.

    Next, click "enable my account", if you haven't done that already.

    Read through the terms, and check the three boxes provided if you agree with them. Then click "I accept".

    Click the "Got It" button.

    Now, click on "Settings" on the navigation bar.

    Then, click on "Monetization" on the left side of the screen again.

    Click on "How will I get paid?".

    Then click the "associate an adsense account" link (Chances are that this is the part you couldn't find).

    Click the next button at the bottom of the page.

    Then click on "Yes, proceed to Google Account sign in" to login with an existing google adsense account.

    Log in with the credentials of the Google Adsense account that you want to associate with your YouTube channel.

    The URL of your YouTube channel should load automatically.

    Read the program policies, and if you agree select the check box, then click the "accept association" button.

    And there you go, your new YouTube channel is associated with your other Adsense account.
    Read More
    Posted in Adsense, Adsense Association, Advertising Income, associate an adsense account, Channel, Google, Google Adsense, Monetization, Multiple Logins, Passive Income, Walk-Through, YouTube, YouTube Publishing | No comments

    Error! Windows - No Disk: Exception Processing Message c0000013 Parameters 75a851d8 979a26dc 75a851d8 75a851d8

    Posted on 5:21 PM by Unknown
    This is one of those errors that doesn't really give you any information to go on. All you really get is this popup message that say Windows - No Disk: Exception Processing Message c0000013 Parameters 75a851d8 979a26dc 75a851d8 75a851d8.

    Error! Windows - No Disk: Exception Processing Message c0000013 Parameters 75a851d8 979a26dc 75a851d8 75a851d8


    You probably see this one more on desktop OSs like Windows XP, Vista or 7, but I have gotten it on servers as well. The problem stems from removing hardware without stopping it first.

    To fix the issue, go into "Safely Remove Hardware" located in your system tray, and stop the device that you removed.
    Read More
    Posted in Destop, error, exception processing message, fix, no disk, resolution, server, solution, VM, Windows 2003, Windows 2008, Windows 2008 R2, Windows 7, Windows XP | No comments

    Sunday, January 6, 2013

    Disable Weak SSL Ciphers and Protocols in Windows, IIS, ISA, TMG & UAG

    Posted on 7:10 PM by Unknown
    You should disable the weak SSL ciphers and protocols that are riddled with vulnerabilities and security flaws on any Microsoft Windows server running IIS, ISA, TMG and UAG.

    The resolution for this weakness is rather simple. Merge the data below into your registry and reboot. That's it.

    The easiest way to do that is to copy the text from the white box below, past it into notepad and save the file with a ".reg" extension (make sure to change the "Save as type" to "All Files". Backup your registry, then right-click the file and select "merge". Click "Yes" and you are done. If you are running UAC, you need to click "yes" twice.





    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders]
    "SecurityProviders"="msapsspc.dll, schannel.dll, digest.dll, msnsspc.dll"

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SaslProfiles]
    "GSSAPI"="Kerberos"

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL]
    "EventLogging"=dword:00000001

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\DES 56/56]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\NULL]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 128/128]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC2 40/128]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 128/128]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 40/128]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\RC4 56/128]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Ciphers\Triple DES 168/168]
    "Enabled"=dword:ffffffff

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Hashes]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Hashes\MD5]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Hashes\SHA]
    "Enabled"=dword:ffffffff

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\KeyExchangeAlgorithms]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\KeyExchangeAlgorithms\Diffie-Hellman]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\KeyExchangeAlgorithms\PKCS]
    "Enabled"=dword:ffffffff

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Client]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\PCT 1.0\Server]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Client]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 2.0\Server]
    "Enabled"=dword:00000000

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Client]
    "Enabled"=dword:00000001

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server]
    "Enabled"=dword:00000001

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Client]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0\Server]

    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\WDigest]
    "Negotiate"=dword:00000000
    "UTF8HTTP"=dword:00000001
    "UTF8SASL"=dword:00000001

    Caution: Use at your own risk. No warranty expressed or implied.
    Also see: http://support.microsoft.com/kb/245030
    Read More
    Posted in Ciphers, Hashes, IIS, ISA, Key Exchange Algorithms, PCT, sasl profiles, schannel ciphers, schannel protocols, Security, security providers, SSL, TLS, TMG, UAG, wdigest, Weak SSL, Windows Server | No comments

    Thursday, January 3, 2013

    Phantom space used in Windows 7, Windows Server 2008, Windows Server 2008 R2, and Windows Vista

    Posted on 7:59 PM by Unknown
    A common issue that has baffled a lot of administrators is where a large amount of disk space is showed as in use, but they can’t find the files that are using it. For example, ff you go to the root of the C: drive, select all of the files, right-click, and click properties. The amount of space shown as used on that properties window isn’t nearly what it should be if you deduct it from the size of the drive and compare your results to the free space that Windows explorer, or my computer shows.

    There are a couple things that most often contribute to this. The first is a bloated, oversized $TOPS file. You can set your system to specify that the Transaction Resource Manager will clean the transactional metadata on the next mount, or reboot.

    To do this, start and elevated or administrative command prompt and run the following command
    fsutil resource setautoreset true c:\

    The second thing is shadow copies, which can use up a lot of disk space. This option can be used on Windows XP and Windows Server 2003/2003 R2 as well. To see how much space is being used by shadow copies, you can run the following command from an elevated command prompt
    vssadmin list shadowstorage
    For each volume that has shadow copies enabled, it will display the:
    1.       Used Shadow Copy Storage space
    2.       Allocated Shadow Copy Storage space
    3.       Maximum Shadow Copy Storage space
    You can delete the shadow copies using the “vssadmin delete shadows /all” command from the command prompt, but they will probably accumulate rather quickly if you don’t set a new max limit on the shadow copy storage.  There are a few parts to this command. The /For flag specifies the drive that’s using the shadow storage. The /On flag specifies the drive where the shadow storage exists. Finally, the /MaxSize flag specifies the new limit for shadow copy storage, which can be specified in KB, MB, GB, TB, PB, EB or a percentage. Below are a couple examples.
    vssadmin Resize ShadowStorage /For=C: /On=D: /MaxSize=2GB
    vssadmin Resize ShadowStorage /For=C: /On=C: /MaxSize=10%


     Also see: Tips on How to Free Disk Space on Your PC or Server


    Read More
    Posted in disk space, fsutil, shadow copy storage, tops file, transaction resource manager, vss storage, Windows 2008, Windows 2008 R2, Windows 7, Windows Vista | No comments

    How to delete hiberfil.sys on Windows 2008/Vista/Windows 7

    Posted on 3:49 PM by Unknown
    In Windows 2008, 2008 R2, Vista and Window 7, disabling hibernation via Power Options in the control panel doesn't get rid of the hiberfil.sys file. This file is usually equal to the amount of memory your system has, so it eats up a lot of disk space. This is  especially true if you have a lot of memory which is common on servers, or a small amount of disk which is common on virtual machines. To get rid of this file and free disk space, just run the following command from an elevated, or administrative command prompt.


    powercfg /h off



     Also see: Tips on How to Free Disk Space on Your PC or Server


    Read More
    Posted in disk space, hiberfil.sys, hibernation, powercfg, Windows 2008, Windows 2008 R2, Windows 7, Windows Vista | No comments

    Wednesday, January 2, 2013

    Symantec Endpoint Protection 12.1 clients are holding onto multiple virus definitions, using a lot of disk space

    Posted on 5:00 PM by Unknown
    There is a known issue with Symantec Endpoint Protection 12.1 clients where it does not delete the old virus definition files. These definition files build up and start consuming gigs and gigs of disk space.

    They do have a fix for it now, which involves upgrading to Update Rollup 2 (UR2). Unfortunately,  you might not be able to upgrade right away. As a workaround, I wrote the powershell script below that will cleanup the old definition files. I schedule this to run daily.


    ########################################################
    ## Cleanup old Symantec Definition files
    ## http://NerdsKnowBest.blogspot.com
    ## Always evaluate any script before use.
    ## Caution: Use at your own risk.
    ## No warranty expressed or implied.
    ## Written by: Greg Kjono on 12/14/2012
    ########################################################
    $version = gwmi win32_operatingsystem | select version
    $version = $version.version.substring(0,4)
    $ErrorActionPreference = "Continue"
    c:

    ## Set the definition path based on the OS version
    if ($version -ge "6.0."){
    ## >=W2k8
    [String]$dir = 'C:\ProgramData\Symantec\Symantec Endpoint Protection\12.1.1101.401.105\Data\Definitions\VirusDefs'
    }else{
    ## <= W2k3
    [String]$dir = 'C:\Documents and Settings\All Users\Application Data\Symantec\Symantec Endpoint Protection\12.1.1101.401.105\Data\Definitions\VirusDefs'
    }

    ## Get directory list
    $dirs = Get-ChildItem $dir | Where {$_.PsIsContainer -and $_.Name -match "^201"} | Sort-Object Name -Descending

    ## Identify the most current definition(s)
    $Current = $dirs[0].Name.substring(0,8)

    ## Remove the older definition files
    Get-ChildItem $dir | Where {$_.PsIsContainer -and $_.Name -match "^201" -and $_.Name -notmatch "^$Current"} | Remove-Item -Recurse -Force

    Please evaluate the script for your systems/environment. Use at your own risk.

    Show your appreciation by liking/sharing/+1ing this blog below.
    Read More
    Posted in definition files, disk space, patch, powershell, script, scripting, Symantec Endpoint Protection, upgrade, virus definitions | No comments
    Newer Posts Older Posts Home
    Subscribe to: Comments (Atom)

    Popular Posts

    • Resolved: IDRAC Drive Error Either Virtual Media is detached or redirection for the selected virtual disk drive is already in use
      I haven't used Dell servers much in an enterprise environment, so working with their IDRAC (Integrated Dell Remote Access Controller) co...
    • The Distributed Transaction Coordinator service terminated with service-specific error 3221229584 (0xC0001010).
      If you get the following error in the system event logs while trying to start the Distributed Transaction Coordinator service, we can help. ...
    • Resolution: Visual Studio Test Agent Unable to Connect to the controller. There is no agent registered...
      Problem: I discovered a weird quirk with the Visual Studio Test Agents (a.k.a. TFS Test Agents). We were trying to set them up to do some l...
    • How to Setup Visual Studio (TFS) Test Agents in the Cloud
      We ran into some issues trying to get the Visual Studio Test Agents to register and communicate with the Visual Studio Test Controller when ...
    • Fix Event ID# 7043 Load control template file /_controltemplates/TaxonomyPicker.ascx failed: Could not load type
      This is an error that's a little misleading. At first it might seem that the file is missing or that there is a permissions issue, but t...
    • How to Delegate Rights to Modify SPNs in Active Directory
      With Kerberos taking over as the preferred authentication protocol, system administrators need to be able to modify the SPN for their servic...
    • Error! Windows - No Disk: Exception Processing Message c0000013 Parameters 75a851d8 979a26dc 75a851d8 75a851d8
      This is one of those errors that doesn't really give you any information to go on. All you really get is this popup message that say Win...
    • How to Turn On Debug Logging for Group Policy
      When you are troubleshooting group policy issues, it's helpful to turn on some additional logging. Unfortunately, it's not just a si...
    • How to Configure Windows Event Logs as SNMP Traps
      There are a lot of different monitoring suites out there that monitor servers by using SNMP traps. If you want to be alerted when a specific...
    • Resolution: Error during encryption or decryption. System error code 997 in SharePoint
      I was recently ran into an issue in SharePoint where my Central Administration web app disappeared. When I tried to redeploy Central Adminis...

    Categories

    • %windir%\system32\evntwin.exe
    • $TOPS
    • 0x80300001
    • 2010
    • 404
    • 997
    • Active Directory
    • Active Directory Federation Services
    • ADDS
    • ADFS
    • ADFSRelyingPartyTrust
    • adminvs
    • Adsense
    • Adsense Association
    • Advertising Income
    • AIDS
    • Amazon AWS
    • Android
    • Apple
    • associate an adsense account
    • Attribute objecttypecode
    • Authentication is Required
    • AxQuickMksAxCtl
    • bcdedit
    • block
    • BYOD
    • cell phone
    • certificate of authenticity
    • Channel
    • Ciphers
    • Citrix
    • cloud
    • commerce server 2007
    • commerce server 2009
    • configure
    • connection pooling
    • ControlTemplates
    • corrupt
    • could not load type
    • crash
    • credential caching
    • CurrentNavSiteMapProvider
    • Data Execution Prevention
    • dbo.DependencyBase
    • DC
    • debug
    • decryption
    • definition files
    • Dell
    • demotion
    • DEP
    • Destop
    • detached
    • devices
    • devmgmt.msc
    • devmgr_show_nonpresent_devices
    • Disable ADFS Credential Caching
    • discovery service
    • disk drive
    • disk space
    • distributed computing
    • Distributed Transaction Coordinator service
    • DNS
    • domain
    • domain account
    • Domain Controllers
    • Drivers
    • dsacls
    • duplicate key
    • DynamicChildLimit
    • EC2
    • education
    • email router
    • encryption
    • enterprise
    • error
    • error code 997
    • error status: 1603
    • event ID# 1033
    • event ID# 16192
    • Event ID# 26234
    • event id# 7024
    • event ID# 7043
    • Event Logs
    • Event Sources
    • Event to Trap Translator
    • Exception
    • exception processing message
    • facebook
    • failed
    • FarmAdmin
    • fight aids
    • FightAIDS@Home
    • filter
    • fix
    • free
    • free disk space
    • free download
    • freeware
    • fsutil
    • game
    • games
    • Generate Trap
    • ghost devices
    • Google
    • Google Adsense
    • google-corpeng
    • GPO
    • gpresult
    • grid computing
    • group policy debug logging
    • group policy logging
    • hard drive
    • Hashes
    • HBA
    • hiberfil.sys
    • hibernation
    • hidden devices
    • hotfix
    • how to
    • IDRAC
    • IIS
    • index
    • Install
    • Integrated Dell Remote Access Controller
    • invalid code received
    • invalid operation exception
    • invites
    • IP Address
    • ISA
    • iso
    • KB
    • kerberos
    • key code
    • Key Exchange Algorithms
    • libraries
    • license key
    • limit
    • list
    • lists
    • load testing
    • lockdown
    • Log Management
    • LogFiles
    • logons per second
    • loopback
    • LSA
    • LsaLookupCacheMaxSize;
    • Mac OS X
    • Macs
    • management
    • menu
    • metadata cleanup
    • Microsoft
    • Microsoft Dynamics CRM 2011
    • Microsoft Dynamics CRM 4.0
    • Microsoft Office 2003
    • Microsoft Office 2007
    • Microsoft TechEd
    • Microsoft.VisualStudio.TestTools.Exceptions.EqtException
    • mobile phone
    • Monetization
    • Monitoring Suites
    • MSCRMEmail
    • msdtc. resetlog
    • Multiple Logins
    • Navigation
    • ndx_UniqueDependencyNodes
    • network adapter
    • Network connections
    • news feed
    • NIC
    • no disk
    • ntdsutil
    • open source
    • Operating System
    • OS
    • package management
    • page file
    • pagefile
    • pagefile.sys
    • pages
    • Passive Income
    • patch
    • patch management
    • patches
    • PCT
    • performance tuning
    • picklist
    • PortalSiteMapProvider
    • powercfg
    • powershell
    • PrincipalObjectAccessReadSnapshot
    • product key
    • psconfig
    • query group policy
    • r2
    • RAID controller
    • reclaim disk space
    • redirection
    • reference
    • registry key
    • remove
    • remove selected server
    • resolution
    • resource unavailable
    • rights
    • rights delegation
    • root hints
    • RSPO
    • run error detected
    • sasl profiles
    • SCCM
    • schannel ciphers
    • schannel protocols
    • script
    • scripting
    • SCSI controller
    • Security
    • security event logs
    • security providers
    • server
    • Server Administration
    • service account
    • Service Control Manager
    • service principle name
    • servicePrincipleName
    • services
    • session
    • shadow copy storage
    • SharePoint
    • sharepoint 2007
    • Sharepoint 2010
    • sharepoint 2013
    • shrink
    • Simian
    • sitemap
    • sites
    • smart phone
    • SNMP
    • SNMP Monitoring
    • SNMP Traps
    • social networking
    • software
    • software deployment
    • solution
    • sql
    • SSL
    • STIGS
    • stsadm
    • subsites
    • Symantec Endpoint Protection
    • system event logs
    • TaxonomyPicker.ascx
    • temporary internet files
    • Test Agents
    • Test Controller
    • Test Tools
    • TFS
    • the farm is unavailable
    • timeout
    • TLS
    • TMG
    • TokenLifetime
    • tops file
    • training
    • transaction resource manager
    • troubleshooting
    • troubleshooting group policy
    • UAG
    • unexpected error
    • update rollups
    • UpdateFarmCredentials
    • upgrade
    • user
    • users
    • videos
    • virtual adapter
    • Virtual Infrastructure Client
    • virtual media
    • virus definitions
    • Visual Studio
    • VM
    • VMWare
    • VSphere client
    • vss storage
    • Walk-Through
    • wcat
    • wcat.wsf
    • wcclient
    • wcctl
    • wdigest
    • Weak SSL
    • web services
    • web.config
    • webs
    • website
    • Windows
    • Windows 2000
    • Windows 2003
    • Windows 2008
    • Windows 2008 R2
    • Windows 2012 R2
    • Windows 7
    • Windows 8.1
    • Windows Azure
    • windows desktop
    • Windows Live ID Sign-in Assistant
    • Windows Server
    • windows update service
    • Windows Vista
    • Windows XP
    • Windwos DNS
    • WMI
    • wmic
    • work around
    • Workstation
    • world community grid
    • xml
    • YouTube
    • YouTube Publishing

    Blog Archive

    • ▼  2013 (42)
      • ►  October (4)
      • ►  September (3)
      • ►  July (2)
      • ►  June (1)
      • ►  May (1)
      • ►  April (4)
      • ►  March (10)
      • ►  February (4)
      • ▼  January (13)
        • SharePoint Navigation Limited to 50 Items
        • Powershell Script to Delete Out Temporary Internet...
        • IIS Log Management Script in Powershell
        • Configuring a CRM Email Router to Run Under a Doma...
        • MSCRMEmail: Metadata contains a reference that can...
        • Tips on How to Free Disk Space on Your PC or Server
        • How to Configure Your Page File to Save Disk Space
        • How to associate a second YouTube channel with a G...
        • Error! Windows - No Disk: Exception Processing Mes...
        • Disable Weak SSL Ciphers and Protocols in Windows,...
        • Phantom space used in Windows 7, Windows Server 20...
        • How to delete hiberfil.sys on Windows 2008/Vista/W...
        • Symantec Endpoint Protection 12.1 clients are hold...
    • ►  2012 (1)
      • ►  December (1)
    Powered by Blogger.

    About Me

    Unknown
    View my complete profile