Dans "User Profiles and Properties --> View Import connection --> Creation
new connection", je souhaiterais automatiser la création de cette connexion
(page Add Connection)
J'ai réussi à scripter l'interrogation du "user profile" et lancer un "Full
import" quand la connexion existe: ok.
Ci-dessous, le script en question:
=================================
# Load Assemblies
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
# Get Site and servercontext
$site = [Microsoft.SharePoint.SPSite]("http://serveur:85/ssp")
$sctx = [Microsoft.Office.Server.ServerContext]::GetContext($site)
# Get UserProfileConfigManager (UserProfileManager is readonly)
$upcm = [Microsoft.Office.Server.UserProfiles.UserProfileConfigManager]($sctx)
# Get DataSources
$ds = $upcm.GetDataSource()
# Loop through Connections and change the ones which should be changed
$ds.Connections | % {$_.DomainName='xxxxx'}
#Commit changes
$ds.Commit()
# Start Full import (parameter is bool for incremental)
$upcm.StartImport(0)
=======================================
Si vous avez une idée pour créer cette connexion ...
Merci d'avance pour votre aide.
Cordialement,
Houdini
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Marc Lognoul [MVP]
Bonsoir,
Encore un peu de patience, je posterai bientôt le code correspondant sur le projet CodePlex dédié à SharEpoint/PowerShell.
-- Marc Lognoul [MCSE, MCTS, MVP] Heureux celui qui a pu pénétrer les causes secrètes des choses Happy is the one who could enter the secret causes of things Blog EN: http://www.marc-antho-etc.net/blog/ Blog FR: http://www.marc-antho-etc.net/blogfr/
"Houdini" wrote in message news:
Bonjour à toutes et à tous,
Dans "User Profiles and Properties --> View Import connection --> Creation new connection", je souhaiterais automatiser la création de cette connexion (page Add Connection)
J'ai réussi à scripter l'interrogation du "user profile" et lancer un "Full import" quand la connexion existe: ok.
Ci-dessous, le script en question: ================================ > # Load Assemblies [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
# Get Site and servercontext $site = [Microsoft.SharePoint.SPSite]("http://serveur:85/ssp") $sctx = [Microsoft.Office.Server.ServerContext]::GetContext($site)
# Get UserProfileConfigManager (UserProfileManager is readonly) $upcm = [Microsoft.Office.Server.UserProfiles.UserProfileConfigManager]($sctx)
# Get DataSources $ds = $upcm.GetDataSource()
# Loop through Connections and change the ones which should be changed $ds.Connections | % {$_.DomainName='xxxxx'}
#Commit changes $ds.Commit()
# Start Full import (parameter is bool for incremental) $upcm.StartImport(0) ====================================== > Si vous avez une idée pour créer cette connexion ... Merci d'avance pour votre aide. Cordialement, Houdini
Bonsoir,
Encore un peu de patience, je posterai bientôt le code correspondant sur le
projet CodePlex dédié à SharEpoint/PowerShell.
--
Marc Lognoul [MCSE, MCTS, MVP]
Heureux celui qui a pu pénétrer les causes secrètes des choses
Happy is the one who could enter the secret causes of things
Blog EN: http://www.marc-antho-etc.net/blog/
Blog FR: http://www.marc-antho-etc.net/blogfr/
"Houdini" <Houdini@discussions.microsoft.com> wrote in message
news:7E69F50F-CD1E-4F17-9574-ED5B35327E38@microsoft.com...
Bonjour à toutes et à tous,
Dans "User Profiles and Properties --> View Import connection --> Creation
new connection", je souhaiterais automatiser la création de cette
connexion
(page Add Connection)
J'ai réussi à scripter l'interrogation du "user profile" et lancer un
"Full
import" quand la connexion existe: ok.
Ci-dessous, le script en question:
================================ > # Load Assemblies
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
# Get Site and servercontext
$site = [Microsoft.SharePoint.SPSite]("http://serveur:85/ssp")
$sctx = [Microsoft.Office.Server.ServerContext]::GetContext($site)
# Get UserProfileConfigManager (UserProfileManager is readonly)
$upcm =
[Microsoft.Office.Server.UserProfiles.UserProfileConfigManager]($sctx)
# Get DataSources
$ds = $upcm.GetDataSource()
# Loop through Connections and change the ones which should be changed
$ds.Connections | % {$_.DomainName='xxxxx'}
#Commit changes
$ds.Commit()
# Start Full import (parameter is bool for incremental)
$upcm.StartImport(0)
====================================== >
Si vous avez une idée pour créer cette connexion ...
Merci d'avance pour votre aide.
Cordialement,
Houdini
Encore un peu de patience, je posterai bientôt le code correspondant sur le projet CodePlex dédié à SharEpoint/PowerShell.
-- Marc Lognoul [MCSE, MCTS, MVP] Heureux celui qui a pu pénétrer les causes secrètes des choses Happy is the one who could enter the secret causes of things Blog EN: http://www.marc-antho-etc.net/blog/ Blog FR: http://www.marc-antho-etc.net/blogfr/
"Houdini" wrote in message news:
Bonjour à toutes et à tous,
Dans "User Profiles and Properties --> View Import connection --> Creation new connection", je souhaiterais automatiser la création de cette connexion (page Add Connection)
J'ai réussi à scripter l'interrogation du "user profile" et lancer un "Full import" quand la connexion existe: ok.
Ci-dessous, le script en question: ================================ > # Load Assemblies [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Server")
# Get Site and servercontext $site = [Microsoft.SharePoint.SPSite]("http://serveur:85/ssp") $sctx = [Microsoft.Office.Server.ServerContext]::GetContext($site)
# Get UserProfileConfigManager (UserProfileManager is readonly) $upcm = [Microsoft.Office.Server.UserProfiles.UserProfileConfigManager]($sctx)
# Get DataSources $ds = $upcm.GetDataSource()
# Loop through Connections and change the ones which should be changed $ds.Connections | % {$_.DomainName='xxxxx'}
#Commit changes $ds.Commit()
# Start Full import (parameter is bool for incremental) $upcm.StartImport(0) ====================================== > Si vous avez une idée pour créer cette connexion ... Merci d'avance pour votre aide. Cordialement, Houdini