Wednesday, 17 April 2013

How do I back up my signatures?


People often ask how to copy Outlook signatures between multiple computers. In this post, I’ll describe how to accomplish that task using a little known keyboard shortcut.
clip_image002

1. On the Tools menu, click Options, and select the Mail Format tab
clip_image004
2. Hold down <ctrl> key while clicking the Signatures… button
clip_image006
3. The folder containing your signatures will open
clip_image008
4. Copy all of the files and folders in the Signatures folder to the location where you back up your files (e.g. flash drive, external hard drive, another computer)
5. Now open the Signatures folder on your other computer by repeating the first three steps and then copy the files you just backed up to that folder
6. The next time you use Outlook on the other computer, your signatures will show up in the E-mail Signatures tab of the Signatures and Stationery dialog box and on the Insert tab in the inspector
clip_image010
clip_image012
7. If you’d like any of those signatures to be automatically applied to new messages or replies/forwards when using the other computer, open the E-mail Signatures tab of the Signatures and Stationery dialog box to configure a default signature for either type of message
clip_image014

Ellen Adams, Microsoft Office Outlook Program Manager
`·.¸¸ ><((((º>.·´¯`·><((((º>
><((((º> ·...><((((º>
·...><((((º>

Monday, 25 March 2013

WSUS Server Cleanup Wizard Hangs on "Deleting unused updates..."


While cleaning off my Desktop this morning, I came across a file that I created back in December capturing my notes from a problem I was having with Windows Server Update Services (WSUS). Evidently I intended to blog about the issue, but apparently this task kept getting pushed to the back burner. Before moving on to more fun things today, I thought I should get this off my to-do list.

Back in December, I noticed that my local WSUS server showed that I had 24,890 updates downloaded and available for install. I remember thinking something to the effect of: "Wow, that's a lot of updates!"

Looking at my E:\WSUS folder (where the updates are downloaded), I found that it contained the following:
 •51.4 GB of content
 •6,509 files in 258 folders

I then ran the WSUS Server Cleanup Wizard as I had attempted (unsuccessfully) on several occasions in the past, selecting all of the options:

 •Unused updates and update revisions
 •Computers not contacting the server
 •Unneeded update files
 •Expired updates
 •Superseded updates

As with my previous attempts, the cleanup appeared to hang on the following step:

Deleting unused updates...

I decided that I should try to show a little more patience than I had in the past and consequently let it run for over 24 hours (thinking it might eventually finish). You can imagine my frustration when I came back the next morning only to find that it was still “"Deleting unused updates..."”

I then tried running the WsusDBMaintenance SQL script -- hoping that might somehow help the situation. Unfortunately, when I ran the Server Cleanup Wizard again, I got the same result (i.e. it hung on the “"Deleting unused updates..."” step).

I then ran the Server Cleanup Wizard once again, but this time only selecting the first option (Unused updates and update revisions). While it was still very, very slow on the “"Deleting unused updates..."” step, I was able to verify (via the progress bar) that it was in fact progressing. I let it run to completion and observed the following results when it was finished:

Unused updates deleted 3082
Unused update revisions deleted: 5448

I then ran the Server Cleanup Wizard again, but this time only selecting the third option (Unneeded update files). When that was finished, I observed the following:

Disk space freed by deleting unused content files: 15441 MB

I confirmed this by rescanning my E:\WSUS folder:
 •36.3 GB of content
 •4,285 files in 258 folders

Since December, I have been able to run the Server Cleanup Wizard repeatedly with all of the options selected, and it usually completes in a matter of minutes. For some reason, it was only that first time through that I needed to run the steps individually to avoid the hang. Go figure.

Tuesday, 19 March 2013

Outlook 2013 - Create a inbox all button to view all mailboxes

1920x1080 Outlook 2013 All Inbox view


How to create your own “Inbox All” button in Outlook 2013


1) In Windows 8, use selfcert.exe to create a certificate

1a) on Windows 8 64 or 32 bit, highlight the following single line of text, and copy it to your clipboard (Ctrl+C)
 %ProgramFiles%\Microsoft Office\Office15\SELFCERT.EXE

1b) press Win+R to launch the Run dialogue box

1c) press Backspace key to delete whatever you already have in there

1d) now just Paste (Ctrl+V) and click OK

Run Dialogue - SELFCERT.EXE path pasted in, click OK

1e) type any name you like, perhaps your user name, or full name, and click OK, I used “Inbox All cert”

selfcert-Your-certificates-name

Successfully created a new certificate

1f) optionally, if you’re curious about where this cert is saved, just paste this into your Start, Run dialogue (Win+R)
 %AppData%\Microsoft\SystemCertificates\My\Certificates
 
2) In Microsoft Visual Basic for Applications (VBA), create your new macro that does the custom inbox search
 
2a) visit Diane Poremsky’s site to read all about the short macro she created, as well as excellent training videos on using VBA, at www.slipstick.com/how-to-outlook/how-to-create-a-unified-inbox
 
2b) I’ve found one fresh-install system doesn’t seem to like it when any dates are specified, coming up blank, so I’ve removed the ” received: (this week)” from Diane’s macro, and now it works, so just copy just the 6 lines of plain text below into your clipboard (no trailing carriage return is necessary) (Feb 5 2013 version)
 
Sub UnifiedInbox()
 Dim myOlApp As New Outlook.Application
 txtSearch = "folder:Inbox "
 myOlApp.ActiveExplorer.Search txtSearch, olSearchScopeAllFolders
 Set myOlApp = Nothing
 End Sub
 
2c) in Outlook 2013, from any view at all, just press Alt+F11 to bring up VBA
VBA-editor-top-left


2d) expand the “Project1″ section, “Microsoft Outlook Objects” section, then double-click on “ThisOutlookSession”
 
2e) click on the “VbaProject.OTM” window’s blank area, then Paste (Ctrl+V)


VbaProjectOTM macro code by Diane Poremsky modified by Paul Braren


3) Add the self-signed certificate to your new macro
 
3a) certify it by clicking the “Tools” menu, then selecting “Digital Signature”

Tools - Digital Signature


3b) choose the digital signature you already created

