zettelkasten/OneNoteExport/Kommunikationstechnologie/Sharepoint/HOWTo's/55_Powershell User profile bearbeiten.md
Ralf Koop 5a108aa2b4 .
2023-08-25 23:29:11 +02:00

15 KiB

Powershell User profile bearbeiten

Donnerstag, 17. Oktober 2019

09:20

 

$userProfile.Properties | sort DisplayName | FT DisplayName,Name,@{Label="Type";Expression={$_.CoreProperty.Type}}

 

 

 

DisplayName Name Type
----------- ---- ----
About me AboutMe HTML
Account name AccountName Person
Active Directory Id ADGuid binary
Activities I want to share in my newsfeed SPS-PrivacyActivity integer
Adjust Hijri calendar by number of days SPS-AdjustHijriDays integer
Ask Me About SPS-Responsibility string (Multi Value)
Assistant Assistant Person
Birthday SPS-Birthday datenoyear
Choose your settings SPS-RegionalSettings-FollowWeb boolean
Claim Provider Identifier SPS-ClaimProviderID string (Single Value)
Claim Provider Type SPS-ClaimProviderType string (Single Value)
Claim User Identifier SPS-ClaimID string (Single Value)
Content Languages SPS-ContentLanguages string (Single Value)
Data source SPS-DataSource string (Single Value)
Define Your Work Week SPS-WorkDays integer
DelveFlags DelveFlags integer
Department Department string (Single Value)
Department SPS-Department string (Single Value)
Display Order SPS-DisplayOrder integer
Distinguished Name SPS-DistinguishedName string (Single Value)
Don't Suggest List SPS-DontSuggestList Person
Dotted-line Manager SPS-Dotted-line Person
Email Notifications SPS-EmailOptin integer
Enable An Alternate Calendar SPS-AltCalendarType integer
Fax Fax string (Single Value)
Feed service provider defined identifier SPS-FeedIdentifier string (Single Value)
First Day of Week SPS-FirstDayOfWeek integer
First name FirstName string (Single Value)
First Run Experience SPS-O15FirstRunExperience integer
First Week of Year SPS-FirstWeekOfYear integer
Followed #Tags SPS-HashTags string (Multi Value)
Hire date SPS-HireDate date
Home phone HomePhone string (Single Value)
Id UserProfile_GUID unique identifier
Interests SPS-Interests string (Multi Value)
Job Title SPS-JobTitle string (Single Value)
Language Preferences SPS-MUILanguages string (Single Value)
Last Colleague Added SPS-LastColleagueAdded date
Last Keyword Added SPS-LastKeywordAdded date
Last name LastName string (Single Value)
Locale SPS-Locale integer
Manager Manager Person
Master Account Name SPS-MasterAccountName Person
MemberOf SPS-MemberOf string (Multi Value)
Mobile phone CellPhone string (Single Value)
msOnline-ObjectId msOnline-ObjectId unique identifier
My Site Upgrade SPS-MySiteUpgrade boolean
Name PreferredName string (Single Value)
Object Exists SPS-ObjectExists string (Single Value)
Office Office string (Single Value)
Office Location SPS-Location string (Single Value)
OfficeGraphEnabled OfficeGraphEnabled boolean
Outlook Web Access URL SPS-OWAUrl URL
Past projects SPS-PastProjects string (Multi Value)
Peers SPS-Peers string (Single Value)
People I follow SPS-PrivacyPeople boolean
Personal site PersonalSpace URL
Personal Site Capabilities SPS-PersonalSiteCapabilities integer
Personal Site Instantiation State SPS-PersonalSiteInstantiationState integer
Phonetic Display Name SPS-PhoneticDisplayName string (Single Value)
Phonetic First Name SPS-PhoneticFirstName string (Single Value)
Phonetic Last Name SPS-PhoneticLastName string (Single Value)
Picture PictureURL URL
Picture Exchange Sync State SPS-PictureExchangeSyncState integer
Picture Placeholder State SPS-PicturePlaceholderState integer
Picture Timestamp SPS-PictureTimestamp string (Single Value)
Proxy addresses SPS-ProxyAddresses string (Multi Value)
Public site redirect PublicSiteRedirect URL
PulseMRUPeople PulseMRUPeople string (Single Value)
Quick links QuickLinks string (Single Value)
Resource Forest Account Name SPS-ResourceAccountName Person
Resource Forest SID SPS-ResourceSID binary
Saved Account Name SPS-SavedAccountName string (Single Value)
Saved SID SPS-SavedSID binary
Schools SPS-School string (Multi Value)
Set Your Calendar SPS-CalendarType integer
Show Week Numbers SPS-ShowWeeks boolean
SID SID binary
SIP Address SPS-SipAddress string (Single Value)
Skills SPS-Skills string (Multi Value)
Source Object Distinguished Name SPS-SourceObjectDN string (Multi Value)
SPS-HideFromAddressLists SPS-HideFromAddressLists boolean
SPS-PersonalSiteFirstCreationError SPS-PersonalSiteFirstCreationError string (Single Value)
SPS-PersonalSiteFirstCreationTime SPS-PersonalSiteFirstCreationTime date time
SPS-PersonalSiteLastCreationTime SPS-PersonalSiteLastCreationTime date time
SPS-PersonalSiteNumberOfRetries SPS-PersonalSiteNumberOfRetries integer
SPS-PointPublishingUrl SPS-PointPublishingUrl URL
SPS-RecipientTypeDetails SPS-RecipientTypeDetails big integer
SPS-TenantInstanceId SPS-TenantInstanceId unique identifier
SPS-UserType SPS-UserType integer
Status Message SPS-StatusNotes string (Single Value)
Time Format SPS-Time24 boolean
Time Zone SPS-TimeZone timezone
Title Title string (Single Value)
Use language and regional settings SPS-RegionalSettings-Initialized boolean
User name UserName string (Single Value)
User Principal Name SPS-UserPrincipalName string (Single Value)
Web site WebSite URL
Work Day End Hour SPS-WorkDayEndHour integer
Work Day Start Hour SPS-WorkDayStartHour integer
Work email WorkEmail Email
Work phone WorkPhone string (Single Value)

