I am just getting started with a basic tutorial to Sharepoint and Powershell, following the following commands while in Powershell on my SP server:
[system.reflection.assembly]:loadwithpartialname("Microsoft.Sharepoint")
$siteurl="http://localhost"
$mysite = new-object Microsoft.sharepoint.SPSite($site)
$mysite.gettype()
Up to here works fine, I get a response from gettype But $mysite.Allwebs does not have anything.
$mysite.Allwebs.count
Does not even show zero. So it looks like I a missing some important piece. Any ideas?
Thank you. Daniel Williams