Tag Info

New answers tagged

1

Couple of steps required in order to configure the MySites. Make Sure UPS & MMS are up and running. Create a Web application and create root site collection with MYSiteHost template in the Mysite Host location at UPA, give the root level site collection address then set the permissions. Enable Self-Service Creation read more over here: ...


0

In Central Administration, on page /_admin/WebApplicationList.aspx select your WebApp and click on User Policy in ribbon. You can see in a dialogbox your account ID_WebApp_MySite with full control. Select it and click Delete selected users.


0

Change $clientlist.BreakRoleInheritance($True) to $clientlist.BreakRoleInheritance($false) as $true in the argument of BreakRoleInheritance specifies that permissions from the parent be copied over to child. If you don't want any permissions from parent to be passed over user $false


0

$SiteCollection = "http://site/sitecollection" $ADGroupName = "domain\adgroup" $SPGroupName = "My Test Group A1" $SPGroupDescription = "Test Group A1’s Description" $SPGroupPermission = "Read" #Start of script $site = Get-SPWeb $SiteCollection #Check if the group already exists if ($site.SiteGroups[$SPGroupName] -eq $null) { #Ensure Group/User is part of ...


2

Your backup is running on a farm with November 2014 Cumulative update ( 15.0.4667.1000 ) installed while the farm you are trying to restore the backup to is running only on Service Pack 1 ( ​​15.0.4569.1000 ). Install the November 2014 CU to the environment you are trying to restore your backup to and then try again. You should only need to apply the ...


1

EnsureUser is a method, and you are using it as an indexer. Change $userName=$web.EnsureUser[$user] to $userName=$web.EnsureUser($user)


0

Ok I found the solution. My issue was that the Get-Content cmdlet was creating an array of strings for each line. Advice I found on the internet suggested that piping the output of Get-Content to Out-String would consolidate this into a single string. Out-String does not actually perform this behaviour and as such the datatype of String[] was not being ...


0

here is the Create folder command: New-Item “C:\Shared" –type directory If you are creating multiple levels at once (like “C:\NewRootFolder\NewChildFolder\NewShared” you can add the –force switch to make it create all necessary parent folders in the heirarchy) Now that you have a folder that you want to share, you can turn it into a shared folder using ...


0

Don't think it's about SharePoint, but to share folder from cmd You don't need PS, You can use standard net share command: @Echo off ECHO Creating your sharing folder and network discovery NET SHARE Upload=D:\Upload /GRANT:everyone,FULL ECHO Your Upload folder is now available for sharing folder ECHO. NET SHARE Downloads=D:\Downloads /GRANT:everyone,READ ...


0

Here is how you create a new site using a custom .wsp template with PowerShell. $mainurl = "http://<WEBAPPURL>/sites/<NAME_OF_SITECOLLECTION>" Write-Host -ForegroundColor White " – Creating Site Collection $mainurl…" -NoNewline New-SPSite $mainurl -OwnerAlias locadministrator -Name "This will have a custom template" ...


1

I dont think you can not create a App Catalog using powershell In Office 365. The only way is you have to login on with admin account and go to SharePoint admin center. and create App catlog here. ...


1

Either will work - the feature ID or the feature name. From Technet documentation here: https://technet.microsoft.com/en-us/library/ff607803.aspx Specifies the name of the Feature or GUID to uninstall. The type must be the name of the Feature folder located in the 14\Template\Features folder or GUID, in the form 21d186e1-7036-4092-a825-0eb6709e9281.


0

The Enable-SPFeature cmdlet enables an installed feature at the given scope. If the feature is a farm feature, no URL is needed. Otherwise, provide the URL where the feature is to be enabled and it will be enabled at the proper scope based on the Feature definition. The Identity is a requied field. It is the name of the feature. For more info check


1

I think you should try the Set-SPMetadataServiceApplication, What i am reading that you can set the Service administrator with the above command. See this Example: Set-SPMetadataServiceApplication -Identity "MetadataServiceApp1" -AdministratorAccount "contoso\username1" -FullAccessAccount "contoso\AppPoolAccount1,contoso\AppPoolAccount2" -RestrictedAccount ...


0

The only thing I see is maybe you need to run PowerShell elevated. My file is DeviceDictionary.csv. Here is my script: #Setup Custom Entity Extraction Library #http://technet.microsoft.com/en-us/library/jj219480(v=office.15).aspx function Get-ScriptDirectory { $Invocation = (Get-Variable MyInvocation -Scope 1).Value Split-Path ...


1

1)Replace the Name of the service with Managed Metadata service $serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq “Name of the service” } 2)Get the Proxy group e.g. Default . If you have a different one replace the name proxygroup default with your custom proxy group. In the step 2 Get-SPServiceApplicationProxyGroup gives you the ...


2

