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

Mail server settings not changing

Having a strange issue with SP 2010 Foundation. In central admin we have an outgoing mail server set But in powershell if you call (get-spwebapplication)[1] | ...
0
votes
1answer
46 views

Extract Infopath form data to CSV with Powershell

I have several infopath forms. Which contain data. I need to resume some of them in a CSV file. I think I can do it with powershell. Loop in the directory and get all files. But to retrieve data, ...
0
votes
0answers
26 views

Removing permission granted for excel services

When setting up Excel services with an unattended service account, one step is to grant the account access to the web application(s) database that will use the service with PowerShell. $webApp = ...
0
votes
1answer
65 views

Unable to connect web parts using powershell

I am trying to connect a custom webpart (provider) to a ReportViewerWebPart (consumer) programmatically, using a Powershell script. I get the error message below when I execute the following line: ...
1
vote
1answer
30 views

Powershell GetFollowedCount returns 0

Attempting to use PowerShell to obtain some social metrics from our SharePoint farm. One metric I wanted to get was the average number of sites users are following. The following script runs without ...
0
votes
0answers
30 views

updating metadata field

hi have this code but it doesn't seem to enter the while loop, can anyone help $array1 | foreach{ $site = Get-SPSite $_ ...
0
votes
3answers
42 views

Running a PowerShell script on a live server

I have been tasked with creating a report on our current SharePoint 2010 server (on prem). In this report I need to have the user/group permissions on every site and sub sites. Now I believe I have ...
0
votes
2answers
39 views

powershell sharepoint item column

I am searching a list and I want to print out a certain part of the item. I can do it using select web | select list | Select items | select Name just wondering how can I do it like $site = get ...
0
votes
1answer
24 views

contents of file into an array powershell [closed]

I have a file with data in how can I put this into an array in powershell The file look a bit like this : name ------------------- this pickle is yes Jimmy Pimms Would be good if I could ...
0
votes
1answer
2k views

Powershell Script to generate site collection administrators, site URL, Site Name,Members in the group named 'owners'

I have a requirement currently to generate all the Sharepoint site in a Web application with the following information: Site URL Site Name Site Collection Administors : ID or name Members in the group ...
2
votes
2answers
167 views

Fetch list item properties using Powershell

I have document library. I want to replace some document properties using powershell. There are multiple properties associated with each document. First I'll need to check for all documents if that ...
3
votes
2answers
446 views

SharePoint 2010 - Automatically create a new content database when a size is reached

I've been asked a question today regarding the automatic creation of a new content database when the current one reaches a certain size limit. Does anyone know if this is possible? Possibly with a ...
0
votes
2answers
53 views

List of pages and their type in SitePages Library using PowerShell

How to get a list of all pages in the SitePages Library and their type using PowerShell? I have created the pages, some are wiki pages and webpart pages.
0
votes
4answers
58 views

How to export powershell output to excel

I have found the custom lists in a particular site and I want to print the names to Excel. How do I do it?
0
votes
1answer
203 views

how to checkin all checked out files via powershell?

We have in our environment installed Gary LaPointe powershell cmdlets and I found this script Get-SPCheckedOutFiles which returns all checkedout files, now I need to forcely check them in, not ...
0
votes
2answers
43 views

How to find how many site colections are active in a web application using console application