Digital Signature - Choose

3c) with the proper just-created “Inbox All cert” certificate single-click highlighted, click OK on the “Windows Security” dialogue:
Inbox All cert

3d) confirm all the info, click OK

Digital Signature - summary

3e)  be sure to save the VbaProject.OTM now, by clicking on the floppy icon at top left

Save VbaProect.OTM


3f) close it

Close-the-editor

4) In Outlook 2013, allow certified Macros to run
 
4a) click FILE, Options,

Options menu

4b) “Trust Center” tab, “Trust Center Settings…” button

Outlook Options Trust Center Settings

4c) on the “Macro Settings” tab, select “Notifications for all macros” and click OK

Trust Center

5) In Outlook 2013, add “Inbox All” macro to the toolbar
 
5a) at the very top left of Outlook, you’ll see the “Customize Quick Access Toolbar” down-arrow symbol, left-click it
 
Customize Quick Access Toolbar


5b) choose “Show Below the Ribbon”

Show Below the Ribbon

5c) Yes, it’s now below the Ribbon. Next, on the blank area to the right of the down-arrow symbol, right-click then choose “Customize Quick Access Toolbar…”

Right-click then choose Customize Quick Access Toolbar

5d) from the Choose commands from drop-down menu, select “Macros”

Quick Access Toolbar - Choose Macros

5e) with “Project1.ThisOutlookSession.UnifiedInbox single-click selected, click Add to move it to the right “Customize Quick Access Toolbar” window

Quick Access Toolbar - Click Add

5f) click the “Modify…” button

click Modify

5g) change the Display name, I used “Inbox All, then click on the mail icon, then click OK

change Display name to Inbox All then click mail icon then click OK


5h) you may want to adjust the order by selecting “Inbox All” and clicking the “Move Up” button

click Move Up until it's at the top of the list, then click OK

5i) optionally, there are very useful icons that are not always easy to find from all ribbon views, like “Print”, so if you’d like, grab it from the All Commands view seen below, you may also want to adjust the sorting order of the Quick Access Toolbar items in the right pane, when done, click OK

you may also want to choose Popular Commands, Print, to add a printer icon, when done tinkering, click OK

5j) now it’s time to test it, just click your new little tiny “Inbox All” button:

left-click the new Inbox All button


and you should see this warning only once, click the “Trust all documents from this publisher” button, and you won’t get nagged again (CLOSE A REOPEN OUTLOOK)

ThisOutlookSession warning, just click Trust all documents form this publisher

you’ll also now see the last week’s worth of email from all your accounts appear very quickly, just a few more cosmetic tweaks, and you’re done



Wednesday, 6 March 2013

Retract/Remove Solution - SharePoint 2010

Retract/Remove Solution - SharePoint 2010


1. Manually retract a solution, which is installed to a farm, using the SharePoint central administration interface?

2. Central Admin - System Settings - Manage Farm

Solutions, pick your wsp and hit Retract, then Remove once 

