Access the site title, url from new -spsite cmd let

hi,
I am creating  new site using the pshel
new-spsite -name $projectName –Description $projectDescri -Template "STS#0" -ContentDatabase $contentdbnameproj $sitecollecName -OwnerAlias $primAdmin_1 –SecondaryOwnerAlias $secondaryAdminin -verbose
and I want to get the site url  created here,
Can i assign the output  of this command to a pshell varibale? so that i can  access the root web's title and url and perform more operations like  adding few users into the members group,add some other users into a list within
this site collection etc ...

i have written the  belwo script  for creating siet collec with sepcific content db and geting the rootweb property and able to manipulate partially.
but i was getting few errrors while manipulating the  groups etc
$ErrorActionPreference="Stop"
Write-Host "Create SiteColection"
$dummywebappname= "http://srvr:1009"
$projectName = Read-Host "Enter Project Name"
$projectDescri = Read-Host "Enter Project Description"
$contentdbnameproj= "WSS_ContentDB_"+$projectName
#$contentdbnameproj="WSS_ContentDB_Project"
new-spcontentdatabase -name $contentdbnameproj -webapplication $dummywebappname -verbose
Write-Host -f yellow "Project DB has been created"
$sitecollecName = $dummywebappname + "/sites/"+$projectName
#$primAdmin = Read-Host "Enter primray admin name: like in\p.p";
$primAdmin_1 = "in\p.p"
#$mtemplate= Get-SPWebtemplate -Identity "STS#0"
#$secondaryAdmin = Read-Host "Enter secondary admin name: like in\p.p";
$secondaryAdmin_1 = "in\h.v"
#$rildccs= read-host  "Enter names with semilcolon separated like: "
#$EM= read-host "Enter EM Name with semilcolon separated like: "     #"in\m.n";
#$PM= read-host "Enter PM Name with semilcolon separated like: "     #"in\m.n";  "in\r.r.s";
# list name where EM and PM needs to be inserted
$projlistname="Project_Master"
new-spsite -name $projectName –Description $projectDescri -Template "STS#0" -ContentDatabase $contentdbnameproj $sitecollecName -OwnerAlias $primAdmin_1 –SecondaryOwnerAlias $secondaryAdminin -verbose
$mprojectURL=$sitecollecName
$sitecollecURL=  $sitecollecName
$currsite=Get-SPSite $sitecollecURL
$currWeb=$currsite.RootWeb
Write-Host  -f yellow "Project named " $projectName  " with URL" $mprojectURL "was  successfully created"
Write-Host -f yellow "starting to create default groups..."
$projSite = New-Object Microsoft.SharePoint.SPSite($sitecollecName) 
$projweb = $projSite.RootWeb
$projweb = Get-SPWeb $projweb.Url
$projweb.Update()

