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

1
vote
1answer
47 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?
2
votes
1answer
119 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
47 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
69 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
43 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
180 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
151 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
212 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
94 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
36 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
94 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> ...
1
vote
1answer
104 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
44 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
34 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
51 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
21 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
67 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
33 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
202 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
1answer
85 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
550 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
286 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
390 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
65 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
100 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
152 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
129 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
154 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
135 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
31 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
953 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
44 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
45 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
78 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
146 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
124 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
505 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
82 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
130 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
160 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
168 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
2answers
276 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
61 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
83 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
310 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
56 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
266 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
19 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
546 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
87 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 ...