Posts

Showing posts from August, 2014

PowerShell Scripts for Sharepoint 2010 & 2013

Image
Here are some useful Sharepoint PowerShell scripts  : Create a site  New-SpWeb "http://sp2010/Site1" -Name "Site 1" -template "STS#0" Delete a site Remove-SPWeb "http://sp2010/Site1" -Confirm:$false Create a List $web=get-spweb -Identity "http://sp2010/Site1" $web.Lists.add(<List Name>,<List Description>,<List Template>) $list = $web.getList("http://sp2010/Site1/Lists/List1") $FieldType = [Microsoft.Sharepoint.SPFieldType]::Text $List.Fields.Add("Name",$FieldType,$false) Delete a List   $list = $web.getList("http://sp2010/Site1/Lists/List1") $list.delete() Add a list item $item=$list.items.add() $item["Title"] = "Your title here" $item.update() Update a list item $item = $list.getItemById(1) $item["Title"]="New Title" $item.update() Delete a list item $item = $list.getItemById(1) $item.delete() Export a list to

Monte Carlo Simulation in Excel simplified!

Image
Monte Carlo Method It is a mathematical way of approximate the probability by generating the random variables. Monte Carlo simulation is the computerized method for applying the Monte Carlo method. Monte Carlo Simulation simplified  STEP 1. Find the Three point estimate    - Best case , Normal case, Worst case estimate ( Min , Max , Average ) STEP 2. Find the Mean,StDev and Number of Iterations required      - No. of iterations are important for reducing the total error percentage. STEP 3.Use the Excel rand() function with the low and high points to generate a normal distribution.    - Formula for generating random probability is =rand()* (Max estimate - Min Estimate) + Min Estimate STEP 4.Propagate the random generation for number of iterations.    - Use the Excel's data table to propagate the random generation. Please check the example file attached.  STEP 5.Use Excel's Countif() function to calculate the number of probability occurrence.    - See the example