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
15 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
1answer
28 views

Unattended execution of C# scripts

I'm a beginner designing automatizing tasks. I have 2 scripts in C# .These scripts generate two XML docs which are connected and synchronized with two native lists in a SharePoint Portal through ...
1
vote
1answer
28 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
0answers
11 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
2answers
36 views

What is the best practice to duplicate a site collection?

I have a site collection, that contains sub-sites and other list that have different level permissions. If I use the "Save as template" I don't obtain a satisfied result, because template loses the ...
0
votes
0answers
16 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
1answer
42 views

Backup-Spsite always failing with HRESULT 0x80131904

While taking backup of Site Collection on SharePoint 2010 using powershell command "Backup-SPSite" I always encounter below error : "Backup-SPSite : Exception from HRESULT: 0x80131904 At line:1 ...
0
votes
0answers
37 views

UserProfileService GetUserProfile Modified Date in 2010

I have a problem when loading a UserProfile from the UserProfileService in Powershell. I am able to get a list of properties, however I can't seem to find when the profile was last modified. The one ...
1
vote
1answer
89 views

Setting permission on folders and items of Document Library

Suppose I create a group "XYZ" who has full control on site . I will break permission inheritance of rootfolders (from folder starting with A to J) inside document library "abc" and assign a "XYZ" ...
3
votes
2answers
115 views

Powershell regular expression syntax for matching exactly 6 characters that start with two letters at end of url

