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)

1
vote
0answers
16 views

GetListItems isnt working for library with metadata - PowerShell

So after searching over and over on the net for a reason for my problem. I decided to post it here. I'm trying to get all the items in my list that are in a subsite. In that subsite there are 3 ...
2
votes
1answer
123 views

Pretty url in SharePoint

The url's on our intranet are pretty, i.e. http://intranet/test, but we want to show full path of the page, like this http://intranet/test/default.aspx I don't know why we get pretty url and have ...
1
vote
1answer
33 views

Set password policy for specific user in O365?

In Office 365, I have a workflow that runs in the context of another user - a service user. The service users password gets expired after 120 days and then has to be edited, like it does for all other ...
0
votes
1answer
24 views

Delete all files and folders in shared document using powershell

I want to delete all files and folders in shared document using powershell. Thanks.
0
votes
1answer
18 views

How to sort a list column in power shell and update list in share point 2010

using powershell script how to sort a list column before update a list item. here i created a document library and uploaded some documents and want to update ProcessNo column based on ...
0
votes
1answer
15 views

show created column should display seconds with created time after a document save in share point

I created a site collection with Document Center Template and created a document library, i uploaded documents and i want to see created column should display seconds with created time , because i ...
1
vote
2answers
27 views

Powershell script for knowing the status of solution from deploying to deployed

I have added and installed couple of .wsp solutions to farm using following commands: $getSolution = Get-SPSolution -Identity "MySolution.wsp" if($getSolution -eq $null) { Add-SPSolution -LiteralPath ...
0
votes
1answer
20 views

Path for Alternate CSS URL?

i am settings the alternate css url using following powershell script, but it did not change the .css file. What path should i use for alternate css? in my case .css file is located at this path: ...
0
votes
0answers
13 views

SharePoint 2013 Page Status Message

Is there a way to add status to a page(suppose home page) of a SharePoint site using PowerShell? I found ways to do it using javascript (SP.UI.Status) and server side code using c# ...
0
votes
0answers
14 views

Workflow “Error Occurred” After Task Reassignment Using Powershell

I had a task assigned to the wrong person in a custom visual studio workflow. Previously I have been able to reassign these types of tasks using Powershell and the following lines: $web = Get-SPWeb ...
1
vote
1answer
23 views

SharePoint 2010 enterprise migration to SharePoint 2013 - Test-SPsite FailedErrorCount

I'm in the process of migrating intranet site in SharePoint 2010 to a new SharePoint 2013 farm. I have followed the steps from here. Problem appeared when I ran the PowerShell command Test-SPSITE and ...
0
votes
1answer
26 views

Change default columns values multiple libraries

I have 20 plus libraries that I need to set the default value (to the same value). The data is from the term store, I also need to do this for a site column. Is there a tool or script to do this ...
1
vote
1answer
17 views

How to check and list active profiles in UPS?

When I setup the UPS sync first time, I selected entire domain to import. So that many users are imported and their user profiles are generated. Later I de-select some OUs and make a full sync. I ...
0
votes
1answer
10 views

Can we add a column to a sharepoint list having data using powershell

Can we add a column to a sharepoint list having data using powershell without effecting anything in the sharepoint list.
1
vote
1answer
23 views

Get subsite subsites titles

param ( [Parameter(Mandatory=$true)][ValidateNotNullOrEmpty()] [String]$StartWeb, [Boolean]$IncludeStartWeb = $false ) Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue ...
1
vote
1answer
16 views

Share a Site Collection through Powershell SharePoint 2013

I cannot find the Powershell commands to share a site/site collection with a user or group of users. Same as Site Settings > Site Permission. Can you help me? Thanks
0
votes
2answers
17 views

Update filed values based on conditions

i have document library in sharepoint 2010 and i want to update a field values based on some conditions . I need that every parentid has some documents and i want to update those prosessnos which ...
0
votes
1answer
15 views

How to add all default application proxies to custom application proxy group

I have created a web application using powershell and associate it with custom application proxy group. But i also want to add all default application proxies except Managed Metadata Service to my ...
1
vote
1answer
31 views

formatting multivalue lookup value using powershell - SharePoint 2013

What would be the best way to format this Brand Management;#2120;#Infinite Retail I would like to strip the ;#2120;# of and replace with , Sometimes values are single Thanks in advance
1
vote
0answers
26 views

Create document library with look up and multi line text box feilds using powershell

Remove-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue #To which site u want to create the list ...
0
votes
1answer
30 views

Replace WebPart programmatically on .aspx Page without WebPartZone

Is there a way good way to replace a WebPart programmatically on a WikiPage and keep the old position? So far I'm able to delete a WebPart and add a new one but since it's a WikiPage where the current ...
0
votes
0answers
16 views

How to add specified web application to DNS by pinging it

I have created a sharepoint web application using powershell. I want to add my web application to default DNS. How i add it using powershell?
0
votes
1answer
21 views

how to check if any site collection is associated with web application

I have created Web Application with Powershell. I want to check if any site collection is associated with web application using powershell? How it can be checked?
0
votes
1answer
29 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 ...
1
vote
2answers
34 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
31 views

How to set document-template using PowerShell

<DocumentTemplate TargetName="/_layouts/CreatePage.aspx" /> How could I set this using powershell? $dst = ...
0
votes
1answer
25 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
29 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
56 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 var page = new WebPage(), testindex = 0, ...
0
votes
1answer
23 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
16 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
22 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
23 views

Disadvantages of starting a remote powershell session and doing deployment

Are there any disadvantages in 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
1answer
33 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
61 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
44 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
19 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
68 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
35 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 ...
2
votes
0answers
32 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
28 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
43 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
14 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
36 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
20 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
48 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
44 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
27 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
22 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?