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
24 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
16 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
30 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
11 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 ...
0
votes
2answers
39 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
31 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
17 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
23 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
20 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?
0
votes
1answer
32 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
0answers
23 views

Default/location based metadata at site level via powershell

I can access metadata defaults at a document library level using: [Reflection.Assembly]::LoadwithPartialName("Microsoft.Office.DocumentManagement") $metadatadefaults = New-Object -TypeName ...
0
votes
1answer
28 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
33 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
37 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
24 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
18 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
24 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
26 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
27 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
37 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 ...
1
vote
2answers
26 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
40 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
30 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
31 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
13 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
6 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
22 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
20 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
21 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
37 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
18 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 ...
0
votes
2answers
40 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
37 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
24 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
26 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
24 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
20 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
12 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
11 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
88 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
38 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
31 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
43 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
30 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?
1
vote
1answer
48 views

Powershell add sitecollection primary adminstrator

I want to create PS script to create sitecollection and add the primary and secondary sitecollection administrator. However i need to find out if the user account user that used to assign in ...
0
votes
1answer
34 views

Deleted root site

I have accidentally deleted my root site. I thought I was in a subiste and deleted it. With powershell GET-SPDeletedSite I see WebApplicationId : 9fdb1d8c-19c1-43e5-99ea-6afbae62d2b9 ...
0
votes
1answer
28 views

Error in restoring a sharepoint2013 site collection using powershell command

We have requirement to restore an existing site collection in share point 2013 to a new site in share point 2013 and for this we have taken back up of the old site collection using this power shell ...
0
votes
0answers
26 views

Having problems attaching files to multiple items using powershell

Im having issues attaching files to multiple items using powershell. With one item it works. my snipet code below Thanks #When i run the script and having to pass one item it works but not ...
0
votes
1answer
36 views

Error creating SPSite using powershell

I am trying to create a web application "http://Intranet" and a site collection "http://Intranet" on SharePoint 2013 foundation farm. Here is my code $sp = New-SPAuthenticationProvider $web = ...
0
votes
1answer
30 views

Find field in site collection based on GUID

Looking for a way to locate a field by it's GUID in my site collection...any one know a way to do this in powershell and dump out where the field is being used?