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

moving sharepoint 2013 site collection from dev to prod

I have a sharepoint 2013 site and would like to this to be moved to another server. I have some few branding and customization and will be good if that can be moved across too if not can re apply the ...
0
votes
2answers
17 views

What's a better way to handle errors for Get-SPWeb?

I've noticed my favorite traps don't work as intended when attempting to get an SPWeb object. Example: trap { write-host "an error occurred. continue."; continue } & { nonexistant_command } ...
0
votes
0answers
12 views

SharePoint PowerShell Script deployment. Only errors outside of Visual Studio?

I have a problem regarding deployment of WSP package. I develop the solution using Visual Studio and use No Activation + a PowerShell script as 'post-deployment' command. The PowerShell script is the ...
4
votes
3answers
689 views

Problem with SP2013 solution scope: WebApplication vs GAC

I have a SP2013 solution that contains a custom WCF service, custom Timer Job and a Feature Event Reciever. Because of these the solution Assembly Deploying Target is set to GlobalAssemblyCache. The ...
0
votes
1answer
364 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 ...
1
vote
2answers
42 views

PowerShell script to create hundreds of sub sites

What's the best way to create hundreds of sub sites in a site collection for testing purposes? It doesn't matter what their names are. Doing some research, I found a few scripts that either require ...
0
votes
1answer
22 views

Uploading Files to Sharepoint Document Library and Updateing Column Fields Using Powershell

I'm a new learner to Powershell and a bit new to SharePoint as well. I'm learning powershell to create a script that uploads files to a sub-site library inside SharePoint. I managed to get it working ...
0
votes
1answer
264 views

how to change Catalog settings of a list by powershell

I would like to change catalog settings of Pages list to make it act like a Catalog by using powershell. It includes adding Title as "Catalog Item URL Fields" and choosing a Term Set for "Navigation ...
0
votes
2answers
153 views

How to get running workflow instances on listitems in powershell?

I have craeted a powershell script to terminate all the corrupted workflows which are older than 4 hours. But I think it is not looking only for the running workflows. It is looking for all the ...
1
vote
0answers
15 views

Get master page object in Powershell / Update master page containts using Powershell

I have to create one Powershell script. This will iterate though all the sites/subsites in one site collection and access master page used by the site. Once i get it, i have to update that master page ...
0
votes
0answers
16 views

Creating SPNavigationNodes via PowerShell

Unfortunately I don't have my screenshots since they are at work so I'll try to explain this as best as possible. On a site collection's top level site at work, I would like to have the top navigation ...
0
votes
2answers
27 views

Programatically sort choices in a list field

I'm updating choices in a list field and want them to be stored alphabetically, however when I try to sort the choices I get the following error: $web = Get-SPWeb "mysite" $list = ...
0
votes
1answer
2k views

Get last 10 search crawl logs sharepoint powershell

I want to get last few crawl log details of all of my content sources through powershell. Basically, its the search service application -> crawl logs -> crawl history -> for any content source I ...
0
votes
2answers
17 views

After deleting all nodes, QuickLaunch throws “You cannot call a method on a null-valued expression”

If QuickLaunch has nodes, the following causes the error "You cannot call a method on a null valued expression". If not, it carries on as normal. $nodes = $subWeb.Navigation.QuickLaunch write-host ...
0
votes
1answer
21 views

Powershell to delete all items from a list based on created date

I have this powershell script to delete all items from a list: $siteURL = "URL" $site = new-object Microsoft.SharePoint.SPSite ( $siteURL ) $web = $site.OpenWeb() $oList = $web.Lists["ListName"]; ...
1
vote
3answers
2k views

How do you apply a theme with powershell in 2013?

I'm writing a powershell script that creates a number of site collections. I want to programmatically set the composed look to "Sea Monster". Through the web UI I go to Site Settings > "Change the ...
4
votes
6answers
12k views

Error - Get-SPWeb in Powershell

I am running this simple command from powershell under a user context, who has db_owner and SharePoint_shell rights to the SharePoint_config database. I get the following error: PS ...
0
votes
1answer
16 views

Using PowerShell variables in CAML Queries?

