Windows PowerShell is Microsoft's task automation framework, consisting of a command-line shell and associated scripting language built on top of, and integrated with the .NET Framework. PowerShell provides full access to COM and WMI, enabling administrators to perform administrative tasks on both ...

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

look up column error

I am getting into a null array - $spList = $webobj.Lists["Studentlist1"] Exception calling "update" with "0" argument(s): "This lookup field cannot enforce a relationship behavior because it is not ...
0
votes
0answers
13 views

Setting available page layouts

I am trying to specify available page layouts on a publishing site collection. I am using powershell to do that. My function sets all page layouts as available, but I need to only set my custom page ...
0
votes
2answers
20 views

How to rename site collection?

I want to change the title of a site collection. If I do this in the site settings and get the title via powershell it still shows the old name? Is there another way to do this?
1
vote
1answer
8 views

How to set document-template using PowerShell

<DocumentTemplate TargetName="/_layouts/CreatePage.aspx" /> How could I set this using powershell? $dst = ...
0
votes
1answer
10 views

PowerShell script to create a list and add a lookup column

I need a Script to create a custom list and add a look up column into it and add the column into a default view. The look up column should have relationship of Restrict delete.
0
votes
1answer
19 views

How can I get a list of all site urls, site titles, and their site owners through powershell?

I've been able to get the following: Get-SPSite -Limit All | Get-SPWeb -Limit All | where { $_.HasUniquePerm -and $_.AssociatedOwnerGroup -ne $null } | foreach { $url = $_.Url; $_ } | Select ...
0
votes
0answers
16 views

Execute file Javascript with Powershell

I would like to schedule a script powershell that runs a js file, someone has an idea to realize it? I use Sharepoint 2013 Online. Thank you for your help
0
votes
1answer
14 views

Is there a way to get a list of when each site in a web application was last accessed?

I need to get a list of each site and determine the last time someone hit that site. We're in the process of cleaning up our Sharepoint and this data would be very useful. I see that SPWeb has a ...
0
votes
0answers
10 views

Updating scripts for creating Scopes + rules to create Result Sources + rule

I have a powershell script which was created to create Scopes and scope rules for a SP2010 environment. Now I have to create a similar script but for SP2013. It should create the same Scopes and scope ...
0
votes
0answers
18 views

What PowerShell script can I use to inventory all my lists, calendars, etc. for a SharePoint 2013 site

I have used the cmdlet Get-DocInventory within a PowerShell script which gave me every single document on my SitePoint 2013 site which was great ! However, I need everything above this level to be ...
1
vote
0answers
20 views

Disadvantages of starting a remote powershell session and doing deployment

Are are any disadvantages with starting a New-PSSession from dev machine and deploying the wsp to QA machine remotely rather than going to QA machine and deploying the wsp??
0
votes
0answers
15 views

Apps in a DR farm: ms.sp.int vs ms.sp.ext

During the set-up of a DR farm, we're facing a weird issue with apps. We have both a provider hosted app as well as a sharepoint hosted app deployed to a site using powershell. The apps are also ...
0
votes
1answer
24 views

Office 365 pre-provision my site issue with Powershell

I am creating personal sites using powershell csom. My issue is on below line $loader = [Microsoft.SharePoint.Client.UserProfiles.ProfileLoader]::GetProfileLoader($ctx) I get following error. ...
0
votes
2answers
31 views

Content type not updated after adding column in library using powershell

I have added a new column in library in SharePoint 2010 site using powershell. The column is getting added, however content type is not getting updated for the libraries. When I try to get new column ...
0
votes
0answers
17 views

Programatically filtering SharePoint 2010 lists that may have files by base templates

I have identified the following list types and their respective BaseTemplates (see text in quotes) as those type of lists where users can upload files to: Documents Library: "DocumentLibrary" Asset ...
0
votes
0answers
28 views

Cannot find type [Microsoft.SharePoint.SPSite]: make sure the assembly containing this type is loaded

I'm trying yo Run this script ps1 from C# code but it returns me the following error where trigger "pipeline.Invoke()"; InitialSessionState iss = InitialSessionState.CreateDefault(); ...
0
votes
2answers
29 views