The below PowerShell script let you know whether 'State Service' application is running or not. Provide your State Service Application Name against $ServiceName" variable. $ServiceName = "State Service Application" $serviceApp = Get-SPStateServiceApplication -Identity $ServiceName Write-Host -ForegroundColor DarkGray "Checking if " $ServiceName " ...


0

Your collection of files will be now stored in the below variable $videoLibFiles = Get-ChildItem $videoFolderPath -Include *.wmv,*.mp3,*.mp4,*.flv,*.avi -Recurse Now loop through the variable $videoLibFiles to get the full file path and provide it as an input to uploading files to library foreach($filepath in $videoLibFiles) { $filepath.FullName ...


0

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.splistitem.aspx as per this above link, you can set any property on SPListItem and data types are mentioned which are supported. Try it yourself and post it here if you still get any issue, below is an example you can try (suppose your SPListItem object is oItem) both ways oItem["ProductAmount"] ...


0

My VM are down so that i cant right the script but i can give you an idea. Whenever you create a new Service Application in Central Administration, this new service application will automatically be added to this “ Default Proxy Group”. When you create a new service application via PowerShell, the new service application will NOT automatically be ...


1

You should use the parameter DefaultProxyGroup when using New-SPMetadataServiceApplicationProxy


1

First, Install Microsoft Online Services Sign-In Assistant. Then, Run this Powershell : Connect-MsolService Get-MsolAccountSku $val = Get-MsolAccountSku |ForEach-Object {;$_.AccountSkuId;} $mytnt = $val.Split(":")[0] New-MsolUser -DisplayName "John Smith" -FirstName "John" -LastName "Smith" -UserPrincipalName john@mytnt.onmicrosoft.com -Department ...


2

This is done by the PowerShell Script New-MsolUser either by adding the user without a license: New-MsolUser -UserPrincipalName JWarner@contoso.com -DisplayName "Jamie Warner" -FirstName "Jamie" -LastName "Warner" Or with a license New-MsolUser -UserPrincipalName DomTru@contoso.com -DisplayName "Dominique Trujillo" -FirstName "Dominique" ...


0

Try this script Add-PSSnapin Microsoft.SharePoint.PowerShell -ea 0 $web = Get-SPWeb -Identity "weburl" $rfolder=$web.Lists["Shared Documents"].RootFolder GetFiles($rfolder) Function GetFiles($folder) { Write-Host "+"$folder.Name foreach($file in $folder.Files) { Write-Host "`t" $file.Name } # Use recursion to loop through all ...


0

$web.Lists["Documents"].RootFolder.SubFolders["Your Folder Name"].Files


0

I would make sure that the App Management Service and the Subscription Settings Service are both running. Use Get-SPServiceInstance to get a list of services.


0

Finally found answer by trying.As it turns out even if you have version setting disabled for sharepoint library in source site and destination site you can import with overwrite parameter. It will update the existing item. This will work only if the "Name" field of document(in case of library) is not changed.


0

from msdn: $choicevalues = New-Object Microsoft.SharePoint.SPFieldMultiChoiceValue; $choicevalues.Add("Green"); $choicevalues.Add("Blue"); $i["multiplechoicefield"] = $l.Fields["multiplechoicefield"].ParseAndSetValue($i,$choicevalues); $i["multiplechoicefield"].ToString(); $i["multiplechoicefield"] = ...


4

You can use below Powershell. $spweb = get-spweb -identity "http://yourdomain/yourweb" # Use the "pretty name" of your library below $list = $spweb.lists["Your Library"] $listItems = $list.Items # For each item foreach ($listItem in $listItems) { $DocumentTitle = $listItem.Name write-host "FileTitle -> $DocumentTitle" } #Clean up ...


2

This is the script that will print the names of all items in a library. $web = Get-SPWeb <web address> $list = $web.Lists["<document library/list name>"] $items = $list.Items foreach($i in $items){ Write-Host $i.Name }


5

Get-SPWeb http://sharepoint/sites/xyz| Select -ExpandProperty Lists | Where { $_.Title -eq "Shared Documents" } | Select -ExpandProperty Fields | Select Title, InternalName For more informaiton: http://sharepointpromag.com/sharepoint/windows-powershell-scripts-sharepoint-info-files-pagesweb-parts Following code will also help you Add-PSSnapin ...


0

Try this PS snippet: $foldersColl = $oList.GetItems($folderquery) foreach($folder in $foldersColl) { $folder["Created"] = $dateToSet $folder.Update() } Updated answer (after reading comments) Add-PSSnapin Microsoft.SharePoint.PowerShell $web = get-SPWeb "http://portal/"; $list =$web.lists["Documents"]; $folderName = "BNFSDocs"; $item = ...


0

$assembly = [System.Reflection.Assembly]::LoadFile("c:\temp\TestWebPartLibrary.dll") $name = $assembly.GetName() "<SafeControl Assembly=""{0}"" Namespace=""{1}"" TypeName=""*"" />" -f $assembly.FullName,$assembly.GetName().Name http://www.justaddcode.com/blog/2007/07/08/creating-sharepoints-safecontrol-entries-in-powershell/


1

Try to use the code provided here - Modify SafeControls in web.config using Powershell script leveraging SPWebConfigModification method #SafeControl $assembly = " Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" $namespace = "Microsoft.SharePoint.WebPartPages " $mod = new-object ...


0

This was the same issue with me. The Central Administration displayed the site in the sites list, but without any reference to the Content Database where it should have been created. No way to remove it using the web interface (all pages displaying information about the site had no content at all). Then i thought to clean it up and remove via script. A ...


2

Maybe you have deleted the site before, and it's lurking around in a dark place? Try this and see what you get... Get-SPDeletedSite & Remove-SPDeletedSite You may already have restored this site before. In that process you also deleted the site first (automatically), which you can find running the command... >Get-SPDeletedSite You'll see the site ...


0

From you command what i am reading you are not giving the complete path of the file location. So please do this way: Import-SPWeb https://test.mywebsite.com/another_site/test -Path "**C:\Directory\export.cmp**"


1

No, it's only possible using the UI I have been looking for a solution; but it seems this is not possible programmatically. You'll find workarounds where you have to create event listeners and sync the list yourself as jaloplo mentioned.


1

You need to execute Register-SPWorkflowService only once for the entire farm. I have many cases where this did not work though due to some other factors in addition to the Proxy issue mentioned in the earlier response. SharePoint web applications are using https and the root of their cert is not in Workflow Manager server trusted root authority (MMC ...


0

Had this problem. Creating a new web app, importing terms to term store and session is null. Solution was to open a new powershell session and ran my termstore related commands.


1

Yes, it should work. Personally, I don't use the syntax $userProfile["$property"], instead without the quotes like $userProfile[$property], but it should not make a difference, AFAIK. What I don't see in your code, where the $userProfile variable in the Update-UserProfileProperty method was defined. What is the type of your custom property? String / date / ...


3

Use -replace PowerShell Regex based operator: $line = "Energy & Resources;#67777;#Financial Services;#137;#Consumer Business & Transportation;#23;#Real Estate;#4" $fmtLine = $line -replace ";[#\d;]+", ';' Update In order to return the array of values use -split operator or String.Split method, for example: $line = "Energy & ...


0

The code in console application works as you may be logged in as a Farm admin. The code in event receiver will fail even if it is run using elevated privileges i.e. app pool account unless the app pool account is added into Farm administrators group. The app pool account has permissions on content database, whereas it is the farm admin account which has ...


0

You can tell the status of a deployment by observing combined values of the Deployed and JobExists properties of the SPSolution object. SPSolution.Deployed True - Solution is deployed False - Solution is not deployed SPSolution.JobExists True - A retract/deploy job exists for this solution. False - No job It's important to check both of these properties ...


1

Can you please try the following (found here) Please note the differences : You get your node in $LibraryNode, but you also get the previous node (here: "Home"). Then you use this namespace. $web = Get-SPWeb http://www.sharepoint.com/ $navigationNode=$web.Navigation.QuickLaunch $LibraryNode = $navigationNode | where { $_.Title -eq "Node Name" } $HomeNode= ...


4

To just activate the feature use the following command: Enable-SPFeature –Identity <<FeatureID>> –url http://myspsite/ To find the FeatureID use the following for hidden features: Get-SPFeature -Limit ALL | Where-Object {$_.Hidden -eq $true -and $_.Scope -eq “WEB”} | Sort-Object DisplayName | Select DisplayName, Id


3

Instead of PSI I suggest you to work with the managed object model of Project Server. That is much more developer friendly. Last year I wrote a post about how can you list lookup table entries: using (var projectContext = new ProjectContext(pwaUrl)) { projectContext.Load(projectContext.LookupTables, lts => lts.Include( lt ...


0

User email address instead of name. I have tried with following. Set-SPOSite -Identity $NewSiteUrl -Owner "SPGroup@demo.onmicrosoft.com" But It set both primary and secondary site collection admin as company administrator but it add security group to site. permission working as expected. Not sure if secondary site collection administrator can be set using ...


0

I had to check the URL and then call the appropriate method. Below is the script I finally put together and it is working for me so far. if( $listURL.ToLower().Contains( "AllItems.aspx".ToLower() ) -or $listURL.ToLower().Contains( "DispForm.aspx".ToLower() ) ) { $site = New-Object Microsoft.SharePoint.SPSite($listURL) $web = $site.OpenWeb() ...



Top 50 recent answers are included