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
4answers
6k views

Restore-SPSite failure due to insufficient Content Database Space

I hope someone can help me solve this weird problem I'm facing for 4 days. I'm trying to restore the backup of Sharepoint 2010 web application. I'm using Windows Powershell command : Restore-SPSite ...
0
votes
1answer
16 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
36 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 ...
1
vote
1answer
24 views

IRM enabled different for interface than with powershell

Learning about IRM and how it works, please help me understand this situation. Why does powershell show that IRMenabled is true, but the web interface doesn't reflect that IRM is being used? IRM is ...
0
votes
1answer
37 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
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
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
1answer
25 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 ...
-1
votes
2answers
41 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
32 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
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 ...
0
votes
1answer
33 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 ...
1
vote
1answer
29 views

Break Role Inheritence Problem

I used following script provided by Nadeem for breaking permission inheritance of folder. but for me, when I tested ,it doesn't break inheritance at all. it is just assigning new group 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
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

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
2answers
38 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. ...
0
votes
1answer
29 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

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 ...
2
votes
1answer
4k views

Activating a WebApplication Scoped Feature for a particular WebApplication

I developed a SharePoint 2010 WSP that contains a custom HTTP Module for performing short-url redirects. The WSP also contains a WebApplication scoped feature that consists of a feature receiver that ...
0
votes
1answer
34 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 ...
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
19 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
25 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 ...
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
27 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 ...
3
votes
3answers
3k views

Get name of Farm account using Powershell

How can I get the name of the Farm account ? I can see it listed in Get-SPManagedAccount, but do not see any properties on the SPManagedAccount objects to be able to dynamically filter by and ...
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
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 ...
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 ...
1
vote
3answers
120 views

error when executing update-spsolution

Im trying to update a web part that has been distibuted across our sharepoint intranet and im coming up with an error ive never seen before. Ive googled but cant find any info. Can someone help. ...
2
votes
0answers
32 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 ...
1
vote
0answers
76 views

How can I count the number of posts & comments in a SharePoint 2013 newsfeed?

I need to count the number of posts & comments in a SharePoint 2013 newsfeed webpart on a page in a site. At the moment I can't see how to do this via Site Settings -> Report or Site Settings -> ...
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
0answers
22 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
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
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
3answers
40 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
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 ...
2
votes
3answers
601 views

How to view what a user has access to with PowerShell?

A user has limited access but I don't know what for. How can I view what this user has access to? I'm on WSS 3. Does anyone know of a PowerShell script to perform this method?
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?
2
votes
2answers
252 views

Deleting Dead User Accounts from Sharepoint Alerts,Assigned to E-Mails ,Workflows

how delete Dead User Accounts from Sharepoint Alerts,Assigned to E-Mails ,Workflows.
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
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
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 ...
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 ...
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?