I need to retreive how many sites are active in a web application using either powershell code or console application. Require the code ( also need how many users have accessed the active site ...
0
votes
1answer
48 views

SharePoint Powershell snap-in Microsoft.SharePoint.PowerShell is missing

I have a weird error. I am trying to get my SharePoint development computer setup and it has been a horrific experience. I was able to get my SharePoint instance installed properly. When I run ...
4
votes
1answer
706 views

Schedule the copy of a document to a network location

I'm looking to copy a document to a network location on a scheduled basis. Anyone have a best practice on how to do that? I thought I could write a work flow, but since I want to copy to a ...
0
votes
1answer
42 views

get the value of a managed metadata item

I have a column called mark it is a managed metadata column. I want to print out the values of this column, how do I do this?
1
vote
1answer
650 views

How to correctly dispose spweb and spsite on powershell foreach!

Title of the question is pretty simple, I have 18000 site collections and this script is showing 1GB of ram used, so I wonder how can I dispose correctly the spweb and spsite object $webapplication = ...
0
votes
1answer
962 views

Deleting all alerts on a sharepoint list using powershell?

I understand alerts will only be show to those who created them. However I am on a test site and would like to rid the list of all alerts. Is there a way to do this programatically. I can seem to ...
0
votes
2answers
220 views

Error while deleting keys from SPWebConfigModification

I got following error when I tried to remove item from the WebConfigModification. Exception calling "Remove" with "1" argument(s): "Object reference not set to a n instance of an object." I ...
0
votes
1answer
58 views

Setting Managed metadata field

I am trying to update a managed metadata field but I get an error saying `Property 'ListItemCollectionPosition' cannot be found on this object'$spQuery.<< $site1 = Get-SPSite mysite ...
0
votes
0answers
46 views

Deploying CSS/Images/MasterPage with PowerShell

I have a Visual Studio project that I want to use to deploy a few CSS files, images and a master page to a SharePoint 2010 site that I have (the site will be pretty basic, simple BI type site with ...
0
votes
1answer
79 views

How to find the guid of the User Profile Service?

I'm looking into an issue where employees that have already had their accounts decommissioned in Active Directory are displaying in our new starters and birthday web parts after they have left the ...
0
votes
1answer
38 views

Bulk creation of content page (in SitePages)

I have been asked if it is possible to do a bulk creation of a number of pages, into the "SitePages" folder on SharePoint 2013. I have seen some references on the web of how to achieve this via XML, ...
0
votes
2answers
25 views

How can I find out if a column is unused powershell

I have noticed in some of my document libraries that I have a column that is unused. Is there a bit of code in powershell that will tell me which document libraries have the column in question but it ...
0
votes
2answers
58 views

How can I check if a Document Library is empty? powershell

How can I check if a Document Library is empty or not using powershell. $web = Get-SPWeb http://skynet ForEach($list in $web.Lists) { if($list.BaseType -eq "DocumentLibrary") { Write-Host ...
1
vote
2answers
983 views

Content type ID on a file different from actual content type ID?

Moving from "a sharepoint user" to "a sharepoint power user", I now am facing the world of Powershell and more. One thing that really puzzles me is the following. Ok, so I have a document library ...
0
votes
0answers
9 views

Obtaining a reference to a MMT with different site collections but same web applications

I have a site that has many site collections in the same web application. I am wanting to obtain a reference for a Managed Meta data term, will I have to obtain a reference for each site collection or ...
0
votes
1answer
27 views

output the URL of doc library powershell

I have this code : $web = Get-SPWeb http://mysite ForEach($list in $web.Lists) { if($list.BaseType -eq "DocumentLibrary") { Write-Host $list.Fields if($list.Fields.ContainsField("marking") ...
0
votes
1answer
20 views

Can every settings in SharePoint 2013 solely managed by script?

Due to our company policy, I need to make sure our deployment can be processed solely in script (Powershell, SQL, DOS command). No UI interaction should be involved. I believe most of setting can be ...
0
votes
1answer
47 views

Powershell Script for Enabling Specific Site collection feature if not already activated

I need a PowerShell script for activating a specific site collection feature in every site collection of mysite if not already activated. How can this be done?
0
votes
1answer
37 views

Assign permisions from Power Shell

I'm trying to modify the permission of a library through Power Shell. What I want to do is: I have a library with one folder for each user, but now, all this folders inherite the permissions from ...
0
votes
2answers
65 views

Difference between SPWeb and SPSite

What is the difference between SPWeb and SPSite? I have this code using SPWeb $web = Get-SPWeb http://mysite ForEach($list in $web.Lists) { if($list.BaseType -eq "DocumentLibrary") { Write-Host ...
0
votes
1answer
119 views

Add Link TopNavigationBar to a publishing site by powershell

I have a site collection with some sites (Publishing theme). I need to add some links to the top navigation bar and the quick launch by Powershell. $web = Get-SPWeb "http://myurl" $newLink = ...
2
votes
2answers
2k views

How to change name and description website?

I need to create a script that creates a page based on a template. New-SPWeb -url http://site/project/project01 -template OFFILE#1 -name "01" Import-SPWeb http://site/project/project01 -Path ...
0
votes
1answer
30 views

output contents of a foreach into a file

$web = Get-SPWeb http://skynet ForEach($list in $web.Lists) { if($list.BaseType -eq "DocumentLibrary") { Write-Host $list.Fields if($list.Fields.ContainsField("marking") -eq $true) { ...
0
votes
1answer
867 views

Error 404 when Pairing Workflow Server with SharePoint 2013

when I try this in powershell: Register-SPWorkflowService –SPSite "http://spserver2013" –WorkflowHostUri http://spserver2013:12291" –AllowOAuthHttp I get this error: Register-SPWorkflowService ...
2
votes
1answer
123 views

Get ULS log records programatically

Is it possible to retrieve records from ULS log using C#/SharePoint API without having to manually parse log files? I would like to display logged messages on a custom web page, and I would like to ...
0
votes
0answers
31 views

Filter Document Libraries based on a column name

Get-SPWeb http://sharepoint/sites/training | Select -ExpandProperty Lists | Where { $_.GetType().Name -eq "SPDocumentLibrary" } | Select Title I have this code which outputs all of the document ...
1
vote
2answers
131 views

Copy files between sites with version history (powershell, SP2010)

I can copy a file from one site to another using $SPFolder_Destination.Files.Add("Filename.ext", $SPFile_Source.OpenBinary(), $false) This does not preserve version history. I think I could ...
0
votes
1answer
29 views

get all my lists with a certain column powershell

How can I find all lists in my site that has a column of 'marking' in powershell. I have a large site so cannot go through manually looking so wanted to know if there was a way of doing this
0
votes
1answer
51 views

Error while updating a Sharepoint record using Bypasslock method in Powershell

I am trying to update a Sharepoint 2010 record using ByPassLock method in Powershell. I am using below code [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") | Out-Null ...
1
vote
0answers
64 views

New-SPSite in SP2013 creating sites with 2010 user interface

I am creating a Site Collection with this powershell command $createdSite = New-SPSite -Url $SiteUrl -Name "Site Name" -Template "CMSPUBLISHING#0" -Language 1033 -OwnerAlias "spadmin" It used to work ...
0
votes
1answer
44 views

filling a column when empty with values powershell

I have recently added a new metadata field to my base content type called ‘mark’. This is a managed metadata column which should default to the term ‘off’. As I have added this to the base content ...
1
vote
2answers
1k views

How to insert data into Managed Metadata field of any Document Set using PowerShell?

I am creating a Document Set for a library using powershell and that document set contains some mandatory managed metadata fields. I am able to create document set but how can I insert data into those ...
1
vote
2answers
454 views

Removing field via powershell

A custom solution was installed at one point, and was removed do to it not functioning as expected. after the solution was removed several fields remained, and I'm trying to remove them with the ...
0
votes
0answers
49 views

ExportWeb from sites.asmx still pending (1)

I'm doing an ExportWeb method through powershell from sites.asmx in SharePoint 2013, and the exportweb job is still pending, even after days. $uri = "http://sharepoint/_vti_bin/sites.asmx" $service = ...
1
vote
2answers
380 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 ...