Questions tagged [powershell]

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 local and remote Windows systems.[except from WikiPedia]

1,108 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
1answer
597 views

Enable-SPFeature Not firing event receiver

I have been trying to activate a custom feature with an event receiver by powershell, I am using the following command (I ran powershell as administrator) Enable-SPFeature -Identity b6e1ccbb-e448-...
0
votes
1answer
79 views

Change filter value on a view on multiple libraries

Is it possible to change a value on all libraries within a site. I have multiple libraries where the term name in the store has been changed. However in libraries I have documents tagged with the ...
0
votes
1answer
760 views

System.SecurityString

I have a function requiring a secure password as a parameter: function Create-List { param ( [Parameter(Mandatory=$true)] [string]$Username, [Parameter(Mandatory=$True)] [Security....
0
votes
1answer
314 views

Tenant level configuration changes using SPOL Powershell

We can import the search configuration for a site collection to replicate the search settings. Can we do the same for tenant level search settings? Or can we change individual property of search ...
0
votes
1answer
121 views

SPWebPartManager.SaveChanges throws an error

I a getting the following exception when I try to update the view of a web part. Exception calling "SaveChanges" with "1" argument(s): "Object reference not set to an instance of an object This is ...
0
votes
0answers
1k views

There are no addresses available for this application

I have the following script to create the subscription settings service application but I get this error: There are no addresses available for this application #This service application provides ...
0
votes
0answers
179 views

How to tell if a person has modified any content on a SharePoint site programmatically?

We need to find out if a disgrunted employee has modified any content on any number of many SharePoint sites we have. Aside from how we are currently reviewing lists by modified date manually (...
0
votes
1answer
303 views

How to find out per PowerShell Script if a Solution is activated and where it is activated

i have a Solution with the name My.Solutionname as the result of it i have a WSP with the name My.Solutionname.wsp It includes one Site and one Web scoped Feature. I have a SharePoint 2013 Farm ...
0
votes
1answer
746 views

Determine via code if workflow is stuck in error state

There is a workflow (Visual Studio and SP 2010 style WF) that seems to be getting stuck every so often when it errors. I see the item in the WF history for the list item saying something like "An ...
0
votes
1answer
127 views

How can I generate a report to display all users' access to a site?

I would like to generate an Excel (or CSV) file to have a list of all users and what type of access they have to a certain 2010 site? This site is secure, but I do have administrative permissions to ...
0
votes
2answers
22 views

Cannot reach PowerShell profile

I am trying to open PowerShell profile, I typed: $profile in Windows PowerShell, and it gave me the following path: C:\Users\Administrator\Documents\WindowsPowerShell\Microsoft.PowerShellISE_profile....
0
votes
0answers
112 views

Powershell Error while creating specific Folder in Library!

I am trying to create nested folders in a library based on an input. Below is my code. This works for all other values except few. I am not getting what wrong I do. It works for values less than 50 ...
0
votes
0answers
120 views

Sharepoint 2010 Remote Blob Storage failure

I am currently trying to configure remote blob storage in the SharePoint environment. The SQL sever (2008 R2) and the SharePoint servers are running on the windows Server 2008 R2 enterprise edition. ...
0
votes
1answer
882 views

$list.RootFolder.Url empty

I get an empty url when I try to retrieve the list root folder url. I use these Powershell commands on a Sharepoint 2010 server. $web = Get-SPWeb -Identity "http://mywebsite" $list = $web.lists["My ...
0
votes
0answers
59 views

back up restore a site from a site collection

so I have created a new site collection and web application. I have a site in a site collection that I want to back up and restore on. Was just wondering if it was possible and if it was how, to do a ...
0
votes
2answers
703 views

Configure SSRS for SharePoint 2013 with PowerShell

So I have to configure SSRS on my box and i tried to search feature name "Report Server Integration Feature" and could not found and my search lead to below two post. Installing Reporting Services In ...
0
votes
1answer
517 views

get the rootweb for a office 365 for a site collection

i have a site collection called https://mysitedev.sharepoint.com/sites/migration is there anyway to get the first bit https://mysitedev.sharepoint.com with csom. will i have to do it with regex?
0
votes
1answer
167 views

How do I download documents from SharePoint Online?

I want to download all documents and their versions from a SharePoint Online site. I have tried achieving this by using a script by Nik Craik that I found here. It doesn't work because it keeps ...
0
votes
1answer
461 views

Create calendar view with powershell, set Day View Sub Heading value

I am trying to create a SharePoint calendar view with powershell. I need to be able to set the "Day View Sub Heading" value but can't find the fieldref for this type. This is what I have so far (and ...
0
votes
2answers
247 views

SPDisposeCheck equivalent for SharePoint Powershell scripts

I have used SPDisposeCheck tool for SharePoint Visual Studio SharePoint solutions. I want to know is there any such tool available to check SharePoint PowerShell Script object disposal? I have ...
0
votes
1answer
171 views

select-object cmdlet takes 13 mins for fetching 1000 SharePoint users using get-spuser through C# remotely

I am using PowerShell cmdlet Get-SPUser through C# program remotely as follows Get-SPUSer -Web <siteCollection> | Select-Object -property Name,LoginName.... After I invoke this command it ...
0
votes
1answer
368 views

How to use powershell background jobs to delete a SPListItem

I want to delete items from a document library using powershell 2.0, but not all of them, only ones that pass some of my if statements (and no I can't use CAML for all my conditions). So I have to ...
0
votes
1answer
725 views

Print all .aspx pages within pages library to PDF

I have a requirement that requires that all .aspx pages in my 'Pages' library (Publishing Site) are printed every so often so that a physical record of that publishing page can be kept. Would it be ...
0
votes
1answer
549 views

Unable to Remove project service application using powershell

When I run the following command: $spapp = Get-SPServiceApplication -Name "Project Server Service" Remove-SPServiceApplication $spapp -RemoveData I get the following prompt: Are you sure you ...
0
votes
1answer
341 views

How to Configure PerformancePoint Unattended Service Account using Exisitng SecureStore Target Application ID using PowerShell

How can you configure PerformancePoint to use an existing Target Application ID using PowerShell? Neither Set-SPPerformancePointSecureDataValues or Set-SPPerformancePointServiceApplication seem to ...
0
votes
1answer
102 views

Update AD attribute from a data list

I'm new to SharePoint. We have a list of AD objects that we are looking for owners. We are using SharePoint to store the data and send email out to people to accept or deny ownership to the AD object (...
0
votes
0answers
104 views

Powershell Version 2 compared to version 4 loading dlls

I have a script that works perfectly in powershell version 4 but when I move it onto a machine with version 2 it kicks up a fuss. My code is below I have a controller which loads the scripts like so $...
0
votes
0answers
2k views

SPDataAccess Role is not visible - Sharepoint 2013

I have a Sharepoint 2013 farm and SPDataAccess Role is available for some content DBs and not for others. Is there a way to add this role to a specific DB using PowerShell?
0
votes
0answers
150 views

Powershell script to copy documents not working

I am trying to copy documents from a document library to another document library in a subsite. I have this script write-host "Starting to copy" -ForegroundColor Cyan #Add the SharePoint snapin ...
0
votes
0answers
568 views

How to delete Items from Document Library and its folders in my Sub Site

I have written a PowerShell to delete the items in a Document Library to delete/clean-up the items.I have 3 folders in my Document Library and all the items in these 3 folders must also be deleted.But ...
0
votes
2answers
480 views

$web.Groups returns empty Powershell

I have a site collection under which i have created a sub-site with unique permissions, this sub-site has following groups Community Site Owners SharePoint Group Full Control Project Site ...
0
votes
1answer
88 views

How to take the backup of SPList having MMS Column

How to take the backup of SPList having MMS Column? If I take the .stp file from the list settings I can not get this managed metadata column after taking the template file. Any other way I can get ...
0
votes
2answers
1k views

Delete Individual Items from Recycle Bin

I am using Batch Delete using Powershell. After batch delete, items are moved to recycle bin. spWeb.RecycleBin.DeleteAll(); will delete all items from recycle bin. Instead, i want to remove only ...
0
votes
1answer
573 views

Powershell script to add a field to all the document sets

I have created a field in sharepoint content type hub. Now I want to add this field to all the Document Libraries in my sharepoint online tenant. Is there a powershell script which can do this for me?...
0
votes
2answers
110 views

Is it possible to get SPGroup's Web application Name Directly using Powershell?

I'm trying to get The name of the The content_Db (WebApp) where a specific group lives. I've been trying to get these info by looking into the SqlDb. but I only could find Site ID reference. is ...
0
votes
1answer
116 views

PowerShell script to read columns of a list in all sitecollections of a farm

I have a list name like my contacts list in all the site collections of my farm,I need a report which tell me which all site collection have my contacts list with column name "help".
0
votes
0answers
74 views

Write-Output Powershell fails within RunWithElevatedPrivileges Block

This is possibly a heads-up as much as anything. I have found that if I write a Powershell with write-output statements, they do not appear when using RunWithElevatedPrivileges i.e Write-Output "...
0
votes
1answer
382 views

How to get the SPD Workflow Instance column name from the document library using PowerShell

I am having a SPD 2010 workflow created and deployed in my site collection and published globally as a reusable workflow. I have configured the workflow in my document library by associating it with ...
0
votes
1answer
35 views

stsadm addsolution causes processor to hang

Running the stsadm –o addsolution –filename tec.solzip.wsp causes the processor to hang, running on SP2010. would anybody know any reason why this could be happening?
0
votes
0answers
595 views

Upload and add a content editor web part in Search Center sub site using PowerShell

How to upload and add a Content Editor web part in Search Center sub site using PowerShell?I am having a .dwp file in my filesystem and I want to upload this into the results.aspx page of my search ...
0
votes
1answer
231 views

powershell script to exe with command line arguments

I use the following PowerShell code taking command line arguments for creating site collections and it works fine. However when I convert it into an exe and execute it? param( [string]$siteUrl,[...
0
votes
2answers
60 views

Lists/Libraries left behind after WikiPlus Uninstall

I uninstalled WikiPlus a few months ago, now while migrating to SharePoint 2013 there are libraries referencing the wiki plus templates that were removed when the solutions were retracted and deleted. ...
0
votes
1answer
58 views

How to sort a list column in power shell and update list in share point 2010

using powershell script how to sort a list column before update a list item. here i created a document library and uploaded some documents and want to update ProcessNo column based on Created-...
0
votes
0answers
119 views

SharePoint 2013 Page Status Message

Is there a way to add status to a page(suppose home page) of a SharePoint site using PowerShell? I found ways to do it using javascript (SP.UI.Status) and server side code using c# (SPPageStatusSetter)...
0
votes
1answer
22 views

Can we add a column to a sharepoint list having data using powershell

Can we add a column to a sharepoint list having data using powershell without effecting anything in the sharepoint list.
0
votes
2answers
854 views

Update filed values based on conditions

i have document library in sharepoint 2010 and i want to update a field values based on some conditions . I need that every parentid has some documents and i want to update those prosessnos which ...
0
votes
0answers
33 views

How to add specified web application to DNS by pinging it

I have created a sharepoint web application using powershell. I want to add my web application to default DNS. How i add it using powershell?
0
votes
1answer
78 views

Is there a way to get a list of when each site in a web application was last accessed?

I need to get a list of each site and determine the last time someone hit that site. We're in the process of cleaning up our Sharepoint and this data would be very useful. I see that SPWeb has a ...
0
votes
0answers
10k views

Cannot find type [Microsoft.SharePoint.SPSite]: make sure the assembly containing this type is loaded

I'm trying yo Run this script ps1 from C# code but it returns me the following error where trigger "pipeline.Invoke()"; InitialSessionState iss = InitialSessionState.CreateDefault(); ...
0
votes
1answer
540 views

SharePoint Export only selected list items not whole list

Is there a way to export only individual list or library items using powershell or any other way? I tried Export-SPWeb command with item URL but it exported whole library.