Friday, September 21, 2012

Vignettes AD <-> Profile

la KB officielle ; introduit en octobre 2010 http://support.microsoft.com/kb/2394320 Consider the following scenario. You try to import pictures in a user profile from the Active Directory thumbnailPhoto attribute to the PictureURL attribute in Microsoft SharePoint Server 2010. You set up an import PictureURL mapping. Then, you perform a full synchronization in the SharePoint server. In this scenario, the pictures are not added to the user profile in the SharePoint server. Note You can use following command to perform the import operation: Update-SPProfilePhotoStore -CreateThumbnailsForImportedPhotos 1 -MySiteHostLocation http:///my

Monday, August 27, 2012

Article exceptionnel sur le blobcache

http://sharepointinterface.com/2011/02/21/client-server-interactions-and-the-max-age-attribute-with-sharepoint-blob-caching/

Thursday, July 19, 2012

Synchro issues / Profiles

cet article est extremement exhaustif : http://blogs.technet.com/b/nishants/archive/2010/08/23/troubleshooting-user-profile-sync-issues-in-office-sharepoint-server-2007.aspx

Thursday, May 10, 2012

Diag des Alertes

http://blogs.developpeur.org/themit/archive/2012/05/08/sharepoint-mes-alertes-ne-marchent-pas-que-faire-comment-r-parer-ou-agir.aspx

Tuesday, April 17, 2012

tester du HTML dans une page sharepoint

pour reproduire un bug intermittent $req=[system.Net.HttpWebRequest]::Create($url); $req.UseDefaultCredentials = $true $response = $req.GetResponse() $stream = $response.GetResponseStream() $reader = New-Object IO.StreamReader($stream) $html = $reader.ReadToEnd() IF ($html -match "banner-aew-europe.jpg") { … Bug actif ….}

Wednesday, April 11, 2012

Webpart Derniers documents d'un site

Elegant, standard, avec une doc. http://www.fiechter.eu/blog/Lists/Posts/Post.aspx?ID=19&mobile=0

Monday, March 19, 2012

Dungeon master!

pour les nostalgiques, http://www.grimrock.net :)

Thursday, March 8, 2012

FEB CU 2010

http://blogs.technet.com/b/stefan_gossner/archive/2012/03/07/february-2011-cu-for-sharepoint-2010-has-been-released.aspx

Tuesday, March 6, 2012

Supprimer un profil local

Force sharepoint à le recreer :

#Get Site Collection
$SPsite = Get-SPSite "http://monportail"
#$OpenWeb = $SPSite.OpenWeb($SiteCollection)
$user = "Domaine\user"

$OpenWeb = $SPSite.RootWeb

$User = $OpenWeb.SiteUsers | Where {$_.LoginName -eq $User}
IF ($user)
{ $OpenWeb.SiteUsers.Remove($User)
Write-Host "$User Supprimé: $Site/$SiteCollection" }
else
{Write-Host "Non trouvé"}
$OpenWeb.Dispose()
$SPSite.Dispose()

Wednesday, February 22, 2012

Script inventaire / monitoring V2 - Sharepoint 2007 et 2010

Pour rappel, le principe est de remplir une liste SharePoint automatiquement (tache planifiée) avec tous les sites crées sur le serveur (inventaire) et leur état (monitoring). Ceci inclus les bases de contenu et leur instance SQL. Egalement, on filtre les sites persos, le site de cache officewebapps pour une liste plus claire :


Le code powershell est un peu approximatif, remarques bienvenues.


#
# Code : Emmanuel ISSALY - version 1.4 - 23/02/2012
# modèle objet Sharepoint --> marche en 2007 (sinon les commandlets sharepoint 2010 sont mieux)
#

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null;

function get-webpage([string]$url,[System.Net.NetworkCredential]$cred=$null)
{
$wc = new-object net.webclient
if($cred -eq $null)
{
$cred = [System.Net.CredentialCache]::DefaultCredentials;
}
$wc.credentials = $cred;
return $wc.DownloadString($url);
}

#credentials windows par défaut

$cred = [System.Net.CredentialCache]::DefaultCredentials;
#$cred = new-object System.Net.NetworkCredential("username","password","machinename")

# liste sharepoint qui va stocker les infos
$docliburl="http://vpt--02.ds.cdcam.com:22222/Lists/SiteState";

$reportsite=new-object Microsoft.SharePoint.SPSite($docliburl);
$reportweb=$reportsite.openweb();
$reportlist=$reportweb.GetList($docliburl);

# Pour chaque AAM de type "default" (shell de stsadm)
set-alias stsadm -value "stsadm.exe"

# Motifs URL indésirables (cache office webapps, sites persos)
$filtre= @("Office_","perso/")

