GithubHelp home page GithubHelp logo

Comments (12)

camiloborges avatar camiloborges commented on June 1, 2024

I am on it

from sharepointdsc.

camiloborges avatar camiloborges commented on June 1, 2024

hey. what about order and grouping(can't remember how it is called in CA)?

from sharepointdsc.

BrianFarnhill avatar BrianFarnhill commented on June 1, 2024

Good point - now sure how we include this. You got suggestions or ideas? Im pretty sure group is just another string property so that should be fine, but I forget about the ordering stuff.

from sharepointdsc.

camiloborges avatar camiloborges commented on June 1, 2024

Pretty sure I've got a script that adds the property, saves it, then retrieves all properties and reorder them. I am just a little worried that DSC might not like that as I think we could end up with another loop as property index might be changed by another property.
ie: there is a default property p26(A) I add another one to p26(B).
B is now p26, A is p27.
if I add C as p26 we have
C - p26
B - p27
A - p28.

I will code it up and we test in your super dupa sexy environment

from sharepointdsc.

BrianFarnhill avatar BrianFarnhill commented on June 1, 2024

Yea I'm inclined to park the ordering to another day (maybe we do a separate resource to define the order of all properties so we avoid a loop like that)

from sharepointdsc.

camiloborges avatar camiloborges commented on June 1, 2024

could / should property order be another resource?

from sharepointdsc.

camiloborges avatar camiloborges commented on June 1, 2024

:)

from sharepointdsc.

camiloborges avatar camiloborges commented on June 1, 2024

check this out

param( $siteUrl)
Add-PSSnapin microsoft.sharepoint.powershell -ErrorAction SilentlyContinue
Add-Type -Path "C:\program files\common files\microsoft shared\web server extensions\15\isapi\Microsoft.Office.Server.dll"

#$configFile =xml
#function UPPReorder($configFile,$siteUrl){
$config = xml
$mys = Get-SPSite $siteUrl
$context = Get-SPServiceContext $mys
$upcManager = New-Object Microsoft.Office.Server.UserProfiles.UserProfileConfigManager($context)

#if you have several profile sub-types, you might want to change the following line and use the name of the desired profile sub-type
$defaultUserProfileSubTypeName = [Microsoft.Office.Server.UserProfiles.ProfileSubtypeManager]::GetDefaultProfileName("User")
$profileSubtypePropManager = $upcManager.ProfilePropertyManager.GetProfileSubtypeProperties($defaultUserProfileSubTypeName)

foreach($property in $config.Configuration.Properties.childnodes){
$propName = $property.Name
Write-Host "Updating property $propName ..."
$profileSubtypePropManager.SetDisplayOrderByPropertyName($property.Name,$property.Order)
}
$profileSubtypePropManager.CommitDisplayOrder()
Write-Host "Finished."
#}
#SAMPLE USAGE
#UPPReorder C:\Temp\Blog\config.userproperties.xml http://spdevel.portal.com

from sharepointdsc.

BrianFarnhill avatar BrianFarnhill commented on June 1, 2024

Lets call it now - yes, sort order of properties should be a separate resource - leave it out of this :)

from sharepointdsc.

camiloborges avatar camiloborges commented on June 1, 2024

hello.
please mark this as in progress :)

from sharepointdsc.

BrianFarnhill avatar BrianFarnhill commented on June 1, 2024

All yours @camiloborges

from sharepointdsc.

BrianFarnhill avatar BrianFarnhill commented on June 1, 2024

Released in v0.10 - closing this issue

from sharepointdsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.