Email Notification : Alle abgewählt Value = 126

 

 

Computergenerierter Alternativtext: Email Notifications Someone has started follovhng me Suggestions fC4 people and keywords I night be interested in Someone has mentioned me Someone replied to a conversation that I started Someone replied to a conversation that I replied to Someone replied to my community discussion post {width="4.8125in" height="1.3541666666666667in"}

 

Erfasster Bildschirmausschnitt: 17.10.2019 09:35

 

Value = 124 Wert 2

Value = 122 Wert 4

Value = 118 Wert 8

Value = 110 Wert 16

Value = 94 Wert 32

Value = 62 Wert 64

 

Value = 0 dann sind alle aktiviert

Value 126 dann sind alle deaktiviert

 

Man rechnet die Werte Zusammen die man aktivieren will und zieht das Resultat von 126 ab.

zB :

 

Computergenerierter Alternativtext: Email Notifications Someone has started following me Suggestions fC4 people and keywords I night be interested in Someone has mentioned me Someone replied to a conversation that I started Someone replied to a conversation that I replied to Someone replied to my community discussion post {width="4.6875in" height="1.2708333333333333in"}

 

Erfasster Bildschirmausschnitt: 17.10.2019 09:54

 

hat den Wert 86

und

 

Computergenerierter Alternativtext: Email Notifications Someone has started following me Suggestions for people and keywords I night be interested in Someone has mentioned me Someone replied to a conversation that I started Someone replied to a conversation that I replied to Someone replied to my community discussion post {width="4.770833333333333in" height="1.4166666666666667in"}

 

Erfasster Bildschirmausschnitt: 17.10.2019 09:55

 

hat den Wert 30

 

 

Script um auf den UPS zu zugreifen :

 

void

$site=new-object Microsoft.SharePoint.SPSite("https://mobilnet.bkk-mobiloil.de")
$serviceContext = Get-SPServiceContext $site
$site.Dispose()
$upm = new-object Microsoft.Office.Server.UserProfiles.UserProfileManager($serviceContext)
$userProfile = $upm.GetUserProfile("myarlett@company.com")

 

Aus <https://social.technet.microsoft.com/wiki/contents/articles/20692.sharepoint-2013-get-set-and-copy-user-profile-properties-using-powershell.aspx>

 

Um alle profile anzeigen zu lassen nimmt man folgenden Befehl :

 

$upm.GetEnumerator()

 

$AllProfile = $upm.GetEnumerator()

 

 

Listet alle Profil Eigenschaften auf :

$userProfile.Properties | sort DisplayName | FT DisplayName,Name,{Label="Type";Expression={$_.CoreProperty.Type}}

 

Aus <https://social.technet.microsoft.com/wiki/contents/articles/20692.sharepoint-2013-get-set-and-copy-user-profile-properties-using-powershell.aspx>

 

 

 

Um eine Eigenschaft zu ändern :

 

$userProfile["SPS-Location"].Value = "London";
$userProfile.Commit();

 

Einen Wert für alle profile Ändern :

 

 

 

reflection.assembly
reflection.assembly
reflection.assembly

$site = "https://mobilnet.bkk-mobiloil.de"
$property = "SPS-Emailoptin"
$value = "126"

$spsite = Get-SPSite $site
$context = Get-SPServiceContext $site
$upm = New-Object Microsoft.Office.Server.UserProfiles.UserProfileManager($context)
$enum = $upm.GetEnumerator()

 

while ($enum.MoveNext())
{\

Microsoft.Office.Server.UserProfiles.UserProfile

Write-Host "Working on profile for: " $user.DisplayName
Write-Host "Old Value: " $($user[$property])
$user[$property].value = $value
$user.Commit()
Write-Host "New Value: " $($user[$property])
}

 

Aus <https://blogs.msdn.microsoft.com/chadray/2011/12/06/how-to-change-user-profile-properties-with-powershell/>