Skip to main content
SCCM & PowerShell v2 : quelques scripts utiles de la part de Michael Niehaus
Introducing PoshBing – The PowerShell library for Microsoft's Bing Search Engine
![]()
Microsoft released their new search engine called "Bing" at, aptly named, https://www.bing.com .
…
The Bing API has the concept of " SourceTypes " which are essentially data sources that you can search into. My script library provides access to the Image , InstantAnswer , News , MobileWeb , Phonebook , RelatedSearch , Spell , Web , Translation , and Video SourceTypes with the following functions:
Get-BingImage – Search the Image SourceType for a list of images including properties about the media files.
Get-BingInstantAnswer – Get single, authoritative answers to questions.
Get-BingNews – Provide news specific to a topic, a location, or breaking news.
Get-BingMobileWeb – Returns mobile web results, primarily relevant XHTML or WML pages.
Get-BingPhonebook – Enables you to view details about a business for which you are searching as if they were a phonebook entry.
Get-BingRelatedSearch – View searches that provide information in which you might be interested, based on your current search.
Get-BingSpell – Query alternative spellings for a given word or phrase.
Get-BingWeb – Get pages relevant to the queried terms.
Get-BingTranslation – Translate a term from one language to another.
Get-BingVideo – return a list of videos and their properties relevant to the query terms.
The whole article is here : https://devcentral.f5.com/weblogs/Joe/archive/2009/06/03/introducing-poshbing-ndash-the-powershell-library-for-microsoftrsquos-bing-search.aspx
J'en ai rien à déployer 2009 !
Encore 5 jours pour participer au jeu concours !
«J'en ai rien à déployer» : cet été pour garder les neurones pétillants, découvrez des dossiers IT pour voir ou revoir ce que vous auriez pu rater durant l'année et, jusqu'au 30 septembre, gagnez des cadeaux en participant à notre grand jeu-concours final . Si pour vous Bitlocker est une marque de chaussures et BranchCache un nouveau jeu d'acrobaties en forêt, cette session est faite pour vous !
.jpg)
Chapitre 1 - Windows 7, Le Kit de Survie
Chapitre 2 - Les Communications Unifiées
Chapitre 3 - Windows 7 : Déploiement, Migration et Administration
Chapitre 4 - Windows Server 2008 R2
Chapitre 5 - Windows 7 : Compatibilité Applicative et Hardware
Chapitre 6 - Internet Explorer 8
Chapitre 7 - Windows 7 et la Sécurité
Chapitre 8 - SQL Server 2008
Chapitre 9 - Windows 7 : Mobilité et Productivité
Chapitre 10 - Office System 2007 & 2010
L'Abonnement TechNet Plus est à l'honneur sur TechNet !
L'équipe TechNet est heureuse de vous offrir 20% de réduction pour tout nouvel achat d'un Abonnement TechNet Plus auprès de Microsoft.
Pour en bénéficier, utilisez le code promotion suivant TNFR09 lors de votre achat en ligne ou par téléphone. Offre valable jusqu'au 31 janvier 2009.
De plus, sachez que pour toute certification passée et réussie via le centre de test Edugroupe, un Abonnement TechNet Plus Direct d'une durée d'un an vous sera offert !
Profitez-en dès maintenant si vous êtes sur le point de vous certifier prochainement. Cette offre est valable jusqu'aux Microsoft Techdays 2009 inclus, qui auront lieu les 10, 11 et 12 février 2009 au Palais des Congrès de Paris où une offre spéciale vous attend sur le stand carrière du village Microsoft.
Les enregistrements des TechDays sont en ligne !
C'est accessible ici : https://www.microsoft.com/france/vision/mstechdays09/ 

Et en particulier pour les sessions "Powershell" :

Les présentations de la session du 25 mai du Club MOSS
Elles sont disponibles ici : https://clubmoss2007.org 
Avec les slides d'Erol directement ici sur SlideShare : https://www.slideshare.net/EROL_MVP/clubmossfrance25-mai2009-1470524 

