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
13 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
13 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
92 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
41 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
37 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
52 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
52 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
27 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
41 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
36 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?
0
votes
3answers
55 views

How to create SPWebApplication (SharePoint Web Application) programmatically?

I wonder how can I create SPWebApplication (SharePoint 2010 and 2013 ) programmatically? Do I need a Remote Administration using Sharepoint 2010 Management Shell or there is c# code. best regards
0
votes
0answers
46 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
1answer
30 views

Changing URL / Moving document Libraries with Powershell

I have 100s of Document Libraries with documents in them. The path is: CustomerNumbers/Lists/Documents, I would like to move them 1 folder out; to CustomerNumbers/Documents. All metadata must be ...
4
votes
1answer
49 views

Unable to delete timer jobs

I have a few timer jobs which I cannot delete. Using Get-SPTimerJob I am able to find the jobs and the GUIDS, but when I try to delete them I receive the following error: PS C:\Windows\system32> ...
0
votes
1answer
43 views

Trying to restore backup for version 14.0.0.7105

We've been given a SP2010 backup (.bak) file to restore. At this time I don't know if it contains a site collection or a site or a farm, or how it was generated, and have no way to find out (just ...
0
votes
0answers
16 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
31 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
31 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
37 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
18 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
49 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
38 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
103 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
126 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
80 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
33 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
41 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
41 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
60 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
106 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
48 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
23 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
141 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
1answer
25 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
31 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
52 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
67 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
153 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
30 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
136 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
70 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
61 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
29 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
42 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. ...