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
2answers
142 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
10 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
12 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
26 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
15 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
17 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
14 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
328 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
19 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
299 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
13 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
381 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
24 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
14 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
22 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
16 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
413 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
20 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
14 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
23 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
22 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
37 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
54 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
49 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
35 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
29 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
40 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 ...
1
vote
1answer
30 views

Is there a way to temporarily disable existing alert emails from executing?

I have a powershell script the runs automatically once a week to move old list items to an archive list. On the current list my end users are receiving alerts when the item is moved (create/deleted) ...
0
votes
0answers
17 views

Access denied for Users after database migration from SP2010 to SP2013

After content DB migration from SP2010 to SP2013, a number of users who has permission to access cannot access to the SharePoint 2013 site. The error message given is "Access Denied". I have confirmed ...
0
votes
2answers
33 views

Deployment Problems

I am trying to deploy SharePoint web parts that are based on a SharePoint project developed beforehand. I deployed them using a .bat and .ps1 files, running the former from command prompt. I've been ...
0
votes
1answer
35 views

Managing synchronization options in User Profile Service Application using Powershell

I am trying to manage the synchronization options in SharePoint Farm using Powershell. I would like to change the "Use SharePoint Profile Synchronization" to "Enable External Identity Manager" by ...
0
votes
1answer
127 views

Powershell script for user profile properties in SharePoint Online 2013?

Does anyone know of a Powershell script that can be used to pull user profile information from SharePoint Online 2013? The SharePoint server scripts are useless. Particularly, we are looking for a ...
3
votes
1answer
330 views

Import-Spweb is changing the user id if the user does not exist in the organisation anymore

We had to restore a list (which has versionsing enabled) in our PROD enviornment SP 2010 August CU 2012. We used the following command metioned below: Import-SPWeb http://example.com/projects/myList ...
0
votes
0answers
15 views

Terminate corrupted workflows in powershell

What is wrong with this powershell script to terminate corrupted workflows? I've got this error: An error occurred while enumerating through a collection: Collection was modified; enumeration ...
0
votes
0answers
33 views

Powershell where-object doesn't work

I have this Powershell code that works in 2013, but it doesn't work in 2010, although am using a functionality that supposed to work in 2010, my problem is with the where-object, it's not really ...