Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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]

Filter by
Sorted by
Tagged with
5 votes
2 answers
11k views

Cannot find an overload for "Load" and the argument count: "1"

I am working on some utility functions to ease the administration of our O365 tenant by importing some modules as part of my profile. The thing I'm working on currently is being able to provision One ...
user avatar
5 votes
1 answer
766 views

Multilingual user interface: Is it possible to Export Translations using PowerShell?

I have a SharePoint Server 2010 Enterprise with several language packs installed. The Alternate Languages have been enabled in the Site Settings and several items have been translated. Is it possible ...
user avatar
  • 1,659
5 votes
2 answers
7k views

DTD Error with Connect-SPOService

Just recently I cannot connect to my tenant admin with PowerShell. When I call Connect-SPOService -Url https://<tenant>-admin.sharepoint.com I get the following error: Connect-SPOService : ...
user avatar
  • 71
5 votes
2 answers
9k views

Try to get the snapin "Microsoft.SharePoint.PowerShell" in Powershell but i get an error

I try to get the snapin "Microsoft.SharePoint.PowerShell" in Powershell but i get an error. Add-PSSnaping : no snap-ins have been registered for Windows PowerShell version 5 How can I solve this?
user avatar
5 votes
1 answer
884 views

CSOM PowerShell - $folder -PropertyName "HasUniqueRoleAssignments"

I'm trying to use the Load-CSOMProperties.ps1 made by Gary Lapointe to report me if a folder "HasUniqueRoleAssignments". This is working fine for webs and lists but it doesn't seem to work for folders....
user avatar
5 votes
2 answers
6k views

Removing Orphaned WebParts via PowerShell - CheckIn/CheckOut Requirement Loop

A client migrated from 2007 to 2010 doing a database detach/reattach without checking the database for orphaned objects first. I whipped up a PowerShell script to programmatically remove orphaned ...
user avatar
5 votes
1 answer
1k views

Set default value for SharePoint Calendar description field

How can you set the default value for the 'Description' field for a SharePoint 2010 calendar list? There is nothing in the web interface for doing this, so I have tried it with PowerShell. $w = Get-...
user avatar
  • 699
5 votes
1 answer
147 views

SharePoint Online Management Shell

Is there any way to check site collection document libraries Metadata i.e. (last modified date, owner name) using SharePoint Online Shell?
user avatar
  • 51
4 votes
2 answers
10k views

use powershell to check whether or not a sharepoint list is a document library

I want to make some changes to all of the document libraries in a site collection, but not make changes to any other lists. In PowerShell, how can I check whether a list is a document library, or a ...
user avatar
  • 682
4 votes
2 answers
17k views

Powershell Get-SPServiceInstance - The term 'Get-SPServiceInstance' is not recognized as the name of a cmdlet

On a fresh SP2010 install. I run powershell as the admin I have my policy set to unrestricted. I've tried embedding this in a .ps1 file or running in the shell.. but get: Powershell Get-...
user avatar
  • 1,299
4 votes
3 answers
6k views

How to get list of available custom template name using powershell script

I want to create subsite using custom template. how can get list of activated custom template name using powershell script?
user avatar
4 votes
2 answers
12k views

Updating a view using powershell

I have created a list and added some new fields in my sharepoint site. I now want to add my new fields onto the All Items view using Powershell is this possible? I tried : $viewFields = New-Object ...
user avatar
  • 451
4 votes
3 answers
28k views

How do I programatically change the content type of an existing file?

Is there some way to change the content type of a file using PowerShell? Ideally I'd like to write a function that one would point at a specific document library and it would pull down an array of ...
user avatar
  • 1,556
4 votes
3 answers
777 views

How to create Picture Library on office365 sharepoint using powershell?

Currently I have created SharePoint Hosted App (Picture Slider) in Office 365.I have created picture Library Manually, and now trying to create Picture Library using powershell in office 365.
user avatar
4 votes
5 answers
12k views

I cant delete or restore a site collection or repair database

When I try to do a restore of a site collection, restore-spsite -Identity https://xx/10014628/ -Path D:\SiteCollectionBackups\10014628.bak -Force -Confirm I get: restore-spsite : <nativehr>...
user avatar
4 votes
4 answers
11k 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 ...
user avatar
  • 1,291
4 votes
1 answer
11k views

Using PowerShell and the New-SPWeb command, how can I add a site to a site collection with the -UseParentTopNav argument?