How to write powershell catch error stacktrace to a listitem?

I am using a powershell script where I do some logic. It is a big powershell and is scheduled. I would like to triggered when there occurred some error. I would like to have the whole error stacktrace ...
0
votes
0answers
17 views

Scheduling tasks for SharePoint Online

As we are venturing into the Office 365/SharePoint Online world, there will be the need to run some routine maintenance scripts on schedule. For example, adding a service account as an administrator ...
0
votes
1answer
25 views

Assign default value to column in SharePoint library using powershell

I am writing a script for assigning the default value of a column in SharePoint library: $spFieldType = [Microsoft.SharePoint.SPFieldType]::Text $sList.Fields.Add("OpCoNam",$spFieldType,$true) ...
1
vote
1answer
37 views

How to get the URL of all site pages in SharePoint 2010 with PowerShell

I'm building a PowerShell script to get the url's for my SharePoint sites' pages (see below) $siteURL = "http://mysite" $site = new-object microsoft.sharepoint.spsite($siteURL) $webApp = ...
0
votes
0answers
8 views

How am I supposed to get object Id for diff objects to be used for diff webservices in Sharepoint 2013?

Please refer to this documentation. It says that Ids are assigned to objects. How am I supposed to get these Ids? I see Powershell getting these for constructing xmls for diff operations. How is it ...
0
votes
2answers
25 views

Restore-Spsite -Force not working

I'm quite new to SP and while trying to restore a site collection (same version) to a new area I get the another site collection already exists, choose a new url or use -Force error. Which would be ...
0
votes
0answers
11 views

Manage Powerpivot Data Refresh using Powershell

I have looked around quite a bit and haven't found anything on managing the powerpivot data refresh settings / schedule using powershell. Is this even possible? I would like to bulk update some of ...
0
votes
1answer
43 views

Issue while creating columns in document libraries using powershell

