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)

2
votes
1answer
2k views

Remote Powershell: New-SPUser : Access is denied. (Exception from HRESULT: 0x80070005)

I am running a remote powershell script which attempts to setup a web-application and site collection and then attempts to add a user to that site collection. I receive the following error: New-...
1
vote
1answer
4k views

Setting permissions

I am looking to set a site admins as the only people who can use a certain page via powershell, so far I have only been able to check permissions not set any
2
votes
2answers
715 views

SharePoint 2010 - List CanReceiveEmail Disable/Enable

After migration from SharePoint 2007 to 2010 the list feature to receive emails is not working on migrated sites. The functionality is enabled in the UI and when I´m checking $list.CanReceiveEmail ...
2
votes
4answers
8k views

SharePoint 2010: What is the difference between backing up a Site Collection and exporting a Site Collection?

Lectori salutem, I am reading into backup and restore operations in SharePoint 2010. I have noticed that in Central Administration > Backup and Restore > Granular Backup there is the possibility to ...
3
votes
1answer
8k views

Uploading a file using powershell and updating column values

I am trying to upload a file from a local drive to a sharepoint doc lib, this much I have been able to find, however, I also want to update a column relative to the file, foe example, I have a company ...
0
votes
3answers
663 views

How to hide quicklaunch

I am writing powershell scripts and have been trying to find a solution for this but haven't been able to. I just wanted to find out how to hide the quicklaunch using powershell. Is it a property of ...
2
votes
2answers
876 views

Powershell script to retrive all the customization done on sharepoint site

How to write a powershell script which will display the customization done on a sharepoint site - customizations like custom features, custom workflows, custom site def, infopath form etc...
2
votes
3answers
2k views

Error on recreating web application

I've written a powershell script to create a web application, add libraries and pages, etc. As I work through the script and fix bugs and issues, I delete the web application through central ...
1
vote
1answer
131 views

How to migrate existing choice columns (containing data) to Managed MetaData columns using PowerShell?

I have 5 choice columns on a SharePoint library, containing ~1000 rows. I would like to migrate these 5 columns into Managed Metadata fields and maintain the data. Any ideas?
0
votes
0answers
120 views

List View Webpart is not getting added while activating feature using powershell

I created a feature and on activation of it I am trying to add list view webpart. Using powershell command activating feature and it gets activated but List View Web part it is not getting added on to ...
1
vote
1answer
9k views

CAML Query in Powershell Issues

I have a powershell script that I am running that executes a caml query to get some list items. The problem I am having is that whenever I execute this query in CAML Builder I am only getting 3 ...
2
votes
1answer
116 views

How to add security to a page using powershell

I am new to SharePoint and am writing PowerShell scripts to create a number of libraries. Each library will be added as a list webpart on a webpart page for added security. Finally, the page is added ...
1
vote
2answers
2k 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 ...
1
vote
1answer
350 views

What is the difference? (Checked out files)

I am in the process of writing a powershell script to work with checked out files and I stumpled on this article: Find All Checked Out Files My question is what is the difference between the two ...
2
votes
1answer
2k views

Get document properties.Keys value

I'm iterating all lists in a site collection trying to get all metadata, their values and eventually count them. I'm not so far yet, but I'm stuck in getting the values from a documents (file) ...
0
votes
1answer
1k views

Custom Permission Level Using Powershell For Subsite

I am doing the following using powershell. I am creating a site collection with 4 subsites and 5 custom groups. Site Collection : Parent Child Site : One Child Site : Two Child Site : Three There ...
2
votes
1answer
472 views

How to get all lists in a site collection along with their Guid and URL

I've created a Powershell script to get all the lists in my site with their Guids. This is working but I also want the script to the return the URL. $_.Lists | ForEach-Object {Write-host "List:"$_....
5
votes
3answers
11k views

How to export a list in SharePoint 2010 and import it into 2013

Is there a good free way of exporting a list in SharePoint 2010 and importing it into 2013. Need to keep structure, data, attachments and other data but revisions, permissions etc not necessary. I'...
0
votes
1answer
1k views

Why are changes to navigation nodes by my Powershell script rolling back?

