Month: July 2014
How to find path and file name of a specific document in Velocity
This is a procedure for finding a specific document path from Fiserv Velocity application:
use prod_docs
select * from prod_docs.dbo.imageallocation
where (AllocationID in
(Select DocumentKey from prod_app.dbo.documents where
documentid=XXXXX))
or use an inner join
select a.allocationid, a.folderid, a.imagepath, b.documentid
from prod_docs.dbo.imageallocation a
inner join prod_app.dbo.documents b
on a.allocationid = b.documentkey
where b.documentid=XXXXX
How to encrypt a column in MSSQL
When creating a table, there may be a need to set encryption for a specific column. Let us say you create a logins table with columns for username and password. Most likely, you would want the password column to be encrypted so it won’t be visible to anybody that has access to the database.
Here is one way you can enable encryption:
1. First you have to set the data type of the column to varbinary(100) or (max)
2. Next, is you can add the function PWDENCRYPT in your T-SQL script
example:
update employees.dbo.logins
set password = (PWDENCRYPT(‘Password Here’))
where employeeid = 1
Once you commit the changes, your password value will be converted to something similar to 0x0200635…
Fix: Cannot remove additional mailboxes in Outlook
If you are unable to remove additional mailboxes, you may have to open ADSIEDIT.msc and drill down to the account you wish to be removed from, and look for the “MSExchDelegateListLink” attribute and remove yourself from that list.
How to trace and fix a MAPI error 9646 in Exchange
The error below indicates that the MaxObjsPerMapiSession object in HKLM > System > CurrentControlSet > Services > MSExchangeIS > ParametersSystem has exceeded the limit:
Mapi session “92d354d5-d7e7-403e-98f9-cbe4d35a9838” exceeded the maximum of 500 objects of type “objtFolder“.
To find out the user mailbox, download ADFIND and run the following command:
adfind -gc -b “” -binenc -f ” msExchMailboxGUID={{GUID:92d354d5-d7e7-403e-98f9-cbe4d35a9838}}” -dn
Once you know who the user mailbox belongs to, you can run a script to count and verify how many objects there are for the mailbox.
(Get-MailboxFolderStatistics -id %username%).count
As needed, you can adjust the objtFolder and objtFolderView parameters in the registry.
Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MSExchangeIS\ParametersSystem.
Get status of a Public Folder replication
Run the powershell command
Set-ExecutionPolicy Unrestricted
To run the report and get a list of data objects returned that can be further processed, just call the script with no parameters:
.\Get-PublicFolderReplicationReport.ps1
If you’d like to export the HTML report to a file, then use the -Filename parameter:
.\Get-PublicFolderReplicationReport.ps1 -Filename “PublicFolderReplicationReport.html”
If you’d like to send an email, use the -SendEmail switch:
.\Get-PublicFolderReplicationReport.ps1 -SendEmail -To me@mydomain.local -From PFReport@mydomain.local -SmtpServer smtp.mydomain.local -Subject “Public Folder Replication Report”
Note: When using the -SendEmail switch, the -To, -From and -SmtpServer parameters are mandatory.
If you want to limit to only scanning specified servers, use the -ComputerName parameter:
.\Get-PublicFolderReplicationReport.ps1 -ComputerName @(“EXCH01”, “EXCH02”)
If you want to limit to only scanning specific Public Folders, use the -FolderPath parameter:
.\Get-PublicFolderReplicationReport.ps1 -FolderPath @(“\MyFolder1”, “\MyFolder2”)
If you want to scan a specific Public Folder and all subfolders, use the -Recurse switch:
.\Get-PublicFolderReplicationReport.ps1 -FolderPath “\MyFolderPath” -Recurse
Creating a new Journaler database
1. Under Server Configuration, create a new Journaler Storage mailbox database
2. Create a new user and point it to the new Journaler Storage mailbox
3. Make sure mailbox quoate is set correctly for the user
4. In Organization Configuration > Hub Transport > Journaling, create a new Journal Rule and select the new user in “Send Journal Report to email address”. Select proper Scope
Forcing Exchange mailbox cleanup
One of the reasons why we need to force a database cleanup in exchange is when we wanted the deleted users objects list updated.
First, you have to get the mailbox name,
Get-mailboxdatabase
Next, is to run the cleanup command against the mailbox
Clean-mailboxdatabase “<database name>”
How to renew certificates in Exchange 2007
1. The logs usually tell you what certificates are about to expire or has expired
2. Run the commandlet New-ExchangeCertificate to renew Exchange Transport certificates
3. Open MMC and add certificates snap-in, select Computer Account. And then under Personal Certificates, look for the cert and renew using the same key.
4. Once renewed, make sure it is trusted, if not, copy and paste the cert into Trusted Root Certification Authority Certificates
How to create a web server certificate for UAG 2010
1. Request for a new certificate in Exchange 2010
2. In Exchange Configuration, under Client Access Server(Outlook Web App), check ‘Outlook Web App is on the Internet’
3. And make sure <external web address> is added
4. In Certificate Domains, add the FQDN of the exchange server and make sure to set <external webmail address> as the Common Name
autodiscover.<domain>.org
<domain>.org
<exchange server FQDN> ex. EX01.corp.domain.org
<external webmail address> ex. webmail2.domain.org
5. Save the request file and then proceed to the CA authority
6. Request for the certificate and make sure to download using ‘BASE 64 encoded’
7. Export the personal certificate from Exchange and import to UAG using MMC
How to request an Exchange Certificate
1. In Exchange 2010, under Server Configuration, right-click on the server and select ‘New Exchange Certificate’.
2. Enter the friendly name for the new cert
3. Under Client Access server, enter the domain name for under ‘Outlook Web App is on the internet (for activesync – enter the <web internet address> ex. webmail.domain.org)
4. Enter OU information and select a location where you wanted to save the request file
5. Once completed, open the URL for the CERT server http://servername/certsrv
6. Select ‘Request a certificate’ under the task
7. Select ‘Submit a certificate request using a base-64-encoding
8. Open the request file you saved previously using a notepad and copy and paste the info in the certificate request window
9. Select ‘Web Server’ as Certificate Template and hit submit
10. Save the new cert then go back to the Exchange server and complete the request by point the request to the new cert
IMPORTANT: Open MMC Certificate and make sure there are no certificates that are self-signed. Delete any expired certificates if you can to avoid conflict.
To add a cert with alternate subjects:
1. Open MMC Certificate
2. Under Personal Cert, request for a new cert and select Computer Account
3. Select ‘Web Server’ and under Subject, Alternative Name, select DNS and add the alternate DNS names for the web server
4. Under the Private Key tab, expand Key Options and check ‘Make private key exportable’ and hit Apply
5. Once the certificate is generated, go back to MMC and assign appropriate roles for the certificate
6. Also, do not forget to import the same certificate to Trusted Root
- ← Previous
- 1
- 2
- 3
- Next →