Showing posts with label Ms office and Powershell. Show all posts
Showing posts with label Ms office and Powershell. Show all posts

Wednesday, July 3, 2013

Powershell Script : Get the file and Product version of Ms office Applications.

Hi,

I hope you guys are doing good.

My last two months were very busy, that why i was not able to post any article. I apologize for that.
Last week Microsoft has release few mandatory ms office update.

That update was crucial for outlook users, before apply ms office updates, we need to know, which outlook version and build my users are using.

To achieve it, i have written a tiny “Powershell” script. when you run the script, that will give you the file version and product version information of WORD, EXCEL, POWERPOINT and outlook.

2

Download Link http://gallery.technet.microsoft.com/scriptcenter/Get-Offie-Applications-5c0bb2e1

I tested this script on “office 2010 32 bit” on windows 7 32 bit.
I hope you may like the script and found it helpful.
Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Monday, January 16, 2012

Alias and Powershell profiles

 

Hi All

I love “RUN” box.  We can open run box “Windows Key + R” and type the Excel, Powerpoint, and click on OK and its open these application which are in the System path.

1

But if you try to run “Excel” or “Powerpoint” etc in PowerShell console they wont work.

13

Everyday i open firefox, Internet Explorer, Ms Word, Ms Excel, Ms PowerPoint from “RUN” box. but today i thought that these application must me run from my powershell console.

The benefit of this is that i don't need to open “RUN” box every time before running any command.

Windows PowerShell Profile

First we need to create a windows powershell profile. It is a simple .ps1 file which reside on your Document folder and it run before opening PowerShell console.

Now open PowerShell Console and in Console type notepad $profile

If you don’t have profile created before it ask you to create a new file. Click on Yes.

2

First i want that whenever I open “PowerShell” console it should run in “D:\PowerShell”, to achieve this we need to use Set-Location cmdlet.

Set-location D:\PowerShell

3

Now save the file and close it. and lets open PowerShell Console again.

Cool!!! now the default path of PowerShell console is set to “D:\PowerShell”

4

Aliases

Our Next Step is to setup alias. to achieve this we are using  Set-Alias .

The Syntax to setup alias is Set-Alias <Name> <Path of file >

We are setting up alias for Word,Excel,Powerpnt,Outlook,Firefox,Internet,Explorer,Chrome,

and the command should be : 

Note: I am using Office 2010 and may be your office path may be different.

 

Set-Alias word        'C:\Program Files\Microsoft Office\Office14\WINWORD.EXE'

Set-Alias powerpnt   'C:\Program Files\Microsoft Office\Office14\POWERPNT.EXE'

Set-Alias excel      'C:\Program Files\Microsoft Office\Office14\EXCEL.EXE'

Set-Alias outlook    'C:\Program Files\Microsoft Office\Office14\OUTLOOK.EXE'

Set-Alias firefox    'C:\Program Files\Mozilla Firefox\firefox.exe'

Set-Alias Iexplore   'C:\Program Files\Internet Explorer\iexplore.exe'

Set-Alias Chrome     'C:\Users\aman.dhally\AppData\Local\Google\Chrome\Application\chrome.exe'

now open our powershell profile again and paste the above command.

5

save the file and close it. and also close the PowerShell console and open it again.

Lets test it now

- Excel => Working

6

- Word => Working

7

- PowerPoint => Working

8

- Outlook => Working

9

Our all Ms Office applications are working .. lets test browsers now.

- Chrome => Working

10

- Firefox => Working

11

- Internet Explorer => Working

12

All is working .. u can add more alias if you want.

Thanks

Aman Dhally