Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11571

Difference between getting url metodes in powershell

$
0
0

Hello,

Could someone tell me the difference between the

$site = Get-Spweb http://myserver

and the

 $site = new-object Microsoft.SharePoint.SPSite("http://myserver/") ?

Both return the url of the site.

What i noticed so far, with the secound i can for example use the $site.Openweb(), but i can't with the first.

So i want to know what are they, what is the difference, and when to use the 1st or the 2nd.


I Hate Mondays


Viewing all articles
Browse latest Browse all 11571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>