Sunday, 8 November 2015

Install Tomcat on Centos



Wow.. Weeknd End with my first Shell Scripting, Its work , feeling like on Air, Time to have some Beer.
Description : Once you run it, it will download the tomcat and start the tomcat service and you will be ready to kick off the installtion of Open AM. 
Note : Drop me a mail any.singha@gmail.com in case it not work,




Saturday, 11 July 2015

NewBee Post for sharepoint in Installation of FIM Portal 2010


> As a NewBee to FIM the hardest part is to configure the sharepoint for the FIM portal, The below are not the best practise.However it will give you an fair idea how to install at the first go, I have skipped the installation for FIM portal. It will only show how you have configure your sharepoint site.

> My Machine name is NewBee and domain joined.
>Install the sharepoint site from the internet.
















> Once the sharepoint is installed, Go to Start menu and select share

























> Create a Web application Pool













>Create a Alternate Acces Mapping












>> Go to FIM Splash of FIM portal and Install it. Once it got installed, you will get the below page.


Happy Installation..!!!

Sunday, 5 April 2015

C# With PowerShell Import Module Active Directory



How to import Module ActiveDirectory in C#, This is just an example how can you integrate powershell with C#, If you are ITPro code looks simple with the help of powershell.



ConsoleApplication and Powershell


Saturday, 4 April 2015

Calling Powershell from C#.

Calling Powershell from C#



In the solution explorer, add a project reference to the System.Management.Automation. I always found this in 





using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Management.Automation;
using System.Management.Automation.Host;
using System.Management.Automation.Provider;
using System.Management.Automation.Runspaces;
using System.Collections.ObjectModel;


namespace PowerShell_Call
{
    class Program
    {

        public static string name(string args)
        {

            using (PowerShell powershell = PowerShell.Create().AddCommand("Get-Process").AddArgument(args))
            {
             
                foreach (PSObject result in powershell.Invoke())
                {
                    return result.Members["id"].Value.ToString();
                 
                                 }
            }

            return "";
         

        }    
     
     
        static void Main(string[] args)
        {

            string x = "apnmcp";
            string v=name(x);          
            Console.WriteLine("The value is {0}", v);
            Console.ReadLine();

        }
    }
}

Output :

Console Application


Powershell Output.


Tuesday, 2 December 2014

PowerShell .NET OBJECT



I believe powershell V5 will close the gap between ITPRO and Developers and this is a chance to jump into the bus of Developers if we miss it some how.

Let see Method or Function overloading.

What is Function Overloading, Same name of the function and with multiple parameters.

Here the name of the class is Test and we have two function with the same name ADD but the number of parameter is different, that is what function overloading from the eye of ITPRO.
















Constructor A constructor initializes an Object when it is created, It has the same name as its class and similar to method ,However constructor have no explicit return type.



Thursday, 20 November 2014

Desired State configuration

Desired State configuration.




A simple scenario what felt me to understand it, A lots need to cover and learn, but thought sharing it will be worth for the beginner like me. I am just in love with DSC.  Making sense Ahha :)

Execution happen in three steps, Make the configuration, Call it and Make it so (pointer to MOF)

 - Install PowerShell Version 4.0 and enable PowerShell Remoting.

A common problem on laptops is that the initial PowerShell Remoting configuration will fail because the system is connected to a public network.








Step 1.

Enable-PSRemoting -SkipNetworkProfileCheck -Force

Step 2. Make the configuration
#=====================================

Configuration MyFirstDSC
{


    Node 'Anirban-PC'
    {
        Service VM
        {
            Name = 'VMwareHostd'
            State = 'Running'
            StartupType = 'Automatic'
         

        }
    }
}

MyFirstDSC

#=================================================
Step 3 Execute the Powershell and it will create the Folder MyFirstDSC having the MOF


Step 4 Make it So.



ServiceNow onboarding Sailpoint