I'm trying to reconfigure scripts I made to move list items from one list to another. At the time the list were not going to change so all the variables were hard coded. Is it possible to use a ...
2
votes
1answer
330 views

Error while running the Powershell script

I want to run the following script but getting the error "Unable to find type [Microsoft.Office.Server.UserProfiles.PropertyConstants]" #Add SharePoint PowerShell SnapIn if not already added if ...
1
vote
0answers
20 views

Create Result Source Using Powershell

I want to set Type="People Search Results" and in Credential Information want to set default authentication using power shell. I have used below code to create result source but I am not able to set ...
1
vote
1answer
304 views

SharePoint Error when I run PSConfig

I am getting the following error when I attempt to manually run PSConfig following an update on this server from the June/July 2012 CU to the April 2013 CU (this is from the logfile): 06/10/2013 ...
0
votes
1answer
16 views

Clone site collection vs web templates provisioning (team site)

What's the drawback of cloning existing team sites? Fist I created team sites based on web templates, but after a while with tons of changes from the client I'm thinking of just cloning a "team ...
0
votes
1answer
392 views

How to set Navigation in Office 365 site using powershell?

I am creating some Global / Current navigations nodes on a SharePoint site (SharePoint 2010 in house site) by fetching them through a csv file. Below is the script: #Script to create Global/Current ...
0
votes
3answers
26 views

SharePoint warmup script implementation

I've implemented the SPWarmup script from Codeplex on development and production environment. This script (that can be found here https://spbestwarmup.codeplex.com/) is working well, when I run it ...
0
votes
1answer
30 views

Replicate site collection with a different URL and retain its content

I have a site collection that is published externally and is constantly getting updated with newer versions of files. The business has a requirement where we need some external users to only see ...
3
votes
6answers
10k views

How to delete all items in aList using PowerShell

I am using following PowerShell script to delete all items of the List. It's working fine but take too long for huge lists. Is there any efficient way of clearing list items, something like truncate ...
1
vote
1answer
77 views

SnapIn won't load, the Cmdlets now target the wrong Powershell Version, how'd that happen?

I've inherited a Server-2008 SharePoint-2010 Dev environment, the SharePoint Snapin fails to load; warning ... Add-PSSnapin : Incorrect Windows PowerShell version 3.0. Windows PowerShell version 2.0 ...
0
votes
0answers
15 views

Powershell Automation of Workflow Visio Exports

In Sharepoint 2013 I'm working on a solution for automated backups at the list level (as opposed to full site backups). Thus far it's a two part solution involving powershell commands that would run ...
0
votes
2answers
15 views

Powershell - creating document libraries and wish to add an existing group

I have a powershell script I developed in order to create document libraries across multiple sites under a single site collection. I wish to now add the appropriate Site Administrators with ...
0
votes
1answer
23 views

powershell - get permissions for users

I have a csv file with users (domain\user) that I need to find their access. I found a good link here (Powershell script to find permissions for a specific user) on SP Forum. I am calling the function ...
0
votes
1answer
2k views

Emptying SharePoint Recycle Bin

Our SharePoint 2007 installation has a particularily immense First-Stage Recycle Bin. I wrote a PowerShell script a while back that deletes old items. Just for fun, that's posted below. UPDATE2: ...
0
votes
0answers
6 views

Powershell how to set a List field by Display User, or set by

I don't have a User Login Name. I have got a Display User Name. With this form - "User Surname User Name", If i have do it by workflow its works, but after 180 elements workflow crashed me. How could ...
0
votes
0answers
8 views

Powershell User set in Sharepoint

When I migrate to a list I must update the sharepoint User Group Field. How Could I update it ? Can I set by "Surname Name" User ?
0
votes
1answer
18 views

Import list from powershell to money field

If I tried to import from powershell to sharepoint field it adds me two 00 to the values. How to import a fields in this sequention 000,00 I have got a MS SQL view with this form 000,00 but when I ...
2
votes
1answer
417 views

Disable site collection health check rule

Is there anyway of disabling/bypassing a site collection health check rule. For example, I want to bypass Missing Site Templates rule when I upgrade a site collection in SP 2010 mode to SP 2013. For ...
0
votes
2answers
23 views

