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
0answers
20 views

Event Handling in powershell

I am wondering why the event in this sample code cannot be started. $import = New-Object Microsoft.SharePoint.Deployment.SPImport($importSettings) $CreatedAction = { $ro = ...
0
votes
0answers
11 views

Selective migration with powershell

I do like to migrate several sites to another site into a special sub-site and Folder. I know that by using Microsoft.SharePoint.Deployment.SPExportSettings and Import it is feasible but I don't know ...
0
votes
1answer
42 views

query xml powershell sharepoint

Get-SPSite mysite | Select -ExpandProperty AllWebs | Select -ExpandProperty Lists | Select -ExpandProperty Items | Out-File outputpm.txt I have this code, which produces the items, one of the items ...
0
votes
0answers
39 views

SharePoint 2010 PowerShell Delete folders in Document Library - See SharePoint/event Log?

I wonder if its possible to see a log file of events (deleted folders in big document library) when actions are invoked by PowerShell? The PowerShell-script it self don't push anything to a log-file ...
1
vote
2answers
946 views

powershell script to move/copy files from network path to SharePoint sub folder

if((Get-PSSnapin "Microsoft.SharePoint.PowerShell") -eq $null) { Add-PSSnapin Microsoft.SharePoint.PowerShell } $spWeb=Get-SPWeb -identity ...
1
vote
0answers
46 views

Powershell the local farm is not accessible - SPECIAL NUANCE

Wonder if you could shed some light on a variant of this situation I'm experiencing. Typical Error when running Sharepoint Management Shell "the local farm is not accessible. CmdLets...." Here's the ...
0
votes
1answer
52 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
69 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
35 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
215 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
154 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
222 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
47 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
65 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
64 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
64 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
39 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
80 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
35 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
67 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
87 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
74 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
79 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
185 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
34 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
100 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
100 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
70 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
47 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
182 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
50 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
147 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
111 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
16 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
99 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
65 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
37 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
148 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
29 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
161 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
105 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
67 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
52 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
173 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
62 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?