I have been trying to get a regular expression right for the powershell match command. I am looping through all site collections in a web application (my sites have URLs SC followed by exactly 4 ...
1
vote
1answer
66 views

script to find last modified files

I am wondering if anyone can provide me a script to report on "last modified" files in a specific site and, if possible, output it to CSV so that I can open and report it in Excel. I need to show ...
1
vote
0answers
30 views

Setting group permission to each file inside folder in Document

i Have the following PowerShell Script which iterates through each file in document library folders starting with name "a" of root folder. if((Get-PSSnapin "Microsoft.SharePoint.PowerShell") -eq ...
0
votes
1answer
40 views

issues updating/setting multi value lookup columns via powershell

I have an issue updating multi values in a lookup field via powershell I can update a single value lookup field as below but can't get to update if its multi value. As stated below when I hardcode ...
0
votes
0answers
38 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 ...
2
votes
3answers
55 views

Slow CSV writing for huge document libraries in powershell

by using below PowerShell script, i get all the items list from the document library including sub folders hierarchy in a CSV file. This script works very fine for small data but for huge data like ...
6
votes
2answers
103 views

Script to automatically import documents from a network share on a regular schedule

I am new to SharePoint development. I am trying automate the task of: Uploading documents from a network share to a SharePoint document library. The related metadata for each of the files also need ...
0
votes
1answer
32 views

Creating a calculated column with replace in Powershell

I am trying to create a caluclated column through powershell script .Below is the Script Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue $site = Get-SPweb ...
0
votes
0answers
22 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
1answer
105 views

updating/setting multiple values in lookup field through powershell

I'm trying to set multiple values to lookup column. I can get it to set one value but multiple values don't work see below [Microsoft.SharePoint.SPFieldLookupValueCollection] $itemValues = ...
1
vote
0answers
21 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 ...
2
votes
0answers
36 views

update GeoCodes latitude and longitude in sharepoint 2013 with powershell

I am trying to update the latitude/longitude via powershell but can't get it to work. I am basically hitting the bing service with an address retrieving the longitude/latitude then trying to assign ...
2
votes
0answers
28 views

Copying Modified Date in Window Explorer from Powershell

I have the PowerShell script which download Documents from SharePoint Document Library.i want to copy the modified date of documents including folders to the window explorer. Where I am going wrong ...
1
vote
1answer
48 views

SharePoint Online PowerShell cmdlets: Get Group's Ids

I need to export my site collection's groups from sharepoint online. I have create the following script to get all the info but I cannot retrieve the group's Id. I am talking about this ID ...
1
vote
2answers
63 views

how to know Exact Document Library size

How to know exact document library size. any PowerShell code required? I used http://XYZ:4444/_layouts/15/storman.aspx but it doesn't show true size. I have Just Modified Nikhil's Script which ...
1
vote
1answer
120 views

updating multivalues lookup column using PowerShell in SharePoint 2013

I have a multi values lookup column. I'm trying to update another column on another list from a lookup column. So let say I have values in a lookup column like so: 1;#Open 2;#Close 3;#Closed I want ...
2
votes
1answer
26 views

Need site inventory tool for SharePoint 2007 that doesn't require server access

We're migrating from 2007 to 2010 and I need a full inventory (site, libraries, lists) so I can remove stuff that's no longer being used. However, everything I've found so far requires server access. ...
3
votes
1answer
49 views

how to iterate through all folders inside subfolders of root level folders

below is the code to iterate through root level folders which downloads folder starts with "a" and download sub folders from it starting with any letter. I want to download all the folder levels and ...
2
votes
1answer
132 views

How to get a list of items from a particular folder

The Following code write all the items from the list to CSV file. $list.Items| foreach { $obj = New-Object PSObject -Property @{ "Title" = $_["Title"] ...
1
vote
1answer
65 views

RootFolder.SubFolders problem

I am able to search all folders with their name by using $folder.Name.StartsWith("a") this will display all folders which starts with name a in a Document Library. I want all folders to be ...
1
vote
1answer
55 views

Move Documents - Update Modified date of Published document

I'm want to move documents between site collections retaining their version history(Major and Minor versions). I used this blog http://bit.ly/NPftRE as a reference and was able to move documents with ...
2
votes
0answers
27 views

Download Root level folders starting with A to J

I have the following script to download documents from document library. Is there any way I can download folders starting with A to J from root level which should include all of their sub folders from ...
1
vote
1answer
37 views

Viewing the existing MySiteHostLocation for the SPProfileServiceApplication

I've found plenty of example of how to set the My Site host location for the User Profile service application. On the Start menu, click All Programs. Click Microsoft SharePoint 2010 Products. ...
0
votes
2answers
44 views

Powershell - Function to retrieve all items from a list

I'm just getting started with Powershell and am trying to write a reusable script that lets me get all items from an arbitrary list: function Get-SPItems { <# .SYNOPSIS Get all ...
1
vote
1answer
40 views

How to get the trigger keywords of a query rule through PowerShell

I'm attempting to export all query rules for a provided URL to a csv file via PowerShell. I have this working about 80%, the last piece I need is to find the keywords or terms that actually trigger ...
6
votes
2answers
241 views

Programatically determine who created a site collection

Is there a way, preferrably with Powershell, to determine who created a site collection? I'm not interested in who the site collection admins are, but who the actual creator of the site collection ...
1
vote
0answers
17 views

extract block issue preupgradecheck

I run an stsadm -o preupgradecheck in ps1 file function test (){ try{ $cmd=stsadm -o preupgradecheck } catch{ Write-host -ForegroundColor Red ($_.Exception.Message) } } test I wander how can I ...
0
votes
3answers
63 views

Powershell Script With Error Log

With The help of this forum I am able to Write The following Script Using powershell which downloads bulk data from SharePoint with Metadata in CSV file and also Error log as txt file. but the problem ...
1
vote
1answer
45 views

programmatically check if sharepoint installed

I'm developing an application which test if SharePoint is installed correctly, with stsadm and PowerShell access. I wonder if there is a specified stsadm or PowerShell command or a specified C# code ...
0
votes
1answer
28 views

Adding groups to sharepoint site using powershell

Hi I have added 4 groups to site collection 'A' using the powershell script below. How can I add the same groups in a site under the site collection 'A' `$web=Get-SPWeb ...
3
votes
1answer
227 views

Get User by loginname using powershell

We have the following script that was running on sharepoint 2010 where we had clasic windows authentication. When we moved to SP 2013, the authentication was changed to Claims. The following code ...
2
votes
1answer
57 views

SharePoint deployment - Deployed to: GAC (WebURL/Global) / BIN

I know that when we deploy farm solutions then they are available under Central Admin --> System Settings --> Manage farm solutions. In this list of solutions, there are 3 columns. Name, Status and ...
2
votes
1answer
67 views

How to retrive items path in CSV file using powershell

I have Following PowerShell Script which downloads documents from document library with folders to a local drive. it also downloads metadata of each document in CSV file. How do I copy the folder path ...
1
vote
0answers
37 views

Create timer job to execute powershell script?

I have created timer job and under execute method.i have added below statement to run sharepoint command. runspace.RunspaceConfiguration.AddPSSnapIn("Microsoft.SharePoint.PowerShell", out ...
1
vote
2answers
37 views

Script a SP2010 Management Shell function call

I have a small script that refreshes a users profile. Occasionally I need to run the script on a large number of users which takes some time because I need to type each one individually. PS C:\> ...
1
vote
1answer
34 views

get login and password admin of farm

I'm developping a user interface with the intent to connect to my farm. I wonder if there is any cmd powershell to get login and password admin or there is other method.
2
votes
0answers
24 views

Powershell list.workflowassociation not working right

I encountered recently a weird problem. I'm using a powershell script to : - save all workflows autostart properties (from all lists/webs/sites) - make modifications to items in the lists - restore ...
1
vote
1answer
75 views

Is there a way to create site pages and insert webpart into it via PowerShell?

We are creating a powershell script to create lists, groups and to install wsp packages. There are 5 wsp each containing 1 webpart. Is there any way via powershell to create 1 site page and embed 1 ...
0
votes
1answer
40 views

Download Documents From Document Library with their security info

I want to download all the documents from Document Library to a local drive. also I want their security info such as "Modified"", "Modified By" to be included in a CSV file. I searched around net but ...
2
votes
1answer
36 views

Powershell for Downloading Bulk Data From Document Libraries with MetaData and Log

I am Looking for a PowerShell Script which can download Bulk Data from SharePoint Document Library to a hard Disk with Metadata of each data in a CSV file. I also want log File for a documents which ...
1
vote
1answer
26 views

get all database name with stsadm

I want to know to get all database name with an stsadm commend like Get-SPDatabase in power shell I found this cmd:stsadm -o databaserepair -url http://xyz/sites/sc -databasename DBname but it need ...