I've written some scripts that were supposed to help me correct links manually added to the navigation of a site. Basically I'm just doing a find and replace in all of the URLs. I've figured out how ...
0
votes
1answer
513 views

Backup-SPFarm not respecting ErrorActionPreference

I'm trying to setup a script in Jenkins to backup my SharePoint server. The problem I'm encountering is that it Backup-SPFarm is not correctly returning an error. So my $ErrorActionPreference is being ...
3
votes
2answers
3k views

Using PowerShell how do I change the column ordering for a SharePoint List

Been trying to search for the answer to this, what I need to do is re-order the fields of a SharePoint list and propagate that change down to 300+ sites (should have used a content type, but oh well) ...
0
votes
1answer
173 views

How can I create web application, site collection, and sites automatically with batch file and power shell

Is there any way that I can create a web application, site collection and sites using poweshell and batch file automatically? So, User has to click on executable batch file which will create the web ...
1
vote
1answer
203 views

Windows PowerShell Vs. SharePoint PowerShell for Deployments

I am using Windows Server 2008 R2 with SharePoint 2010. I see two PowerShell tools on this machine: Windows PowerShell and the SharePoint 2010 Management Shell. Does anyone know the difference? Can ...
6
votes
2answers
4k views

I dont have permissions to use SharePoint PowerShell, what to do?

I am a developer and would like to deploy a wsp to a server (win2k8r2) from my customer. I log in with some user created special for me. When I start SharePoint PowerShell I got this error: The local ...
2
votes
1answer
2k views

Powershell to set a Web Application's Trusted Identity Provider to an STS and NTLM?

I've created a custom STS and have setup trust with SharePoint via New-SPTrustedIdentityTokenIssuer. I can use Central Admin to configure a Web Application to use both NTLM and the STS, however I can'...
2
votes
2answers
2k views

Powershell Enumerate through all site collections but not include one specific site collection

I am partially not even sure how to Google this question because whatever I type never seems to bring back any relevant search results. I currently have a working script that is set to go through and ...
1
vote
3answers
338 views

error when executing update-spsolution

Im trying to update a web part that has been distibuted across our sharepoint intranet and im coming up with an error ive never seen before. Ive googled but cant find any info. Can someone help. ...
3
votes
1answer
70 views

how to access patches programatically

I know I can access the SharePoint-buildversion using (Get-SPFarm).buildversion in PowerShell. I also know that by accessing /_admin/PatchStatus.aspx from central administration I can view each ...
2
votes
1answer
645 views

Microsoft.FASTSearch.Powershell Snapin not available

On a Sharepoint 2010 Server, i tried running a script that needs to use Get-FASTSearchMetadataCategory. Add-PSSnapin "Microsoft.FASTSearch.Powershell" returns an error, that the snap-in is unknown. ...
1
vote
0answers
346 views

How do you Import a list item from a .cmp file using powershell?

I have implemented the code located at this link to export and import a list to a cmp file using powershell and the SPDeployment functions. While trying to better understand this code I came to the ...
0
votes
2answers
4k views

Sharepoint 2007 Powershell: $item.update() gives error that file has been modified

I am trying to programmatically update some metadata for a sharepoint item using powershell. Here is my code: $web = getWebByURL("http://test-site/spadmin/") $itm = $web.lists["Documents"].items[0] $...
1
vote
1answer
1k views

UpdateFarmCredentials: PowerShell command line error?

stsadm –o updatefarmcredentials –userlogin "[DOMAIN\USERNAME]" –password "[PASSWORD]" I've tried to run the above command with the " character and without, neither works. The error is 'Command line ...
2
votes
1answer
316 views

Is there a service that controls PSSnapin Microsoft.SharePoint.Powershell?

Got a service call yesterday that the backup hasn't been done for three months. Looking at the task scheduler history, there where no errors. So I run the PowerShell script myself, and got an exeption ...
2
votes
2answers
647 views

Is possible to rename a SPUser(IsDomainGroup) LoginName?

I want to rename SPPrincipals that are ADGroups. I've tried with $SPFarm = Get-SPFarm #$SPFarm.MigrateGroup("loginName", "newLoginName") $SPFarm.MigrateUserAccount("loginName", "newLoginName", $...
0
votes
2answers
209 views