Whats the correct format of the New-SPWeb command when using the UseParentTopNav argument? I'm trying to add a new site, I've tried passing in the following New-SPWeb -url "http://server" -Template "...
user avatar
  • 949
4 votes
2 answers
11k views

What's wrong with Uninstall-SPSolution and AllWebApplications parameter?

When I try to uninstall WSP with following line, everything is ok: Uninstall-SPSolution project.wsp # no error - OK When I try to add switch parameter -AllWebApplications, I get error (something ...
user avatar
  • 434
4 votes
3 answers
26k views

Powershell - How to add multiple site collection admins as secondary?

How to add multiple site collection admins for a given site for secondary? I tried below but it replaces existing secondary. Any idea? Set-SPSite –Identity $siteCollectionUrl –SecondaryOwnerAlias "...
user avatar
4 votes
2 answers
36k 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 ...
user avatar
  • 321
4 votes
2 answers
12k views

Set default value in a document library column via Powershell?

I'm looking for a powershell script that allows me to set the default value for a column in SharePoint. Thanks
user avatar
  • 83
4 votes
3 answers
1k views

Ping from SharePoint list

I'm new to SharePoint and I'm wondering if I can achieve the following: I have an Excel sheet with the IP addresses of various devices in our building. I need to monitor the status of each device and ...
user avatar
4 votes
3 answers
9k views

Powershell update existing user in the people or group field

I want to update the user of a people or group field. The property allow multiple users to set for this field. How can I keep the users who are already present in this field and update the existing ...
user avatar
4 votes
4 answers
4k views

SharePoint Online CSOM default credentials

I'm using the following SharePoint Online CSOM powershell that connects to my Office 365 tenant (E3). I'm using the Read-host to enter the password when I run the script and the script works fine... ...
user avatar
4 votes
1 answer
42k views

How to correctly include file in Powershell?

How do I correctly perform includes in Powershell? I have this script: & .\config.ps1 & .\scripts\functions.ps1 Write-Host -f yellow "Saving root site collection" backupSiteCollection $...
user avatar
  • 617
4 votes
1 answer
4k views

Rename List with powershell SP2013

I know this is a really simple task and I have done it a thousand times and it worked every time, but I cannot rename a list via powershell anymore. $List = $web.Lists["mylist"] $List.Title = "...
user avatar
4 votes
1 answer
27k views

Why can't powershell convert my password from system.string to system.security.securestring?

I'm trying to create a UPS sync connection using powershell. Becuase of the vagaries of our AD setup I can't use the Central Admin 'Create New Connection' function. I am using the script below which ...
user avatar
  • 763
4 votes
2 answers
5k views

Powershell Script to Set Quota

We are planning to apply quotas on our site collections of about 60 which are already created in our web application . i thought of achieving that using power shell but we are facing a small problem ...
user avatar
  • 517
4 votes
3 answers
8k views

DisableEventFiring using PowerShell

How can I call DisableEventFiring using PowerShell? C# code like this : Type typeInfo = typeof(SPEventReceiverBase); MethodInfo disable = typeInfo.GetMethod("DisableEventFiring", BindingFlags....
user avatar
  • 73
4 votes
4 answers
6k views

Trying to delete a column from a sharepoint document library view - SP2010

I'm trying to delete a field (site column bound to managed metadata) in a view with the following powershell script: $spWeb = Get-SPWeb -identity http://servernamehere/docs/test/sitename $spView = $...
user avatar
  • 83
4 votes
2 answers
4k views

Download specific files from a folder in Sharepoint by using Powershell

I am currently trying to automatize downloading certain files in a Sharepoint-online folder by scripting in PowerShell. At this point the script (look below) only downloads one specific file, while I ...
user avatar
4 votes
1 answer
847 views

upper/lower case naming convention for Document name in SPO Doc Lib

I have a situation where users have uploaded several files but without any naming convention. So some of the file names are in upper case while some are in lower case . So Now I have to build a script ...
user avatar
  • 1,225
4 votes
2 answers
816 views

How to delete Drop Off library in SharePoint Online?

Does anyone know how can I remove a drop off library in Sharepoint Online in Powershell? Many thanks
user avatar
  • 151
4 votes
1 answer
7k views

Register-SPWorkflowService : Failed to query the OAuth S2S metadata endpoint

I have the following:- windows server 2012 R2. SharePoint server 2016 i install workflow manager 1.0 on the same sharepoint server. now i want to register the workflow with the sharepoint server, so ...
user avatar
  • 2,234