[xml]$x=stsadm -o enumzoneurls
foreach ($zone in $x.ZoneUrls.Collection) {

write-host + $zone.default;

[xml]$sites=(stsadm -o enumsites -url $zone.Default) -notmatch [String]::Join('|',$filtre)

foreach ($site in $sites.Sites.Site) {

write-host +++ $site.Url;
if (!$site.url) { Continue } # pas de droits sur la base de contenu

# obtenir instance SQL

$DBName = [Microsoft.SharePoint.Administration.SPContentDatabase].GetProperty("Name")
$DBServer= [Microsoft.SharePoint.Administration.SPContentDatabase].GetProperty("ServiceInstance")

$rootSite = New-Object Microsoft.SharePoint.SPSite($site.Url)
$ContentDBCollection = $rootSite.WebApplication.ContentDatabases ;

foreach($ContentDB in $ContentDBCollection)
{
$nom = $DBName.GetValue($ContentDB, $null)
$server = ($DBServer.GetValue($ContentDB, $null)).NormalizedDataSource
}

# write-host $server "\\" $nom ;

# Pas de fuite mémoire
$rootSite.Dispose();

#recherche l'url dans la liste
$item = $reportlist.Items | Where { $_["Title"] -eq $site.url }

# crée la ligne si n'existe pas
if ($item -eq $null) {$item = $reportlist.Items.Add();}

$item["Title"] = $site.url;
$item["OKN2?"]= $True;
$item["Erreur2"]="";
$item["ContentDatabase"]=$nom ;
$item["SqlInstance"] = $server;

trap
{
write-host $error[0].exception.innerexception.message -foregroundcolor red -backgroundcolor yellow
$item["OKN2?"]= $False;
$item["Erreur2"]= $error[0].exception.innerexception.message;
continue;
}

$html=get-webpage -url $site.Url -cred $cred;

$item.Update();

}
}

$reportweb.dispose()
$reportsite.dispose()

Monday, February 13, 2012

ping -t pour sharepoint, version ferme

trivial... penser à déclarer un AAM avec le nom de la machine (ici par exemple sur le port 81) pour isoler un noeud, et mettre en tache planifiée tous les x minutes :

function Test-Site
{ param($URL)
try
{
$webclient = New-Object Net.WebClient
# Proxy avec le compte "windows"
$webclient.Credentials = [System.Net.CredentialCache]::DefaultCredentials
if($webclient.Proxy -ne $null) {
$webclient.Proxy.Credentials = `
[System.Net.CredentialCache]::DefaultNetworkCredentials
}
# test
$webclient.DownloadString($URL) | Out-Null
}

Catch
{
"FAIL: $($_.Exception.innerexception.message)"
Send-mailmessage -to "emmanuel.issaly@am.wtfbbq.com" -from "sharepoint.prod@wtfbbq.com" -subject "wtfbbqportal ne répond pas!" -body "FAIL: $($_.Exception.innerexception.message)" -smtpserver "SMTP.wtfbbq" -priority high
exit 1
}

}

Write-host N1 OK T=(Measure-Command {test-site "http://vpt-wtfbbq-01:81/"}).TotalSeconds
Write-host N2 OK T=(Measure-Command {test-site "http://vpt-wtfbbq-02:81/"}).TotalSeconds


PS : pour en faire un ping -t, encadrer les deux lignes de test par un while(1) par exemple...

Friday, February 10, 2012

Word starter et windows 7 - "imprimante non installée"

Sur le portable de ma fille, word starter (et uniquement word starter) ne peut pas imprimer, message "imprimante non installée"

C'est un problème de sécurité. Baisser ou désactiver l'UAC, en attendant d'installer open office ^^

Thursday, February 9, 2012

Pensez à heriter vos providers sous IIS7 !

dans IIS7, une declaration au miveau machine( par exemple une chaine de connexion) se retrouve partout.
Particulièrement utile quand on vous demande de modifier la CA, le STS et une webapp pour un accès FBA...

par exemple si on crée une connection au niveau racine (serveur)



On la retrouve dans chaque Site (Inherited)



Du coup, une seule manip.

Alternative, dans le web.config du bon framework, C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG, taper les chaines.

PS: Evidamment, si on a plusieurs providers, ca peu perdre de son interet...

edit : en complement, il y a par défaut une balise dans la section providers du ststoken.... il faut alors ajouter les providers à la main.

Generateur de commandes powershell pour Sharepoint 2010

awesome!

http://www.microsoft.com/resources/TechNet/en-us/Office/media/WindowsPowerShell/WindowsPowerShellCommandBuilder.html

Tuesday, January 17, 2012

attention au domaine corp et xxx.corp.com

attention au nom netbios != FQDN
dans ce cas, les user profile (application) seront de la forme xxx\login, donc introuvables par code.

résolution :


 

NetBiosDomainNamesEnabled is a property that is set on every UPA. By default, this value is set to false which means that you must set it to true in the scenario where the domain netbios\FQDN names are different. PowerShell can be used to drop the UPA into a variable and set this property to true.