Cannot index into a null array.


hi

i new powershell, , part of code have this;

new-spprojectdatabase -name $pwadb -serviceapplication $projectserviceapp -tag $tag

$webappurl = $webappurl
$web=get-spweb $webappurl
$web.properties["pwa_tag"]=$tag
$web.properties.update()
enable-spfeature pwasite -url $webappurl

(this part of script)

the second line seems throw error;

cannot index null array.
@ line:22 char:1
+ $web.properties["pwa_tag"]=$tag

any ideas? driving me crazy don't know means - cannot find on internet, helps me

as question how find out other properties, did try:

get-spweb $webappurl | format-list

and pwa_tag 'can' database name, decided choose string tag, need not. understand it, has unique identifier project database have created

new-spprojectdatabase –name databasename -serviceapplication "serviceapplicationname" -databaseserver sqlserverinstance -tag string

this unique identifier later used associate created project web app database site collection.

btw, seems, pretty new , needs project server 2013 run. hope, you've got that! here nice example on how use that. interesting stuff, think try myself i'll spare time.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL