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

0
votes
1answer
60 views

Powershell : Query Document Exclude Document Set

I have a Document Library contains multiple Document Sets, each of the Document Sets contains Files. Document Library ----> Document Set ----> Files My objective is to query all File Name only ...
0
votes
0answers
37 views

Finding items using content types

Get-SPSite http://skynet | Select -ExpandProperty AllWebs | Select -ExpandProperty Lists | Select -ExpandProperty Items | ForEach { ForEach($ct in $ContentTypes){ if($ct.PM -eq "Res" -or "Con"){$_}}} ...
0
votes
0answers
10 views

Where query with a metadata field applied to the base content type

I want to create a query for all document library tagged with the terms ‘r’ or ‘c’ under their pm metadata field? the pm field is a ‘choice’ term type, applied to the base content type, so all of our ...
0
votes
0answers
86 views

How to remove unwanted permissions from list items via powershell by name of user/group

I need to remove unwanted list item permissions. The problem is i need to add user in a people and group field to list items and assign them a READ permission. But the list inherits permissions from ...
0
votes
0answers
40 views

site column where clause sharepoint

I have a sharepoint site and am creating a powershell script that searches through all document libraries and output the results based on a query to a site column. Get-SPSite mysite Select ...
1
vote
1answer
323 views

PowerShell: Get all items where column equals a certain value

I have a SharePoint site which I want to search all document libraries where column1 = 'hello' and then print out the columns title, scope and column1. Then output the result to a file. I want to do ...
0
votes
2answers
210 views

PowerShell - Iterate through all webs, then iterate through all lists , then add a column where a list is a certain name

I'm trying to put together a script that should iterate through all webs in a site collection, then iterate through all lists in those webs, then add a column where a list has a certain name. This is ...
0
votes
1answer
285 views

How to set Navigation in Office 365 site using powershell?

I am creating some Global / Current navigations nodes on a SharePoint site (SharePoint 2010 in house site) by fetching them through a csv file. Below is the script: #Script to create Global/Current ...
0
votes
0answers
57 views

Import/refresh automatically a CSV file ? Powershell or not?

I have to import a CSV file into a list (put it in a tab). But this CSV will be updated (weel, in fact it will be regenerated), and I need SharePoint to refresh the list with new data. I don't know ...
0
votes
1answer
70 views

Saving Changes OPENXML with PowerShell

Just wondering if someone could point a SharePoint and Powershell newbie in the right direction. We have a problem where some legacy documents in our system have an attachedtemplate which references ...
0
votes
1answer
84 views

Copy-SPSite for /PWA doesn't work on SharePoint 2013

Hello I'm trying to make a script to move an ProjectServer site from one farm to another. To to this, first I import the WSS_Content database then try to rename the /PWA site with Copy-SPSite ...
-1
votes
2answers
45 views

powershell problems

I'm A share point intern who's just discovered power shell. I want to start using it right away however the problem is that I'm stuck with a windows 7 pc with power shell installed on it. So i cant ...
0
votes
0answers
71 views

Removing permissions from a user throwing exception - PowerShell

I was trying to remove Read permission to all sub-sites for a particular user. Following is the code that I tried so far - $site = Get-SPSite "http://pc152637/" foreach ($web in $site.AllWebs){ ...
0
votes
0answers
40 views

Make permissions read only for existing users of all sub-sites under a site

How to make permissions read only for existing users of all sub-sites under a site using power shell script? Other permissions like Full control, Contribute must be removed for the users.
0
votes
1answer
87 views

SharePoint security based on Active Directory security groups not work

Please help me. In the organization , we have deployed SharePoint 2013 , to control access to sites decided through security group Active Directory. Active Directory security groups are added to the ...
0
votes
1answer
43 views

Powershell to get template name site is using

I have a site collection http:/SC/ under which I have a site http:/SC/site. Can you provide powershell to check which template http:/SC/site is using?
1
vote
1answer
70 views

Test-SPContentDatabase doesn't return information

I run Test-SPContentDatabase like this: public string Test_Associate(string DbName,string UrlApp) { Runspace runspace = RunspaceFactory.CreateRunspace(); // open it ...
0
votes
1answer
122 views

File gone after using SPFile.MoveTo

I am trying to move files from the RootFolder to a subfolder via PowerShell (would like to keep SPItem.Id from changing if possible). The code I have used is pretty straight forward. starting to ...
0
votes
1answer
80 views

run SharePoint management shell with c#

I have some ps1 that I need to run it with SharePoint management shell. I dont have the possibility to run it with the traditionnal powershell even i havce the administrator role : public string ...
0
votes
2answers
88 views

Powershell script to change locked for editing to sharepoint\system status, ID not found?

I am trying to target a file to change the check out status. So I can delete it. SharePoint Management does not work. Manage Content & Structure does not work. So I am trying PowerShell. ...
1
vote
1answer
274 views

PowerShell code to add/remove, install/uninstall and enable/deactivate feature at Web, Site Collection, Web Application and Farm scope

Please can you give me the best practice PowerShell code to:- A. Add, install and enable feature at -Web -Site Collection -Web Application -Farm scope B. Deactivate, Uninstall and Remove ...
0
votes
1answer
37 views

What happens if feature is already activated and you install new wsp?

Suppose we have deployed a wsp (say webpart) with a feature at site collection level and it is activated. Then, we change code of the webpart, create a new wsp. Then, go to central admin->manage ...
0
votes
0answers
122 views

Help in updating multiple person field via powershell - Only updates one user

Im trying to update multiple person field but it only updates one person not multiple users.ONLY THE LAST ONE As you can see below i'm picking up display name from a field "Contract Viewer" which has ...
1
vote
1answer
131 views

Can I add the sharepoint module to powershell? 2010 / 2013

I apologize if this has been answered but I couldn't find any answers to my question. I want to practice the power shell commands for Sharepoint (either 2010 or 2013) but I can't seem to find a ...
0
votes
1answer
72 views

Sharepoint 2010 managed metadata via powershell: can't access some fields

I'm trying to learn about accessing/setting managed metadata fields using powershell (v2) in sharepoint 2010. Based on various tutorials/forums I have the following minimal (not)working example: ...
0
votes
1answer
51 views

List.GetItems is running slow for certain sites

I'm running a pretty simple query to get back items using List.GetItems and it seems to be performing horribly on some of my sites (differing site collections). The lists being queried are essentially ...
2
votes
2answers
292 views

How to change the user profile property value for all users via PowerShell?

We have a bool: User profile property. Is there a way to set the value of this field to 'false' for all users? The user profile property exists only in the SharePoint and not in AD.
0
votes
2answers
51 views

Deploying feature via PowerShell

I am new to powershell deployment, and little confused with features and scopes. We deploy feature via PowerShell. Code: $solution="myfeature.wsp" $path= $solutionPath + $solution Add-SPSolution ...
2
votes
0answers
186 views

How to delete a Task that is associated to an item and workflow that have been deleted

I have a task that is associated with an item (in another list) that has a running workflow. However, the item was deleted over a year ago and therefore it is no longer recoverable from the recycle ...
0
votes
1answer
129 views

Documents / Library missing after migrating My Site to the new Content Database

I've moved some My Sites to new content database with the powershell cmdlet Move-SPSite. However, after moving them, it appears documents were "lost" on some of them (most of sites is just fine). When ...
0
votes
1answer
17 views

Webpart not appearing in site

We have deployed webpart using powershell but cannot find it under the Edit page-> add webpart -> custom, there is no folder called 'custom'. This folder otherwise comes up when deployed via VS. ...
0
votes
0answers
8 views

Delete duplicate site column using powershell script [duplicate]

When I try to add any content type it give error. I checked ULS and it say "no two choice should have same ID". I checked google and find that I have to delete duplicate site column. Can anyone please ...
0
votes
1answer
136 views

How to activate web application and site collection level feature via PowerShell?

We have deployed a wsp using: Add-SPSolution -LiteralPath $path install-spsolution -Identity $solution -GACDeployment -Force This wsp has 2 features, one scoped at application level (FeatureA) and ...
0
votes
0answers
88 views

Find duplicate site column using powershell script

When I try to add any content type it give error. I checked ULS and it say "no two choice should have same ID". I checked google and find that I have to delete duplicate site column. Can anyone please ...
0
votes
0answers
38 views

Connect to SPFarm SharePoint 2010

I want to create a function to connect to SPFarm SharePoint2010 with a login and password ,I knowed that it use NTLM authentification ,do I need credential connection ? is there any PowerShell ...
0
votes
3answers
179 views

How to create list in root web for every site collection via powershell?

I need powershell script to create a custom list named 'test' with Title, URL and an boolean field in the rootweb of every site collection.
0
votes
1answer
30 views

Faster way of Downloading Metadata in CSV

we Have document library with 3lacs+ items. we have to download metadata of each file in a csv such as Modified date , modified By etc. I used powershell code for achieving this task but for some ...
1
vote
2answers
182 views

How do I migrate a document library (and just the documents) with PowerShell

I need to migrate the documents of an existing library to a new library. The requirements of the migration is that I maintain versions and audit data (who/when created the document and last modified ...
2
votes
1answer
141 views

How to turn off MDS on all site collections and sites?

We have got a web application with 400 site collections and multiple sites, is there a way to turn off the MDS feature for entire web application?
0
votes
0answers
76 views

JSLink Issues with Powershell but not Object Model (with Code Samples!)

I am having trouble attaching a JSLink to a list view (.js file located in the Script Library) Powershell: $list = $web.Lists["Gratitude"] $view = $list.Views["Gratitude"]; $view.JSLink = ...
0
votes
1answer
57 views

Powershell to deploy wsp scoped at web application

We have created several wsps and each wsp have 1 or more feature. In test environment we deploy the projects via VS. But, for production we are thinking of doing it the powershell way. I am new to ...
0
votes
1answer
288 views

Powershell for downloading documents with versions

is there any PowerShell script which downloads all the documents with folder structure from document library maintaining version of each file?
0
votes
1answer
77 views

Get-SPExcelServiceApplication Cmdlet not recognized during Powerpivot configuration

I am trying to run the sharepoint powerpivot configuration tool however I am getting a message saying: The term 'Get-SPExcelServiceApplication' is not recognized as the name of a cmdlet, function, ...
0
votes
1answer
15 views

Get and modify crawled property

I have a custom metadata mapped now by script I need to get that to do some update. How can I do this?
0
votes
0answers
61 views

GET-SPProduct -Local throwing error

Get_SPProduct cmdlets behaving weird: On running GET-SPProduct -Local to one of server in farm throws error Get-SPProduct : Object reference not set to an instance of an object. At line:1 ...
0
votes
2answers
115 views

Removing a permission level from a sharepoint group with powershell throws principal not found

I have the following script, basically I need to iterate over all subsites with a specific template, and in one of the existing SP groups I want to remove a permission level. The script below is ...
1
vote
1answer
113 views

App operations ( install,un-install,upgrades) using powershell for Sharepoint Online office 365

We are currently building our Intranet site in Office 365 SharePoint Online using App Model.We are using SharePoint Hosted Apps with Client Object Model.The data for the App is from a Custom list ...
2
votes
0answers
107 views

PowerShell script to update ContentType of existing records in Document Library

we are using Document Library in SharePoint 2010 environment. there are about 200 document present in the document library which have been identified (based on location - England and employee type - ...
1
vote
0answers
130 views

DTD Error with Connect-SPOService

Just recently I cannot connect to my tenant admin with PowerShell. When I call Connect-SPOService -Url https://<tenant>-admin.sharepoint.com I get the following error: Connect-SPOService ...
1
vote
1answer
67 views

How to identify the jobs which are running?

I need to find the jobs which are running currently. This is to check the longest running jobs. Is there any powershell sript to get this done?