Showing posts with label Modules. Show all posts
Showing posts with label Modules. Show all posts

Monday, August 19, 2013

Powershell and Outlook: Create new Outlook Notes using Powershell “OutlookTools” module.

 

Hi,

Good Evening everyone.

I would like to say thanks to everyone to give me a positive feedback on my “OutlookTools” module.

Now We have a Powershell functions to create new Calendar meeting, contacts, tasks. now its is time to create a outlook notes using Powershell.

“OutlookTools” Module download link: https://github.com/AmanDhally/OutlookTools

Let’s start

 

  1. First download the “OutlooTools.Psm1” and .psd1 file fromhttps://github.com/AmanDhally/OutlookTools
  2. Create a folder Name “OutlookTools” in “Libraries\Documents\WindowsPowershell\Modules
  3. and paste both files there.

12-08-2013 1 
Now open Powershell console and run the cmdlet, 

Import-Module OutlookTools

12-08-2013 2

By running the Get-Command cmdlet, we can see which cmdlet and function this modules had added.

Get-Command -Module outlooktools

You can see now we have a New-OutlookNote function in the module.

1

The Outlook notes has very simple structure. When you create a Note is Outlook, you just click on New and you start typing, and Outlook auto named it as per your first typed line.

But in my “New-OutlookNote” function, i created two parameter, one is title and second is Body. Using –Title parameter you can give a title name for the note and add rest of the note to body.

I have also added the –Color parameter, so that you can create different colour notes from the functions. One thing need to remember is that the value of –Color is in number from 0-4

Value Color
0 Blue
1 Green
2 Red
3 Yellow
4 white

Example-1

Creating a simple Note. with title and a simple body.

New-OutlookNote -Title "Hello" -Body "Hello World"

19-08-2013 1

and here is the our note.

19-08-2013 2

Example-2

Creating another note but with different color.

New-OutlookNote -Title "Brainstroming" -Body "need to purchase some brain storm soft" -Color 2

 

 

19-08-2013 3 

19-08-2013 4

You can download the module from this link. https://github.com/AmanDhally/OutlookTools

I am hoping that you also started loving Powershell and automation :)

Thanks

Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Monday, July 2, 2012

Enable Group Policy Powershell Module for Windows 7 domain client Computer.

 

Hi,

today i was planning to do few things with my "Group Policies", as usual i prefer to do it using PowerShell.

As you all know that to use Group Policy related stuff we need to import its module first. In windows 7 the group policy module in not enabled by default. We need to install it and then enable it.

The process it .

and after installing RSAT tool.

Click on start and search for "OptionalFeatures"

Click on it.

02-07-2012 19-07-13

and go to "Remote Server Administration Tools" expand it m and then expand "Feature Administration Tools" and tick on "Group Policy Management tools" and then click on "OK" 

02-07-2012 18-57-23

when it done installing, Open your Powershell Console and type : Import-Module GroupPolicy

No error for now..

02-07-2012 20-08-30 

Let see what if it imported it or not.

Get-Command -Module GroupPolicy


02-07-2012 20-09-20


All Done ,, Seem fine


Now we can start messing up with Group policies using Powershell. ;o) 


:)


 


Thanks!


Aman Dhally



Buy-More-Twitter-Followers   4fb29548b6adc

Find Specific commands in a loaded module in PowerShell.

 

Hi,

Today i am working with few cmdlets and loaded modules in powershell and then i need to find a cmdlet but rather then find it on whole loaded module i want to search it in to a specific module.

for example.

To find all cmdlets which have "ADD" word,   we may run this command.

 Get-Command -Name *add*
02-07-2012 11-48-21 
When we run the above command it list all cmdlets which have "ADD" in  them. but out target is to find all cmdlet  which have "Add" word in it  on in to a specific module, to achieve it just add -Module and a Module Name . simple 
Get-Command -Name *add* -Module ActiveDirectory 

02-07-2012 11-51-32


Simple. Now it showing all cmdlets which have "Add" word. :)


Thanks


Thanks!


Aman Dhally


Buy-More-Twitter-Followers   4fb29548b6adc

Monday, May 21, 2012

List All Cmdlets of a Specific Module in Powershell.

 

Hi,

sometime you need to know only some or all specific cmdlets for  a module. For example you just imported an "Active Directory" Module and want to know which all cmdlets imported by it.

Let's import an module first.

Import-Module ActiveDirectory

30-04-2012 23-21-03 

ok, Module is imported,,

now run the below command to list all cmdlets imported my "Active Directory" Module.

Get-Command -Module ActiveDirectory

So here is our all Active Directory Related Cmdlets.

21-05-2012 17-23-01 

Thanks

Aman Dhally

simba_lion