Similar Messages

  • When I try to access my online bank account thru Firefox, the session times out. This is on a new Macbook Pro. On my old Macbook Pro I can access the site.

    When I try to access my online bank account thru Firefox, the session times out. This is on a new Macbook Pro. On my old Macbook Pro I can access the site. I know it is probably something in settings but cannot figure it out.

    Hello,
    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that temporarily turns off hardware acceleration, resets some settings, and disables add-ons (extensions and themes).
    '''If Firefox is open,''' you can restart in Firefox Safe Mode from the Help menu:
    * Click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    '''If Firefox is not running,''' you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".
    ;[[Image:SafeMode-Fx35]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • First time going to a site where I do not have access and clicking the back button I'm returned to the root site instead of the site I started from

    Greetings,
    I have SharePoint 2013 enterprise using ADFS for authentication.  I have an issue where the first time going to a site where you do not have access and clicking the back button you're returned to the root site instead of the site you
    started from.
    ie:
    1) at site http://www.sharepoint.com/sites/finance/home.aspx
    2) browse to
    http://www.sharepoint.com/sites/finance/private/home.aspx
    3) receive a message: you do not have access to this site  ((oops went to the wrong location - I'll hit the back button))
    4) click the browser back button
    5) get returned to http://www.sharepoint.com/pages/home.aspx
    This only happens the first time browsing to a site that I do not have rights to, after this I can browse to the same site and hit the browser back  button and return to the correct site, or any other site that I do not have access to.
    Any ideas as to why this happens?  Ideas of where to start looking?
    Thanks

    Hi Robert,
    From your description, when you receive access denied message and hit back button in browser, it redirects you to the root site but not previous site. However, this just happens at the first time.
    You may try to use some tool or check log which can tell us how does it handle the request when you hit the button. And compare the issue time and non-issue time.
    I'd suggest you use Netmon tool:
    http://blogs.msdn.com/b/carloshm/archive/2012/11/08/sharepoint-2013-network-monitor-parsers.aspx
    Regards,
    Rebecca Tu
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Sharepoint foundation 2013 : After doing backup cannot access the site "Sorry, this site hasn't been shared with you"

    I am using SharePoint Foundation 2013 , i have backed up the site using powershell with the following command:
    -backup-spsite -identity http://dmsserver/sites/demo/ -path C:\SPSiteBackup.bak
    After backup finished, i can't access the site, the message "Sorry, this site hasn't been shared with you" appears, even the site administrator collection is configured coorectly, with the  Administrator account.
    Whats the problem?
    Please Advice.

    Hi husseinsa,
    According to your description, my understanding is that you could not access the site after backing up the site collection in SharePoint 2013 Foundation.
    Could you access other sites at the same site collection?
    Let’s do a troubleshooting for this issue:
    Please delete the IE cache:  IE options->General->Delete, select all checkboxes, and click Delete.
    Go to CA->Application Management->Manage web applications, select the web application which hosts the problematic site .
    Click Permisson Policy, make sure there are not any deny policies for site collection administrator and site collection auditor.
    Back to the web application list page, click User Policy, check whether there are any user policies for denying permissions.
    Change the site collection administrator or add a secondary site collection administrator in CA, then use the new site collection administrator to log in the site, compare the result.
    Open IIS, expand the server, and click application pools.
    Find the problematic web application pool, make the identity of the pool is correct, then do an IISRESET, compare the result.
    If this issue still exists, please check the log file to find more information about this issue. The path of the log file is
    : C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\LOGS.
    Or you can use Event Viewer(Start->Run->event viewer) to find the log.
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • When I use the CTUOnline site, the IM window will not open, and the Outlook mail frequently crashes. I do not have these problems if I access the site via Safari. I am using a Mac OS 10.4.11.

    I am teaching an online course through CTUOnline. I use a Mac OS 10.4.11. When I access the site thru Firefox, the IM chat window just says "Loading" but never loads. My campus mail, which is accessed through Outlook, frequently boots me out. I must copy and save every message, because I cannot predict when it will go through and when I will be thrown out. I have set my Preferences to allow pop-ups from ctuonline.edu and from campus.ctuonline.edu. I do not have these (connection?) problems when I access the site through Safari.
    == URL of affected sites ==
    https://campus.ctuonline.edu/MainFrame.aspx?ContentFrame=/Default.aspx

    I am teaching an online course through CTUOnline. I use a Mac OS 10.4.11. When I access the site thru Firefox, the IM chat window just says "Loading" but never loads. My campus mail, which is accessed through Outlook, frequently boots me out. I must copy and save every message, because I cannot predict when it will go through and when I will be thrown out. I have set my Preferences to allow pop-ups from ctuonline.edu and from campus.ctuonline.edu. I do not have these (connection?) problems when I access the site through Safari.
    == URL of affected sites ==
    https://campus.ctuonline.edu/MainFrame.aspx?ContentFrame=/Default.aspx

  • Error in Accessing the Report Server URL

    Hi All,
              I am trying to access the Report Server URL in PowerPivot.But facing below issue .Can any one help me how can I solve the issue
    Thanks,  
    Sid

    Hi Visakh,
                    Yes,The user is holding the permission as "Global User" in sql.Hope you help me in solve this issue
    Thanks, Quality Communication Provides Quality Work. http://siddiq-sharepoint2010.blogspot.in/ Siddiqali Mohammad .
    Hi siddiqali,
    According to the screenshot you posted above, the use account didn't have sufficient permission to open the report, please check the following prerequisites before you perform the action:
    You must use a report definition (.rdl) file as a data source. Importing from a report model is not supported.
    You must have permission to open the report under your Windows user account, and you must know the address of the report or the report server that hosts it. You can check your permissions by trying to open the report in a Web browser first.
    If the report opens, it confirms that you have sufficient permissions and the correct URL.
    Reporting Services must be version SQL Server 2008 R2 or SQL Server 2012. Those versions include the data feed export feature that streams report data in the XML data feed format. You can identify the report server by the Export as Data Feed option
    that appears in the report toolbar when you open the report in browser:
    For detail information, please see:
    Import Data from a Reporting Services Report:
    http://technet.microsoft.com/en-us/library/gg413491.aspx
    Regards,
    Elvis Long
    TechNet Community Support

  • I have received a malaware warning on a site that I have paid to join,  because of this warning I don't feel confident to access the site any longer.  How can I see if the site is safe/protect my pc?

    If a malware warning comes up on a site I reguarly use and subscribe to how can I protect my pc and still access the site or contact the site holder to get the problem rectified?
    There was a link to google web checker and they said that they hadn't been on the site for over 90 days and they did not see any threats however, the malware warning keeps coming up when I try to access the site.

    At present there are no known remote exploits against a fully-updated installation of OS X 10.6 or later. Make sure Java (not JavaScript) is disabled in your browser, and don't trust the site with any personal information. Don't open any files downloaded from it.

  • Web Gallery- Make the Site Title a link

    Not sure if this is common knowledge, so I figured I'd pass it along...
    You can make the Site Title a link by entering the following:
    <a href="www.your-url.com">Your Site Title</a>

    If I enter this ( Home ) into my collection title I end up with this
    ( <a href="../index.html">Home</a> ) in the group.xml file.
    When I first enter the original text it appears as ( Home ) in the LR display, upper right corner. Once I save as preset or export the web gallery it then appears as
    ( Home ) in the LR display.
    What am I doing wrong?

  • After site migration, users are unable to access the site, even though they have permissions, prompted to request access

    Not sure whats going on here...
    SharePoint WSS3.0  -> SharePoint 2013 Ent
    Used ShareGate migration tool.
    I migrated the site, and everything appears to be in place as expected.  Users and groups are all assigned just like before.
    But when users try to access the new site, they are prompted to request access.
    Some users are in AD groups, that are in SharePoint groups, and some users are direct members of SharePoint groups.  So far it seems to be groups with read or contribute access.  The owners seem to be able to access the site fine.
    This makes no since...?
    Any ideas?
    Joshua Fuente

    Thanks, I think I may have found the issue...  But it still odd, and I am still verifying if it is in fact the issue.
    The old site has a visitors group, that contains an AD security group.... But that AD security group contains a DL.  I know that's a problem... But it should also be a problem in the source site. (but its not)
    Only thing I can imagine is that at some point the user had direct access, and it was changed to AD group.  And then AD group was changed, and somehow SharePoint just didn't catch on.... (just a guess)
    In any case, I am having the users added to the AD security group to see if that works.
    But I will check out your script if that doesn't work. 
    Thanks!
    Joshua Fuente

  • Check User Can Access the site collection Are Not?

    Hi All 
    I have some requirement to check user can access site are not through powershell?
    Recently we done migration from 2010 to 2013 SP after that i got some problem some users can not access site  but this user have permission in sp 2010 site .
    Regarding this i need to check specific user can loing or Access  the site collection are not. using powershell
    Some one said impersonate user we can check user can open the web are not but i don't know this impersonate.
    Please help me guys.... 

    Hi,
    You can check the permission for specific user with powershell. Here is the link. Hope this will help.

  • Reg:: Determing the Site Title Change date

    Hi Techys,
    I have created a SharePoint 2013 team site on 07-july-2014, and according to the customer requirement I have granted the permissions for some users. But, today(05-Aug-2014) I have recognized someone has changed the site tile. Now, I would like to know
    who was changed the site title and when it was happen.
    This is a huge escalation from my customer, could you plz help me....
    Many Thanks,
    Madhu

    If you have enabled audit log then you can view the reports, if you haven't enabled it then you can not get the details that who has updated the site title. You can view audit log reports from top level site settings --> Site Collection Administration
    --> Audit Log Reports.
    If it is not enabled then you have enable it for getting audit reports (for future use). Check below link for reference.
    http://sureshpydi.blogspot.com/2013/05/audit-log-reports-in-sharepoint-2013.html
    Adnan Amin MCT, SharePoint Architect | If you find this post useful kindly please mark it as an answer.

  • User has contribute access but he is not able to access the site collection...

    User has contribute access but he is not able to access the site collection...

    What error does he get.
    Can you share fiddler trace(check if any 404 error)
    what error do we see in ULS Logs
    Create disableloopback
    registry on server
    http://support.microsoft.com/kb/926642/en-us

  • I would like to see and access the correct sound patches from my E-mu mps orchestral plus from inside of logic express.

    I would like to see and access the correct sound patches from my E-mu mps orchestral plus from inside of logic express.
    Right now , I have access to some of the sound files but most are missing and all are incorrectly labeled.
    Is it possible to ("Library") these sound files or access them from logic?
    Thanks
    J

    HI,
    I'm not quite sure who you think you are addressing here with your idea but this is a user to user forum. Apple don't come here.
    If you want to offer ideas or feedback to Apple, it would be best for you to do it here:
    http://www.apple.com/feedback/logic-pro.html

  • Error in accessing the sample application content from the OBIEE 11g

    I installed OBIEE 11g + Oracle 11g database on one machine. Everything went smoothly with no issues.
    I can connection to the database from SQLPLUS.
    Then I followed instructions to deploy sample app. After everything is done, when I try to access the dashboards, reports etc from the OBIEE 11g home page , I get the error below.
    I am stuc kand dont know how to proceed. I verified tnsnames.ora and everything seems good.
    In the SampleAPp.RPD, I set DB_SID as "ORCL" and DB_HOST as my computer name (along with domain name). No idea how to proceed from here..
    I really appreciate any help.
    Odbc driver returned an error (SQLExecDirectW).
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 43119] Query Failed: [nQSError: 17001] Oracle Error code: 12541, message: ORA-12541: TNS:no listener at OCI call OCIServerAttach. [nQSError: 17014] Could not connect to Oracle database. (HY000)
    Thanks

    Thanks for the replies.
    1) Was the oracle installed in multiple instances ? if yes set the Variable path correctly pointing to your right folder
    Yes, oracle had multiple instances. I tried copying the tnsnames.ora from my oracle home to the Oracle_BI1/network/admin directory as 11g apparetnly comes with a Oracle client as BIFACTs suggested in his/her reply. I put the same in the path variable
    2) Try to ping the service_name tnsping service_name(SID) from command prompt
    This works.
    3) check whether you may have "white spaces" in tnsnames.ora file at starting of entry
    No white spaces appeated
    I still see the same issue! I logged in as developer credentials as mentioned the sample app documentation.
    I get the same "cannot connect to database" error.
    I once in a while see an issue with javahost not starting. Not sure what is the impact of javahsot not running and all the other managed processes running.
    Please help....

  • How users access the sites in NTLM authentication

    Hi,
      For kerberos when users try to access the site actually they able to access the site through the app-pool account of the web app for which we register the SPN. But for NTLM how that works. When a user tries to access the site in NTLM does
    it go through the app-pool account also?
    Please clarify..

    In NTLM and Kerberos, IIS authenticates the user against Active Directory (or if there is a valid Kerberos ticket, that is passed to IIS).
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for

  • Error message for running stored procedure

    Hello expert, I got error message for a stored procedure running as follows, will you please tell me what that error is? what is the reason for that error? appreciate very much. Job name=PROD DWH REPORT MART LOAD.1 Job owner=DEVTEAM Job type=SQL Scri

  • IPad 2 on iOS 5.1 losing wifi password.

    I've updated my iPad 2 to iOS 5.1 and now it won't keep the wifi password. Each time I have to re-input the password. Sometimes it loses the password whilst I'm using it and just disconnects. It was fine on 5.0 but it's doing my nut in now. I'm sure

  • How do i upgrade my hard drive on a hp/compaq nc6000 laptop

    I have a HP/Compaq NC6000 laptop and the hard drive has failed, I have tried 60GB and an 80GB known good hard drive in the machine bit all it says is "Non system disk", how do I upgrade or do I have to put a 30GB HDD back into it

  • Loss of sound, trouble sharing

    i have a macbook and am running imovie 4. never had problems before. actually used it very recently to do some videos. now i'm working with video clips and imported still photos and i have extracted the audio. suddenly the audio is absent in the cont

  • Initiator Task not visible to other users in the Group

    Hi JDeveloper 11.1.1.6, WLS 10.3.6, BPM 11.1.1.6 I have a Process and the swimlane containing the Initiator Task is assigned to a Group. All the users in the group are able to Initiate the Task. But when the Task is initiated, the Task is assigned to