Copy-SPSite not recognised?

I am trying to copy a site with power shell using SP2010 Enterprise and the SharePoint management shell but the cmdlet does not recognize the Copy-SPSite term!? It is not permissions as I am admin ...
0
votes
1answer
21 views

Reactivating feature with powershell - disable enable feature if it's active

$snapin = Get-PSSnapin | Where-Object { $_.Name -eq "Microsoft.SharePoint.Powershell" } #This script enables a feature on every site collection on a given web app if ($snapin -eq $null) { ...
0
votes
0answers
15 views

The job 'GUID' is already running and cannot be canceled- PowerShell

A deployment or retraction is already under way for the solution "xxx.wsp", and only one deployment or retraction at a time is supported it occurs if anomalies deployment is running for the same ...
2
votes
0answers
25 views

Can I use Set-SPOUser to set an O365 security group as a secondary site collection administrator?

Is there a way to use Set-SPOUser to add a security group I created in Office 365 as a secondary site collection administrator? I have the security group's Login Name which begins with "s-1-5-21-..." ...
1
vote
3answers
1k views

Not able to get Cells.Items method of the work sheet object in power shell [closed]

I need to read cells values from a worksheet and i am referencing the following piece of code, however i don't get .Items() method. Code Referred: $objWorksheet.Cells.Item(2,1).Text Also is there ...
0
votes
1answer
33 views

How to get C# to recognize argument passed through PowerShell

I'm using PowerShell to call C# code to turn list alerts on or off on a specific list. When I try to use [AlertsOnOff1.onOff]::Main("off") to call the Main method and pass the arugment of "off"the ...
0
votes
0answers
23 views

Test-Connection and Access denied using Powershell

I have Windows Server 2012 and Sharepoint 2013. I have this issue deploy Sharepoint using Powershell: I execute powershell.exe with credentials UserInstallerMoss. UserinstallerMoss is Farm ...
0
votes
2answers
39 views

Access denied: 0x80070005 OWSSVR.DLL using Powershell

I have this issue deploy Sharepoint using Powershell: I have Windows Service C# with credentials for user UserInstallerMoss. Windows Service execute an EXE Console Aplicaction C# with credentials ...
0
votes
1answer
63 views

How to register a new SharePoint App using PowerShell (instead of appregnew.aspx)?

I'm uploading my SharePoin Provider Hosted App and installing everything via PowerShell, but the only thing that I cannot find is if it's possible to register a new app using a PowerShell command ...
0
votes
1answer
50 views

I need help getting powershell to run c# code

I found a technet blog saying you could run c# code in powershell, so I ended up giving it a try. When I try to run the following powershell script I get 2 errors and I'm not sure how to resolve them. ...
0
votes
1answer
38 views

Remove all list item permissions with PowerShell

I'm trying to remove all permissions from a list item (SharePoint 2013). I worked out the following script that should do that: $url = "https://Site" $listName = "Tasks"; $SPWeb = Get-SPWeb $url; ...
0
votes
1answer
506 views

Creating SiteCollections using SharePoint Management Shell 2013

I am following the below instruction to create a NHSC, but at point D when I am creating a Team Site, I get the message that the new URL is not found! Do I need to create that before? Am I missing ...
0
votes
0answers
30 views

Using SPQuery returns today's recurring calendar item and tomorrows. Why?

We have an on call calendar in SharePoint. I'm trying to send an automated, weekly email of the calendar. The calendar has a mix of weekly recurring entries and non recurring entries. I'm trying to ...
0
votes
2answers
41 views

how to copy a sitecollection with powershell

Does any one know how to copy a site collection using PowerShell. I used this : Copy-SPSite http://contoso/sites/OldTeam -DestinationDatabase WSS_Content -TargetUrl http://contoso/sites/NewTeam but ...
0
votes
2answers
31 views

Deployiment Issues - multiple webparts

If my SharePoint Project has multiple web parts, then I should see multiple .webpart files when I deploy the solution and check the webpart gallery, right? If not then what do I do/why is it ...