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
86 views

How can I delete library items using an array? (Plus a bonus question.)

I'm writing a script for my SharePoint 2010 environment that will delete all items from a specified library that are more than 14 days old. The way I'm doing this is by using 'foreach' to run through ...
0
votes
0answers
69 views

powershell script works but not showing list data(scheduled task)

I have a powershell script scheduled to get data from list item and send it as email. I do get the email but the content is empty its not picking up list data. When i run it from powershell command ...
0
votes
0answers
44 views

How do I move files into Document Sets that are in the same library using either powershell or workflow.

I have a requirement that states that I need to move files into Document Sets where the Document Set is equal to the value of a column named DS. The files and the document sets are in the same ...
0
votes
0answers
33 views

Trying to link Community site member ID with userlogin with powershell

I have a site collection created with default Community Site template. I need to generate a user report with powershell. The user's loginname, displayname, NoOfReplies, NoOfBestReplies, etc should be ...
0
votes
0answers
238 views

adding a (href) hyperlink to html(convertTo-HTML) via powershell

I-m trying to add a href hyperlink to my HTML as below as I-m sending it as an email. But it's not working for me. Has anyone experienced this? How can I get this rolling? $message.Body = ...
0
votes
0answers
16 views

Authenticate within a Sharepoint Library by Folder Name?

I have a Sharepoint Library, which I have a Powershell script dropping files into for processing. The Powershell script reaches out to Active Directory, and returns Group Membership information. The ...
0
votes
0answers
30 views

searching all documents with a content type

How can I search all documents with a particular content type of 'EC Docs' and then query a site column in that content type where column -eq 'Res' Get-SPSite mysite | select -ExpandProperty AllWebs ...
0
votes
0answers
31 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
16 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
0answers
56 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 ...
0
votes
0answers
39 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
13 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
148 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
66 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 ...
0
votes
0answers
168 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
0answers
91 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
51 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
0answers
430 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
0answers
139 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
46 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
0answers
128 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
0answers
131 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
0answers
71 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
0answers
163 views

TermSetItem.Terms does not load properly?

I am attempting to write a PowerShell script to extract taxonomy entries from one environment to import them into another. I'm running into a problem where one of my Term Sets' Terms property is not ...
0
votes
0answers
95 views

Any example on .AddDependentLookup with power shell for a look up field

Here is the code which I have tried using Add dependent lookup. But gives an error. any idea what's wrong? Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue $url = ...
0
votes
0answers
54 views

SharePoint 2010 auto delete sites, sub-sites and pages