et toutes les présentations ici, sur SkyDrive.

Mon script de découverte de PowerShell est en attachement de ce message.
2009-05-25 Découverte PowerShell @ CLUB MOSS.rar
Lu sur le Web : Introduction to Windows PowerShell for the SQL Server DBA …
Ce sont 2 articles, didactiques, pour se mettre immédiatement à Powershell (que vous soyez DBA ou non) :
![]()
![]()
New PowerShell cmdlets let you manage Active Directory quickly and efficiently
Here are some common commands:
To load the AD DS module, use Add-Module ActiveDirectory
, then Get-Module
To get information about a domain, use Get-ADDomain domain_name
To display information about domain controllers in a specific domain, use Get-ADDomainController -Discover
To browse a specific domain, with results neatly formed in a table, "change directory" into AD via Cd AD:
and then use the following series of commands:
PWD
DIR | Format-Table -Auto
CD "DC=domain_name,DC=TLD"
DIR | ft –a
![]()
PowerShell sur Technet et en français
Tout sur l'actualité de PowerShell en français
Le résultat est très sympathique : Ça s'appuie bien sûr sur WMI, c'est facilement modifiable pour...
Author: patricg Date: 12/15/2008
La gestion des erreurs avec PowerShell V1 ne dispose pas des options évoluées de type...
Author: patricg Date: 12/12/2008
la session "[Microsoft TechDays 2008] - Neos-SDI : Mise en application de PowerShell V1/V2 avec la...
Author: patricg Date: 12/11/2008
La session est accessible ici sur TechNet Spotlight!...
Author: patricg Date: 12/11/2008
Le but de ce site est de parler et de faire parler sur PowerShell prioritairement en français. A ce...
Author: patricg Date: 12/11/2008
Pour faire suite à la session MSDN et Technet Tour sur PowerShell (essentiellement V1 malgré le...
Author: patricg Date: 12/09/2008
Si vous lisez le Blog de l'équipe Powershell, vous avez donc vu ce billet parlant d'e la fonction...
Author: TechNet Archive Date: 12/09/2008
David S. et Fabrice M. me rejoignent pour animer ce blog ! Merci à eux !
Author: patricg Date: 12/08/2008
Un grand retour pour les aficionados d'Unix ! Ca vient d'ici :...
Author: patricg Date: 12/04/2008
Si vous souhaitez découvrir PowerShell en français, vous pouvez aller sur ce site :...
Author: patricg Date: 12/04/2008
Pour tout savoir sur PowerShell V2, vous pouvez regardez l'enregistrement de la session TechEd EMEA...
Author: patricg Date: 12/02/2008
L'enregistrement de cette session du Tech.Ed EMEA qui vient d'avoir lieu récemment à Barcelone est...
Author: patricg Date: 12/01/2008
Ce blog a pour vocation de relayer toute l'actualité PowerShell, et en français autant que ce sera...
Author: patricg Date: 12/01/2008
<Previous
PoshBoard 2.0 est en ligne !
Une bonne nouvelle côté PoshBoard, une version 2.0 est maintenant disponible !
C'est accessible ici : https://poshboard.codeplex.com/ 
![poshboard2screen2[1] poshboard2screen2[1]](https://msdntnarchive.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_technet/powershell/WindowsLiveWriter/PoshBoard2.0estenligne_B9B1/poshboard2screen2%5B1%5D_thumb.png)
C'est une mise à jour majeure, avec son lot de nouvelles fonctionnalités:
- Nouveau portail reconstruit "from scratch"
- Mise à niveau vers Silverlight 3
- Maintenant 100% basé sur l'authentification windows : accès admin/visiteur pour chaque portail, impersonification possible par utilisateurs/groupes, ceci indépendamment pour chaque page du portail !
- Configuration du portail via un fichier de config XML
- Interface graphique de gestion des accès et portails pour les superadministrateurs directement au sein de Poshboard
- Modèle unifié pour les cmdlets PowerShell
- Nouveaux controles silverlight : Tabs, CoverFlow...
- Installation facile : le portail peut être déployé, cloné, mis en application web...
- Petit : 1,5 Mo !
- SQL optionnel pour la gestion du portail (mais sera utilisé pour la rétention des données à venir)
Une petite vidéo disponible ici : https://www.vimeo.com/6810993 
Merci à Antoine pour cette nouvelle version, à tester d'urgence !
![poshboard2screen1[1] poshboard2screen1[1]](https://msdntnarchive.blob.core.windows.net/media/TNBlogsFS/BlogFileStorage/blogs_technet/powershell/WindowsLiveWriter/PoshBoard2.0estenligne_B9B1/poshboard2screen1%5B1%5D_thumb.png)
Poshboard V1 beta
Antoine Habert me prévient de la dispo de PoshBoard V1 !
La toute première release de Poshboard V1 Beta est disponible sur codeplex !
l'article complet de présentation avec des courtes vidéos de démo est disponible ici
Cette release introduit notamment le GUI Widget Designer, qui est le premier exemple de code permettant la création d'interfaces Silverlight en PowerShell, et ceci en temps réel !
L'article est aussi dispo en français ici.
En prévision de cette sortie, Antoine nous propose une série de vidéo de présentation technique dont voici le premier volet :
Poshboard V1 Tech Preview 1 French from Antoine Habert on Vimeo.
Tout est ici : https://devinfra.blogspot.com/
Pour bien commencer avec PowerShell …
Pour bien commencer avec PowerShell, je vous recommande un site très riche en exemples et tutoriaux, c'est :
avec notamment le Beginning PowerShell Guide
qui est un mini-guide du débutant.

J'espère d'ici quelques temps avoir le temps de consolider une liste de ressources pour bien débuter avec PowerShell mais disponible en français, alors n'éhistez pas à me faire part de vos bons pointeurs dans le domaine.
PowerShell 2.0 est disponible sur toute la gamme des systèmes d'exploitation Microsoft !
Windows Management Framework, which includes Windows PowerShell 2.0, WinRM 2.0, and BITS 4.0, was officially released to the world yesterday morning. By providing a consistent management interface across the various flavors of Windows, we are making our platform that much more attractive to deploy. IT Professionals can now easily manage their Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2 machines through PowerShell remoting – that's a huge win!
You can download the packages here: https://go.microsoft.com/fwlink/?LinkID=151321
PowerShell 2 et Word 2007 : Génération de fiches serveur
Si vous voulez savoir comment générer de beaux rapports sur vos serveurs au format Word 2007 en PowerShell, voici une très bonne source d'inspiration et d'information.
PowerShell 2 et Word 2007 : Génération de fiches serveur sur https://scriptingof.blogspot.com/
Nous y voilà, nous pouvons générer une fiche serveur en 4 étapes :
- Partie 1 : Installation et configuration des pré-requis.
- Partie 2 : Création du module PowerShell collectant les informations sur une machine distante.
- Partie 3 : Création du document Word 2007 (template).
- Partie 4 : Génération de la fiche serveur.

PowerShell de A à Z !
Une série de 26 messages intéressants sur l'ABC de PowerShell : PowerShell ABC's - A To Z 

PowerShell et SharePoint : créer des groupes et des utilisateurs dans un site SharePoint
Voici un bel exemple de ce que l'on peut faire avec PowerShell
Merci à Nicolas Schmitt qui m'a transmis cet exemple.
Introduction :
Comme parler à SharePoint via Powershell :
- Charger la DLL SharePoint :
- [Void][System.Reflection.Assembly]::LoadWithPartial Name("Microsoft.SharePoint")
- Utiliser les API .Net de SharePoint comme si vous étiez en C# (ou VB ou tout autre langage .Net). Par exemple, ouvrir un objet SPSite :
- $site = New-Object Microsoft.SharePoint.SPSite($siteurl)
- A la fin du script, ne pas oublier de libérer les objets SharePoint, par exemple :
Exemple de script
Pour illustrer ce que l'on peut faire avec PowerShell et SharePoint, voici un script qui permet de créer des groupes et des utilisateurs dans un site SharePoint. La liste des groupes et des utilisateurs est passée en paramètre dans 2 fichiers CSV.
Ceci est assez pratique, en particulier lors des tests d'intégration, lorsque l'on supprime et recrée souvent des collections de sites.
Ce script prend en paramètre :
- L'url du site où l'on va importer les groupes et utilisateurs
- Un fichier CSV contenant les groupes
o 3 colonnes : nom du groupe, permission, propriétaire du groupe (si vide, on prend l'utilisateur courant)
- Un fichier CSV contenant les utilisateurs à importer
o 2 colonnes : login de l'utilisateur, groupe dans lequel positionner l'utilisateur (facultatif)
Exemple d'utilisation :
powershell ./ImportGroupsAndUsers.ps1 https://team –userfile Users.csv
Principales fonctions utilisées :
ipcsv $groupfile | foreach { Write-Host $_.GroupName } : Importe un fichier CSV, et affiche la colonne « GroupName » de chaque ligne
$spuser = $web.EnsureUser($user) : crée un utilisateur dans le site
$web.SiteGroups.Add($group, $owner, $null, "") : Crée un groupe dans le site
Le script complet est en attachement, ça donne cela :
1: param (
2: [string] $siteurl = "",
3: [string] $userfile = "",
4: [string] $groupfile = ""
5: )
6:
7: if ($siteurl -eq "")
8: {
9: $siteurl = Read-Host "Site url";
10: }
11:
12: [Void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint");
13:
14: Write-Host -ForegroundColor green "Opening SharePoint site...";
15:
16: $site = New-Object Microsoft.SharePoint.SPSite($siteurl)
17: $web = $site.RootWeb;
18:
19: if ($groupfile -ne "")
20: {
21: Write-Host -ForegroundColor green "Importing groups from $groupfile";
22: ipcsv $groupfile | foreach {
23: $group = $_.GroupName;
24: $perm = $_.Permissions;
25: $owner = $_.Owner;
26: if ($owner -eq "") { $owner = $web.CurrentUser.LoginName }
27: Write-Host -ForegroundColor green " $group (owner = $owner, perm = $perm)"
28: $exists = $web.SiteGroups | where { $_.Name -eq $group }
29: if ($exists -eq $null)
30: {
31: # Create group
32: $web.SiteGroups.Add($group, $web.EnsureUser($owner), $null, "");
33: # Give permissions to the group
34: $assign = New-Object Microsoft.SharePoint.SPRoleAssignment($web.SiteGroups[$group]);
35: $assign.RoleDefinitionBindings.Add($web.RoleDefinitions[$perm])
36: $web.RoleAssignments.Add($assign)
37: }
38: else
39: {
40: Write-Host -ForegroundColor magenta " already exist"
41: }
42: }
43: }
44:
45: if ($userfile -ne "")
46: {
47: Write-Host -ForegroundColor green "Importing users from $userfile";
48: ipcsv $userfile | foreach {
49: $user = $_.User
50: $group = $_.Group
51: Write-Host -ForegroundColor green " $user -> $group"
52: # Add user to the web
53: $spuser = $web.EnsureUser($user);
54: # Add user to group
55: if ($group -ne "")
56: {
57: $web.SiteGroups[$group].AddUser($spuser);
58: }
59: }
60: }
61:
62: $site.Dispose();
63: Write-Host -ForegroundColor green "Done.";
ImportGroupsAndUsers.zip
PowerShell et SharePoint : du nouveau !
![]()
Fabrice nous gratifie déjà régulièrement d'une excellente série d'articles sur Powershell et SharePoint. Ils sont accessibles ici : https://blogs.developpeur.org/fabrice69/archive/tags/PowerShell/default.aspx
On peut citer :
et aussi de nombreux scripts mis en ligne sur asp-php.net :
Afficher les informations de profil MOSS d'un user
Ajouter des items dans une liste SharePoint
Ajouter des liens sur deux niveaux dans SharePoint
Ajouter une liste dans un site SharePoint
Connaître le code version de votre SharePoint
Définir une valeur pour une propiété d'un SPWeb
Exporter une liste SharePoint dans un fichier
Extraire toutes les collections SharePoint en CSV
Importer une liste SharePoint depuis un fichier
Lister les collections pour une WebApp SharePoint
Lister les comptes utilisateur de votre AD
Lister les propriétés d'un site SharePoint
Lister les utilisateurs d'un site SharePoint
Modifier le Thème d'une collection SharePoint
Supprimer tous les items d'une liste SharePoint
Tester l'existance ou effacer une WebPart
Vider la Corbeille SharePoint d'une collection
Mais là il va plus loin encore en créant un projet codeplex dédié aux scripts de gestion SharePoint en Powershell !
Plus dans le message suivant …
PowerShell for Failover Clustering…
Une excellente série d'articles sur PowerShell pour gérer le clustering, c'est ici : https://blogs.msdn.com/clustering/archive/tags/PowerShell/default.aspx 
Par exemple, ici pour renommer des clusters groups : PowerShell for Failover Clustering: Let's Rename a Few Things 

PowerShell v2 CTP 3 est disponible
La team PowerShell l'annonce comme son cadeau de noël en avance : la CTP 3 de PowerShell v2 est enfin disponible !
https://blogs.msdn.com/powershell/archive/2008/12/23/early-christmas-present-from-powershell-team-community-technology-preview-3-ctp3-of-windows-powershell-v2.aspx
parmi les nouveautés :
- Amélioration des performances
- remoting implicite lorsque les commandes apparaissent locales alors qu'elles sont distantes
- 60 nouvelles cmdlets (gestion des ordinateurs et de WS-MAN avec notamment un provider WS-MAN)
- un débugger dans l'interface graphique, qui s'appelle maintenant PowerShell ISE ainsi qu'une aide contextuelle lorsque l'on tape F1
Petit rappel : une CTP n'est pas une Beta, ne l'utilisez pas en production car ce n'est qu'une version intermédiaire dont le comportement peut varier par rapport à la version finale.
Voici les liens pour télécharger tout ca :
Download Windows PowerShell V2 CTP3
Download WinRM 2.0 CTP3 (requis pour le remoting PowerShell )
PowerShell Windows Mobile Provider
https://www.codeplex.com/psmobile
Project Description Explore and manipulate your mobile device with Windows PowerShell. Supports PocketPC and SmartPhone devices; WM2002, 2003, 2003SE, 5, 6 and 6.1

SCCM & PowerShell v2 : quelques scripts utiles de la part de Michael Niehaus
Pour ceux à qui cela n'évoque rien, Michael Niehaus est un Senior Software Development Engineer basé à Redmond et qui travaille principalement au développement de notre solution de déploiement de Windows : Microsoft Deployment Toolkit.
La prochaine version de cette solution s'appuyant grandement sur PowerShell, Michael nous livre une suite de scripts pour PowerShell V2 CTP3 permettant de requeter une infrastructure Microsoft System Center Configuration Manager. le resultat est la :
Fun with ConfigMgr 2007 and PowerShell
Visiblement, la suite sera dévoilée au MMS 2009 à la fin du mois à Las Vegas.
Popular posts from this blog
视频教程和截图:Windows8.1 Update 1 [原文发表地址] : Video Tutorial and Screenshots: Windows 8.1 Update 1 [原文发表时间] : 4/3/2014 我有一个私人的MSDN账户,所以我第一时间下载安装了Windows8.1 Update,在未来的几周内他将会慢慢的被公诸于世。 这会是最终的版本吗?它只是一项显著的改进而已。我在用X1碳触摸屏的笔记本电脑,虽然他有一个触摸屏,但我经常用的却是鼠标和键盘。在Store应用程序(全屏)和桌面程序之间来回切换让我感到很惬意,但总是会有一点瑕疵。你正在跨越两个世界。我想要生活在统一的世界,而这个Windows的更新以统一的度量方式将他们二者合并到一起,这就意味着当我使用我的电脑的时候会非常流畅。 我刚刚公开了一个全新的5分钟长YouTube视频,它可以带你参观一下一些新功能。 https://www.youtube.com/watch?feature=player_embedded&v=BcW8wu0Qnew#t=0 在你升级完成之后,你会立刻注意到Windows Store-一个全屏的应用程序,请注意它是固定在你的桌面的任务栏上。现在你也可以把任何的应用程序固定到你的任务栏上。 甚至更好,你可以右键关闭它们,就像以前一样: 像Xbox Music这种使用媒体控件的Windows Store应用程序也能获得类似于任务栏按钮内嵌媒体控件的任务栏功能增强。在这里,当我在桌面的时候,我可以控制Windows Store里面的音乐。当你按音量键的时候,通用音乐的控件也会弹出来。 现在开始界面上会有一个电源按钮和搜索键 如果你用鼠标右键单击一个固定的磁片形图标(或按Shift+F10),你将会看到熟悉的菜单,通过菜单你可以改变大小,固定到任务栏等等。 还添加了一些不错的功能和微妙变化,这对经常出差的我来说非常棒。我现在可以管理我已知的Wi-Fi网络了,这在Win7里面是被去掉了或是隐藏了,以至于我曾经写了一个实用的 管理无线网络程序 。好了,现在它又可用了。 你可以将鼠标移至Windows Store应用程序的顶部,一个小标题栏会出现。单击标题栏的左边,然后你就可以...
ASP.NET AJAX RC 1 is here! Download now
Moving on with WebParticles 1 Deploying to the _app_bin folder This post adds to Tony Rabun's post "WebParticles: Developing and Using Web User Controls WebParts in Microsoft Office SharePoint Server 2007" . In the original post, the web part DLLs are deployed in the GAC. During the development period, this could become a bit of a pain as you will be doing numerous compile, deploy then test cycles. Putting the DLLs in the _app_bin folder of the SharePoint web application makes things a bit easier. Make sure the web part class that load the user control has the GUID attribute and the constructor sets the export mode to all. Figure 1 - The web part class 2. Add the AllowPartiallyTrustedCallers Attribute to the AssemblyInfo.cs file of the web part project and all other DLL projects it is referencing. Figure 2 - Marking the assembly with AllowPartiallyTrustedCallers attribute 3. Copy all the DLLs from the bin folder of the web part...
Announcing the AdventureWorks OData Feed sample
Update – Removing Built-in Applications from Windows 8 In October last year I published a script that is designed to remove the built-in Windows 8 applications when creating a Windows 8 image. After a reading some of the comments in that blog post I decided to create a new version of the script that is simpler to use. The new script removes the need to know the full name for the app and the different names for each architecture. I am sure you will agree that this name - Microsoft.Bing – is much easier to manage than this - Microsoft.Bing_1.2.0.137_x86__8wekyb3d8bbwe. The script below takes a simple list of Apps and then removes the provisioned package and the package that is installed for the Administrator. To adjust the script for your requirements simply update the $AppList comma separated list to include the Apps you want to remove. $AppsList = "Microsoft.Bing" , "Microsoft.BingFinance" , "Microsoft.BingMaps" , "Microsoft.Bing...
Comments
Post a Comment