4 votes
1 answer
4k views

Powershell: Populate a Multi-Value People Picker via CSOM

I'm currently working on a script to update a SharePoint list in a 2013 Dedicated environment. One of the fields on the list is a Multi-Valued 'People Picker' field and I can't figure out how to ...
user avatar
  • 305
4 votes
1 answer
17k views

How to use CSOM/Powershell to update list item(s) in O365 from CSV

Not a programmer, but need to get a job done. Using Powershell and CSOM I've found examples and been able to import CSV into a list as new items. That is working. Here is a code snippet I'm using ...
user avatar
4 votes
1 answer
4k views

SharePoint feature deployment and scope via PowerShell

We use SP2013 and PowerShell to deploy wsps. When installing the wsp via PowerShell: CASE 1: Add-SPSolution -LiteralPath $path install-spsolution -Identity $solution -GACDeployment Above ...
user avatar
  • 4,492
4 votes
1 answer
8k views

Undo checkout with PowerShell

I'm trying to undo a checkout with PowerShell but the function name doesn't seem to be recognized. Here is the code that I used. $dList = [Microsoft.Sharepoint.SPDocumentLibrary]$list $...
user avatar
4 votes
3 answers
6k views

Sharepoint Master Page Powershell

We have over 80 Site Collections in our Web Application is there a way through power shell that i can set the same master page for all the site collections.
user avatar
  • 517
4 votes
3 answers
3k views

Deploying a site template and instantiate it in the same PowerShell script?

I want to create a PowerShell script that : add a farm solution that only contains a site template deploy the solution globally wait for the deploy job to finish create a site collection based on the ...
user avatar
  • 7,426
4 votes
2 answers
2k views

Retrieve Office 365 Planner Tasks using CSOM C# or powershell

How to retrieve Office365 Planner Plans, Tasks and Buckets in console application using CSOM C# or using Powershell ?
user avatar
  • 3,197
4 votes
2 answers
5k views

Hide column from Edit form in SharePoint Online

I would like to hide a site column from appearing in the EditForm on SharePoint online. I have been able to achieve this on SharePoint server 2010 by running the following PowerShell. This will not ...
user avatar
  • 275
4 votes
1 answer
4k views

Remove all Recycle Bin Items from database

In the recycle bin there are 176100 items. I have tried to remove them using PowerShell but it is unable to remove all. After sometime it stops and gives an error. Tried following PowerShell. $WebApp=...
user avatar
4 votes
2 answers
3k views

Lists["User Information List"] is null

I'm trying to export groups from my site and I used this script. $siteUrl="http://mysite" $groupName="BWS Team" $Output = @("GroupName|Name|Login|Email|Department|Title") $web = Get-SPWeb $siteUrl $...
user avatar
  • 215
4 votes
3 answers
2k views

Set default value of Article Start Date to [Today] with CSOM

I'm struggeling with setting the default value of ArticleStartDate date-time column using PowerShell and CSOM. Bakground: I have a content type, used by a page layout, inheriting from Article Page ...
user avatar
4 votes
1 answer
102 views

delete Site collections sharepoint 2010

I need to delete all site collections that contains personal in it. I get all the site collections by the cmdlet $sites= get-spsite -limit all| Where {$_.url -like "*personal*"} foreach($site in $...
user avatar
4 votes
1 answer
7k views

Determining size in MBs and user count for 'one particular' site collection

I need to determe the size of a site collection in MB. I tried: Get-SPSiteAdministration | select Url, DiskUsed, UsersCount But it returns DiskUsed and UserCount for all the site collections in the ...
user avatar
  • 351
4 votes
2 answers
64k views

How to create a Shared Folder using Powershell and set permissions [closed]

I want to create a shared folder using PowerShell and then want to set permission on it as follows: Farm account: Full access Application pool account: Full access Everyone or Authenticated users:...
user avatar
  • 2,525
4 votes
1 answer
13k views

How to get SharePoint Online list url using Powershell?

I can retrieve a title $list.Title, but a title is not the same as url. In C# I can get list.DefaultViewUrl, which doesn't seem to be an option in Powershell. I found this solution with $List....
user avatar
  • 2,415
4 votes
2 answers
22k views

PowerShell - Iterate through all webs, then iterate through all lists , then add a column where a list is a certain name

I'm trying to put together a script that should iterate through all webs in a site collection, then iterate through all lists in those webs, then add a column where a list has a certain name. This is ...
user avatar
  • 798

1
3 4
5
6 7
81