it's done.

3. Follow the steps for Powershell:

Go to All Programs => Microsoft SharePoint 2010 Products =>SharePoint 2010 Management Shell =>Run as administrator

Uninstall-SPSolution -identity "solutionName.wsp"

Remove-SPSolution -identity "solutionName.wsp"

Friday, 19 August 2011

How to refresh an ASP.NET GridView automatically at regular intervals

A common requirement is to refresh the GridView after regular intervals. ASP.NET contains the Timer control which comes in very handy to achieve such requirements. Here's how to do so:

Add the GridView and the Timer control inside an ASP.NET AJAX UpdatePanel as shown below :

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

<ContentTemplate>

<asp:Timer ID="Timer1" runat="server" Interval="3600" ontick="Timer1_Tick"></asp:Timer>

<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="CustomerID"

DataSourceID="SqlDataSource1" AllowPaging="True" AllowSorting="True">

<Columns>

<asp:BoundField DataField="CustomerID" HeaderText="CustomerID" ReadOnly="True" SortExpression="CustomerID" />

<asp:BoundField DataField="CompanyName" HeaderText="CompanyName" SortExpression="CompanyName" />

<asp:BoundField DataField="ContactName" HeaderText="ContactName" SortExpression="ContactName" />

<asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address" />

<asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />

</Columns>

</asp:GridView>

</ContentTemplate>

</asp:UpdatePanel>

Then in the code behind, add the following code which refreshes the GridView after every minute

Using C#


protected void Timer1_Tick(object sender, EventArgs e)

 {

 GridView2.DataBind();

 }

Using VB Net

Protected Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs)

 GridView2.DataBind()

End Sub

Tuesday, 22 February 2011

Delete IIS logs via PowerShell

A script that may come in useful to you.

The below Powershell script will delete IIS Log files older than 7 days that are in the “C:\inetpub\logs\LogFiles\w3svc1” directory. You can alter the script to how many days old the log files can be and also your IIS log location (Highlighted in red).

get-childitem -Path C:\inetpub\logs\LogFiles\w3svc1 -recurse | where-object {$_.lastwritetime -lt (get-date).addDays(-7)} | Foreach-Object { del $_.FullName }

Monday, 21 February 2011

Booting from Virtual Hard Drives (VHDs) with Windows 7

The reality is that many of us need more the one OS and virtualization is not always the best answer. Booting from a VHD can give you the choice of many operating sytems without having to have a myriad of partitons on your machine. I will show you how in the article.

So I choose to install Windows 7 on my laptop with a single partiton. Windows 7 will be my main client operating system; however I will want other Windows 7 configurations and Windows Server configurations. Yes I can use virtualization but I have found that sometimes the performance is not quite there when I do not have a fast drives, fast memory and CPU cores that you may find in a data-centre and, on some occassions, I will need Virtual Server Configurations within my Virtual Machines which is never the most effective solution.

To allow me some flexabilty I want to boot nativerly to the extra OSs that I need. I can do this with Virtual Hard Drives, (VHD ). To ccreate the VHDs either upicsn use Dispart or the Windows 7 Graphical Disk Mananager. In the video demonstrations I have choosen to use the command line and dispart.exe, ( well I am a command line freak ). Once you have created your VHD you can use imagex from the WAIK toolbox to install the install.wim file from you required operating system installation disk. ( [DVD]:\sources\install.wim ). This is a great feature as it allows the you to omit the need for the installation: just image it.
  • imagex /info d:\sources\install.wim
  • check for your index number of the OS you need
  • imagex /apply /check 3 d:\sources\install.wim x:\
  • in this case we are using index 3 from the image file , x: being the drive letter of our VHD.
Now if you check the contents of the VHD ( as above drive x:\ ) it will look an OS drive , cool we are ready now to detach the VHD and add it to our boot menu. You will need to open your command prompt with administrative privileges. With that in place then the process of writing to the Boot Menu is reasonbly easy once you know what is happening. Although it id by no means a simple edit like the boot.ini you may be used to.
  • bcdedit /copy {current} /d “Boot VHD”
  • Create a new clone entry of your current OS with a description of “Boot VHD”
  • bcdedit
  • use the command on it’s own to view the new guid of the boot entry you have just created
  • bcdedit /set {GUID} device=[c:]\vhd\boot.vhd
  • bcdedit /set {GUID} osdevice=[c:]\vhd\boot.vhd
  • bcdedit /set {GUID} detecthal on
And there you are just reboot now to test. Hope this is useful to you and have a look at the demo below:
Create the VHD