I am using below script to iterate through each document library and create a column with the value equals to the name of library itself: $ver = $host | select version if($Ver.version.major -gt ...
0
votes
1answer
16 views

SharePoint Export only selected list items not whole list

Is there a way to export only individual list or library items using powershell or any other way? I tried Export-SPWeb command with item URL but it exported whole library.
0
votes
1answer
30 views

BreakRoleInheritance Error You cannot call a method on a null-valued expression

I have the following piece of code to break role inheritance in specific folder and apply another role $folder= $web.GetFolder($folderURL) $folder.Item.BreakRoleInheritance("true") Success it ...
0
votes
1answer
20 views

how to move wsp's from one server to another server using powershell

I have a requirement to move all WSP's from Local Machine to QA server using PowerShell. Any links please.
1
vote
1answer
21 views

SharePoint upgrade process

What is the meaning of the phrase "build to build" upgrade in the context of cmdlets Mount-SPContentDatabase and Upgrade-SPContentDatabase?
0
votes
0answers
11 views

Working of PowerShell Import-SPWeb command with UpdateVersion Overwrite

As per technet site the 'Overwrite' value for UpdateVersions parameter does following : "Overwrite to overwrite the current file and all of its versions (delete then insert)". But my question is does ...
0
votes
4answers
39 views

$SPWeb.GetList - Exception

I am trying to get a list using PowerShell, so I am executing this code: $list = $web.GetList($web.Url +"lists/TestList") It's giving me: Exception calling "GetList" with "1" argument(s): ...
0
votes
0answers
20 views

PS1 Script Clone user permission , Exception on You cannot call a method on a null-valued expression

This script clones Users permissions given a Source user and a target User. It works perfectly in my test environment but not in production. #Function to copy user permissions Function ...
0
votes
1answer
9 views

I want to delete my list item corresponding the date and time?

I have stack list now i want delete my list item corresponding the date and time.what are all the ways to delete list item. I used power-shell for particular list $web = get-spweb -Identity ...
2
votes
1answer
37 views

Error creating PeopleManager object using CSOM in powershell

I have this line in my powershell script: $peopleManager = New-Object Microsoft.SharePoint.Client.UserProfiles.PeopleManager($context) When it gets hit I receive the error: New-Object : Cannot ...
0
votes
2answers
48 views

Inject HTML into SharePoint view (AllItems.aspx) via powershell

This is a good question with no good answer. I have HTML I want to inject into various existing SharePoint views, via powershell. I've been doing this via SharePoint designer so far - is there a way ...
1
vote
3answers
62 views

PowerShell script to download SharePoint attachments (Excel) with certain worksheet name

I'm trying to write a PowerShell script that will scan a SharePoint list and download an excel spreadsheet if it has a certain worksheet name. I'm not sure of where to start as far as syntax goes... ...
-1
votes
0answers
20 views

How to get the count list items,work flows,documents from Lotus Notes Data Base?

We are working on Lotus Notes(LN) migration to SP2013,we are having LN databases,is there any way to get(using power shell or API) the list of workflows,documents,list items count to get from the LN ...
2
votes
1answer
31 views

SharePoint Online: Change properties

I am retrieving a change log for SharePoint Online site, but I am particularly interested in the who performed the change and on what item. $changeQuery = New-Object ...
0
votes
0answers
23 views

Powershell to fetch all alerts from SharePoint online

How to fetch all the alerts from all the sitecollections in SharePoint online using PowerShell script. Please suggest. Thank You.
2
votes
1answer
63 views

Add columns to existing libraries in SharePoint 2010 using Powershell

I need to add five new columns to existing SharePoint 2010 libraries using powershell. I am using below script: $ver = $host | select version if($Ver.version.major -gt 1) ...
0
votes
1answer
22 views

Which page layout to use to create a new Full Page, Vertical page?

In order to create a new web part page with a PowerShell script, you must provide a page layout. None of the page layouts on my site seem to match the Full Page, Vertical choice you have when you ...
0
votes
1answer
33 views

Change Modified Date and User in Versions

We have document libraries in Sharepoint 2010 with incorrect modified dates and users (they were imported from somewhere). I thought, I could correct them with Powershell, but it does not work the way ...
0
votes
1answer
52 views

Powershell Script to get items only in a particular view of SharePoint List/library

Is there a way to get the items that are present in a particular view of a sharepoint library? Actually my library has multiple levels of folders like this: Level1 Document set Level2 Folders and ...
0
votes
0answers
38 views

Grant permission on multiple folders using PowerShell

Can you please help me to grant permission to different folders ? I used the following article : Grant folder permission(SharePoint) using powershell script but when I tried to grant permission for ...
0
votes
1answer
29 views

Powershell PS1 clone SP permissions Exception

I have found this nice PS1 that clone permissions from a SPUser To Other. When give inputs Many things goes wrong but I have non idea what. Has Anybody any idea about this issue? PS ...
1
vote
1answer
20 views

Get-SPGroup and Set-SPGroup commands

Like Get-SPUser and Set-SPUser, are there any commands like Get-SPGroup and Set-SPGroup ? I want to use Powershell commands like Set-SPGroup -Identity $ADGroupName -Web $SiteCollection
0
votes
0answers
41 views

Iterate through items inside folders and sub folders in SharePoint Library

I have a SharePoint library with document sets on level 1. Then inside document sets I have Folders and some documents(word,excel,text) on level 2. Then again inside folders in level 2 I have some ...
0
votes
1answer
40 views

Yes/No Field Default value problem!

I have tried following script to set default value of Yes/No Field to Yes which is by default set to No in list Yes/No column, i get false result at last line. I have tried these values: 1 , $true, ...
0
votes
1answer
17 views

Get all Pages and their Page layout in a web app using powershell

I want to get all pages and their layout using powershell in a given web application
1
vote
0answers
28 views

New-SMBShare : No mapping between account names and security IDs was done

I am creating Shared folder and want to set permissions on it with SharePoint farm account and App_Pool Account as below: $FullAccessAccounts = "domain\farm,domain\app_pool" $ReadAccount = ...
1
vote
0answers
14 views

Remove Replicating directory changes on a user - AD - powershell

I'm having problem in my production environment with User Profile Synchronization Service that is stuck on starting. I'm not able to reach the AD but the hosting company does. I think they might have ...