Monthly Archives: July 2012

Softgrid Appv: Clear AppV Cache

Sometimes problem with AppV Client can be resolving by clearing up the application cache.

To get a list of cache application:

sftmime query obj:app /short

To Remove just one programs from the cache:

sftmime.exe remove app:”ApplicationName” /complete

To empty the cache:

sftmime.exe remove obj:app /global /complete

If you want to wipe the complete cache, you can change State key to Zero, and then reboot the machine.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SoftGrid\4.5\Client\AppFS\

Change autodiscover URL (EWS URL / OAB URL / ECP URL / Activesync URL) – Exchange 2010

If you want to change Autodiscover / EWS / OAB / OWA / ECP / Activesync Url, this is how it works

Set-WebServicesVirtualDirectory -Identity “SERVERNAME\EWS (Default Web Site)” -InternalUrl https://INTERNALURL/EWS/Exchange.asmx -externalurl https://EXTERNALURL/EWS/Exchange.asmx -BasicAuthentication:$true

Set-AutoDiscoverVirtualDirectory -Identity "SERVERNAME\Autodiscover (Default Web Site)" -internalurl https://INTERNALURL/autodiscover/autodiscover.xml -externalurl https://EXTERNALURL/autodiscover/autodiscover.xml

set-OabVirtualDirectory -identity "SERVERNAME\OAB (Default Web Site)" -internalurl https://INTERNALURL/OAB -externalurl https://EXTERNALURL/OAB

set-EcpVirtualDirectory -identity "SERVERNAME\ecp (Default Web Site)" -internalurl https://INTERNALURL/ecp -externalurl https://EXTERNALURL/ecp

set-OwaVirtualDirectory -identity "SERVERNAME\owa (Default Web Site)" -internalurl https://INTERNALURL/owa -externalurl https://EXTERNALURL/owa

set-ActiveSyncVirtualDirectory  -identity "SERVERNAME\Microsoft-Server-ActiveSync (Default Web Site)" -internalurl https://INTERNALURL/Microsoft-Server-ActiveSync -externalurl https://EXTERNALURL/Microsoft-Server-ActiveSync

Set-ClientAccessServer -Identity "SERVERNAME" –AutoDiscoverServiceInternalUri https://INTERNALURL/autodiscover/autodiscover.xml

Or if this is a single server installation you can do it like this:

get-WebServicesVirtualDirectory | Set-WebServicesVirtualDirectory -InternalUrl https://INTERNALURL/EWS/Exchange.asmx -externalurl https://EXTERNALURL/EWS/Exchange.asmx -BasicAuthentication:$true

get-AutoDiscoverVirtualDirectory | Set-AutoDiscoverVirtualDirectory -internalurl https://INTERNALURL/autodiscover/autodiscover.xml -externalurl https://EXTERNALURL/autodiscover/autodiscover.xml

get-OabVirtualDirectory | set-OabVirtualDirectory -internalurl https://INTERNALURL/OAB -externalurl https://EXTERNALURL/OAB

get-EcpVirtualDirectory | set-EcpVirtualDirectory -internalurl https://INTERNALURL/ecp -externalurl https://EXTERNALURL/ecp

get-OwaVirtualDirectory | set-OwaVirtualDirectory -internalurl https://INTERNALURL/owa -externalurl https://EXTERNALURL/owa

get-ActiveSyncVirtualDirectory | set-ActiveSyncVirtualDirectory  -internalurl https://INTERNALURL/Microsoft-Server-ActiveSync -externalurl https://EXTERNALURL/Microsoft-Server-ActiveSync

get-ClientAccessServer | Set-ClientAccessServer  –AutoDiscoverServiceInternalUri https://INTERNALURL/autodiscover/autodiscover.xml

Get mailboxes and witch groups there are member of

I need to get all mailboxes, and witch group there are member of.

You need Quest ActiveRoles Management Shell for this to work:
http://www.quest.com/powershell/activeroles-server.aspx

Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue

$File = "C:\groupslog.txt"
$Mailboxes = Get-mailbox -resultsize unlimited | select sAMAccountName,name,alias
$Mailboxes | ForEach {
   $User = Get-QADUser -samaccountname $_.sAMAccountName | Select sAMAccountName, memberOf
   $Line = $_.sAMAccountName
   ForEach ($GroupDN In $User.memberOf)
   {
      $Group = (Get-QADGroup $GroupDN | Select sAMAccountName).sAMAccountName
      $Line = "$Line,$Group"
   }
   echo $Line
} | out-File $File

In the file c:\groupslog.txt each line is a mailbox, and the first entry is the sAMAccountName, and each entry after this is the group the Mailbox is member of.