How to properly dispose of sp 2007 object in powershell?

First and foremost I've done A LOT of googling and even went past the first page or 2 :) so feel free to direct me to the proper post if necessary. I am trying to loop through a bunch of webs and ...
1
vote
0answers
228 views

UPS Sync started from powershell script / web service

I have a web service that is kicked off from a workflow. The web service runs a powershell script that kicks off the User Profile Synchronization job. The powershell script works perfectly if I run ...
3
votes
3answers
3k views

How to import term set with Use this Term Set for Site Navigation property selected using PowerShell?

$session = Get-SPTaxonomySession -Site $sitename $termStore = $session.TermStores[“Managed Metadata Application”] $group = $termstore.CreateGroup(“My New Group”) $group.Description = "My Term Group" $...
4
votes
1answer
8k views

SharePoint 2013 Distributed Cache “cacheHostInfo is null” with “Remove-SPDistributedCacheServiceInstance”

I am attempting to remove a server as a cache host in my SharePoint 2013 environment. Currently the service shows as Stopped on the server that I am attempting to remove from the cache cluster. I ...
6
votes
3answers
12k views

Add group to Library permissions using powershell

I have written a script that created a document library called "Audit Logs" for every site collection in our environment. I then wanted to ensure that only Site Collection administrators and the ...
4
votes
2answers
12k views

Do I have to run Register-SPWorkflowService for each site collection?

As part of my SharePoint Server 2013 setup I sometimes need to integrate the new workflow infrastructure into the farm. I've followed the documentation starting from the SharePoint side of things: ...
1
vote
1answer
1k views

Restore Site Collection From Farm Backup

We are planning to implement a backup-restore process for our SharePoint farm and i have couple of questions and i would greatly appreciate if someone helps me with that Our Environment : I am ...
0
votes
2answers
1k views

Fixing programmatic alert URLs

Environment: SP2010 Enterprise, SQL2008R2, VS2012, full server access A while ago I created a massive amount of alerts using a c# console app I made in VS. The app ran on the server using SP ...
0
votes
1answer
1k views

Update custom property on listItem using -replace in powershell?

I have two different web application with one site collection each. One Site collection is privat and the other on is public inside the intranet. The public site links to the private site which link ...
0
votes
1answer
225 views

TargetInvocationException sitecollection “no access” quota

I am getting this error: + CategoryInfo: NotSpecified: (:) [CheckSiteCollection], TargetInvocationException + FullyQualifiedErrorId : System.Reflection.TargetInvocationException,CheckSiteCollection ...
0
votes
1answer
827 views

Powershell to list total objects, web page objects and web page objects that contain a particular string

I have a powershell script that list all webs, sites and subsites on a 2007 farm. I now know how to get last modified date of those subsites... [System.Reflection.Assembly]::LoadWithPartialName("...
1
vote
1answer
3k views

Not able to delete site collection using powershell

I am trying to delete a just created site collection but it keep giving me this error, PS C:\Users\svc_spadmin> Remove-SPSite -Identity "http://intranet.sharepoint2010 .com/portalll/DeleteMe" -...
0
votes
1answer
3k views

Trying to create a Site Collection using PS but keep getting error

I am trying to create a site collection using powershell script but keep getting error even though I already created Managed Path I am referencing in cmdlet, PS C:\Users\svc_spadmin> New-...
1
vote
3answers
2k views

How can I change Document library permissions for all site collections using powershell?

Total Powershell newbie here, but I have managed to write a couple scripts so far that have been working. We are using 2010 Enterprise edition, and I have been tasked with creating a script that will ...
1
vote
3answers
87 views

Powershell - call to document library does not have items

I am using Powershell to iterate through items in a document library and when I am running the ISE debugger there are no items in my list. I can see that the list is recognized, but I do not see any ...
1
vote
0answers
324 views

Edit UserProfileProperties in Sharepoint 2010 using PowerShell

As I mentioned above I want to modify given UserProfileProperties. http://www.c-sharpcorner.com/uploadfile/anavijai/modify-user-profile-properties-in-sharepoint-2010-using-powershell/ This is what I ...