Powered By Blogger

Aug 8, 2012


PowerShell - Foreach Syntax


In PowerShell there are two ways to use the foreach looping technique. This post briefly describes those two ways. 

 foreach ($object in $collection) {something to do with the $object}

This is a very simple technique. A good example would be get a set of directories into a variable and then put that variable into a foreach loop to control the output.



$collection | foreach {do something $_}

By using this technique we can pipeline the collection to the foreach command can use the scriptblock with the pipelined ($_). The previous example can be done using this technique in one line. 



I hope this small description provides an idea about the differences between the two techniques. 

Aug 3, 2012


The Dropbox Controversy 


Dropbox can be defined as one of the most popular cloud services in the market. This post is about the Drpbox Controversy. 

Google, as we all know, provides many free cloud services and this has become Google’s strongest selling point and at the same time it has become its weakest feature as well. Many opponents think that no company will give anything free, unless they get something in return. Google answered this question by saying they earn through advertisements and through tracking usage of their users. This allows users to keep their privacy and Google can earn money.

Dropbox is the biggest and most popular cloud service for data storage in the cloud. There are lots of confidential documents as well. Furthermore, the huge file-size limit of Dropbox allows users to send full videos, songs and other media files. Dropbox enables a large number of employees to share files easily. File sharing through Dropbox is not regulated. Anyone can open and view your files when you share them.

Dropbox is facing some security issues for it’s users. While Dropbox encrypted their files the Dropbox employees reserve the right to remove encryption. The question is what’s the point of having an encryption if someone gets the power to remove it? Dropbox answered to this question by saying that while employees reserve access for legal purposes, they prohibited from doing so except in rare circumstances.

What people can actually share? Are employees allowed to share company documents using a free public cloud? Are people allowed to share songs and movies through Dropbox?  These questions remain unanswered.........

It is important to remember that Dropbox isn’t our safe in the sky and Dropbox is just a way of storing files.


Security in Private and Public Clouds 


This post is about the security in Clouds. Mainly the post concerns about the Private and Public Clouds.
Many people believe that private clouds are more secure than public clouds. The reality is you have to concern about more than the kind of cloud you have, when it comes to cloud security. If people think that the public clouds have more security than private clouds then it is not true. People used to think like this is that the company offering the service will keep the cloud safe because so many people are using it. But there are still vulnerabilities out there that can be exploited. Most of these vulnerabilities open up because of the things done by the customers.
When considering cloud security and protecting your data we have to remember that there are many factors to be considered other than hackers. When it comes to the security of data, most people think about keeping other people out from data is the solution but they have to concern about protecting data from corruption or loss as well.
We should think that secure the cloud is a not only the responsibility of service provider but also there are things that we can do ourselves to increase the security of the cloud. Mistakes can be made at both the service provider’s level and at the level where your own employees are accessing the cloud, so it’s important to remember that there is no service that will be able to stop all intrusions. It’s true that the cloud is a powerful tool to keep everyone connected, but still we should remember to be careful about the security. 

Aug 2, 2012



Create Web Applications and Site Collections using SharePoint 2010 Management Shell



This blog post describes how to create Web Applications and Site Collections using SharePoint 2010 Management Shell . First you need to open the Management shell.

Go to the Start menu -> All Programs and select SharePoint 2010 Management Shell under Microsoft SharePoint 2010 Products and run the program as administrator.



To create a new Web Application we use the command New-SPWebApplication. We have to give a Name for the Web Application, Name for an Application pool, name of the Application pool account, the URL and a Port number.

Example :




After you enter the above command you will see a confirmation command window as shown below.


If you want to get more information about the command parameters, you can use the Get- Help New- SPWebApplication command.


Now lets create a Site Collection. We use the command New-SPSite to create a new site.


Then we need to add the URL to access the site collection which we created and the Site collection administrator. After you entered those commands you will get a command window as shown below.



If you don't specify the Template parameter then you will get a widow to select it when you try to open the site collection which you created . I have selected the Team Site Template


If you want to add the Template by using the command when you create the Site Collection. Then first assign the template to a variable as shown below. 


Then insert the command to create a new SPSite.



If you want to get more information about the Templates, you can use the Get-SPWebTemplate
command



If you want to know about the command parameters for a site, you can use Get-Help New-SPSite command.


Now you can access to the site collection which you created using the URL.







Aug 1, 2012


Calculating Time Differences


This post is about calculating time difference using PowerShell. 

We can use 'New-Timespan' for calculating the difference between the current date and a specific date. New-Timespan automatically compares the inserted date to the current date and returns the timespan in number of different formats from which you can choose. 

For an example if we want to get the difference in days we can use (New-Timespan 12/24/2012).Days


Note that if you insert a date in the future you will the get the output as a negative value. To get rid of the negative effect we can use '-end' parameter after the New-Timespan.

(New-Timespan -end 12/24/2012).Days







Cloud Deployment Models

This post is about the four primary deployment models in Cloud Computing. The below mentioned models have been recommended by the National Institute of Standards and Technology (NIST).
Private Cloud
This cloud operates only for a particular organization. This can be managed by the organization or a third party. This has less cost efficiency compared to other deployment models. In terms of security this has a great value because the hosting is build and maintained for a specific client. In addition to the security reason, many organizations adopt this model where they require the data to be confirmed to regulatory standards which may require data to be managed for privacy. For an example healthcare and pharmaceutical industries can be listed. Amazon also provides the option of a virtual private cloud.
Public Cloud
This cloud is available to the general public or large industry groups. This owns by an organization which sells cloud services. Google is an example of a public cloud. The service can be provided by a vendor free of charge or on the basis of pay-per-user policy. This model is best suited for the businesses which use host SAAS applications, utilize interim infrastructure for developing and testing applications and for the organization who are managing applications which are consumed by many users. Basically this model helps to reduce expenditure and this lowers the operational IT costs as well.
Hybrid Cloud
This is a combination of two or more clouds. This model helps businesses to take the advantage of secured applications and data hosting on a private cloud while enjoying cost benefits. User can still have the cost effectiveness because they can keep shared data and applications on the public cloud. This model is also used to handle cloud bursting which refers to a situation where private cloud is not able to handle load spikes and requires an option to support the load then the cloud migrate the workload between public and private hosting. This doesn’t provide inconvenience to the users. Microsoft Azure and Force.com are two examples of this model.
Community Cloud
This infrastructure is shared by several organizations and supports a specific community that has shared concerns like mission, security, policy etc. This can be managed by the organizations or a third party. This helps to reduce the cost compared to private cloud since it shares by a larger group. Government departments which require data relating to the local population or information related to infrastructure such as hospitals, roads, electricity boards, etc can use a community cloud.