SharePoint 2010 - publishing website with sites, sub-sites and pages. PowerShell script to auto delete sites, sub-sites and pages if lastModifiedDate is X number of days ago (x would be a PowerShell ...
0
votes
0answers
52 views

Power shell script to select additonal fields for a lookup through site column

I have create a Lookup column as a site column in my root site collection selecting the following fields(Title,Order,status). In My subsite i am using this column using power shell.Lookup is getting ...
0
votes
0answers
458 views

How can i set/update Person Field(person/group field) via powershell

I have a column(it has a display name e.g John Shane) and I would like to use that to set/update an empty person field. Why I need this is because this list was migrated from sharepoint 2010 to ...
0
votes
0answers
48 views

Enable-SPFeature not working in scheduled task

I have a powershell script that runs every 5 minutes it creates a subsite on a Site Collection the last part of the script activates the SiteNoteBook feature in SharePoint 2013. I added all the new ...
0
votes
0answers
27 views

edit ps1 file with c#

i have an ps1 file witch work fine in powerISE. But in my case ,I have a c# class witch execute ps1 file and I want to set variables values from c# class . code in PS1 powershell function ...
0
votes
0answers
195 views

Powershell script for moving document libraries in one site collection in sharepoint 2013 with “modified” and “modified by” detalis as it is

i want to move document library item to another document library within site same site collection in sharepoint 2013. i am able to move the documents but their "modified" and "modified by" detail ...
0
votes
0answers
102 views

Find all InfoPath forms in the entire SharePoint 2007 SiteCollection

We're going to migrate a SharePoint 2007 instance to SharePoint 2013. We want a report with all the InfoPath in the entire SiteCollection (+1000 sites, so with PowerShell). I've found some scripts, ...
0
votes
0answers
30 views

Powershell copy a View from database and insert to existing Sharepoint list

I got a View, and a List of Sharepoint with same more of column. In Powershell at every Time Job I wan't add only this records, which are new, and add them to a list. Did You know any of scripts which ...
0
votes
0answers
109 views

Cannot convert 'System.Object[]' to the type 'Microsoft.SharePoint.PowerShell.SPSolutionPipeBind'

Getting this error when i try to deploy a .wsp to a SharePoint 2013 portal. Someone have any idea? Get-SPSolution : Cannot convert 'System.Object[]' to the type ...
0
votes
0answers
76 views

Need to get only items which have never checkdin

I am using this code to get ownership of the list items which are never checkedin, this works great. I need to get the items which have no version history. How do I specify in my Caml Query please? ...
0
votes
0answers
64 views

Powershell Script to get UPN of O365 Users from thier emails?

Has anyone developed a Powershell script to get UPN of the O365 Users, provided we have their email address? Suggestions are welcome!
0
votes
0answers
364 views

Subscription settings service application won't install with PS

Ran this script once on one farm with success but now on a new farm it won't run. I got this same error the first time I ran it. It doesn't matter if I run it again to remove it. Here is the ...
0
votes
0answers
78 views

Error when trying to sync Actve Directory Photos

I am trying to sync the photos from the Active Directory with Sharepoint 2010. I am following the instructions at : ...
0
votes
0answers
115 views

Creating a Checksum/Hashcode for files for a comparison/validation after Migration?

I was wondering if anyone has stumbled upon or knows of a method on how to create a Checksum/Custom Hash for a file on MOSS 2007 or SP 2010 ? The problem I am having is that I am trying to validate ...
0
votes
0answers
16 views

How to export list properties of a specific list to excel

I need to export the list properties of a specific list checking whether that list is in root site or sub site and export to excel. Thanks
0
votes
0answers
625 views

Sharepoint Powershell exporting document library items ID/info to excel for 2007 and 2010

As per recommendations of Max I am opening a new thread. The previous problem i had was to compare the integrity of data between sharepoint 2007 and sharepoint 2010. I have decided to go with the ...
0
votes
0answers
232 views

Error during Import-SPWeb

I am trying to exporting from my developing machine which has a backup of the content database, and importing it back in the production farm. Running: Export-SPWeb -identity http://mysite -Path ...
0
votes
0answers
500 views

Calling Enable-SPFeature in SP2013 with CompatibilityLevel isn't working

In an SP2013 environment running in SP2010 mode has anyone successfully called the Powershell command -- Enable-SPFeature while specifying the compatibility level? Example: Enable-SPFeature -identity ...
0
votes
0answers
267 views

Problems after import-spweb

I have used export-spweb and import-spweb to move multiple sites around in SP2010. After import-spweb I notice that some libraries are really messed up. When I try to add an item to the announcements ...
0
votes
0answers
64 views

2013 - Powershell Enable columns

I'm creating sites, subsites and lists via PS. And I need to "enable" the version/size columns, in lists I created. I don't want to create them because they already exist. In graphical mode, I just ...
0
votes
0answers
112 views

Tool (SSIS or Powershell) to migrate large number of documents with metadata into SharePoint?

I'm looking to migrate 400GB of files (Word, PDF, etc.) from a network file share into SharePoint 2010. The target farm has two WFE's. My question is whether the fastest (in terms of the migration ...
0
votes
0answers
611 views

C#: cannot get listitem field value but works fine in powershell?

back again with a strange issue. Using powershell I can get a handle on a SPListItem and do Item["My Field"] which prints its value. However, in a C# custm workflow activity, when I attempt to do ...
0
votes
0answers
182 views

Workflow history no longer accessible-object reference error WrkStat page

The workflow history was >6m records, so I have redirected all workflows to rite to other custom history logs while running a job to purge 1k records every 15 minutes. When I attempt to check the ...
0
votes
0answers
75 views

Enumerate BCS Object Permissions

Hi I am looking for a method via PowerShell to enumerate the various ETC's that have been created to determine who currently has access. I realize that I can do this via the front end, however I need ...
0
votes
0answers
107 views

List View Webpart is not getting added while activating feature using powershell

I created a feature and on activation of it I am trying to add list view webpart. Using powershell command activating feature and it gets activated but List View Web part it is not getting added on to ...