Fabrice Romelard [MVP] Intranet – Extranet CTO SGS.

Slides:



Advertisements
Similar presentations
Jeffrey Snover Partner Architect Microsoft Corporation ES24.
Advertisements

$$ Idea Updatable help system Method overload discovery HelpUri attribute support HelpFile property on FunctionInfo Simplified Where and.
Microsoft PowerShell Tom Roeder CS fa. Motivation.NET as a platform shell web server database access Native access to resources eaiser to manage.
MGT305 Windows PowerShell Next Generation Command Line Scripting Jeffrey Snover & Leonard Chung Windows Enterprise Management Division.
DEV392: Extending SharePoint Products And Technologies Through Web Parts And ASP.NET Clint Covington, Program Manager Data And Developer Services - Office.
Windows Server “Longhorn” RDP Airlift. Managing AD with PowerShell; Creating custom administrative consoles Dmitry Sotnikov CTO, Windows Management Quest.
Name Fabrice Romelard [MVP] SGS – Intranet & Extranet CTO Use SharePoint data in SQL Server 2008 R2 Reporting Services.
Fabrice Romelard Intranet/Extranet Chief Technical Officer.
James Boother Blog: INTRODUCTION TO POWERSHELL.
dev311 matt winkler – technical evangelist wf
27. to 28. March 2007 | Geneva, Switzerland. Fabrice Romelard ilem SA Level 200.
Daniel Petri MVP, Microsoft Infrastructure Manager John Bryce Training November 2007.
 Jeffrey Snover Partner Architect Microsoft Corporation.
Welcome Course 20410B Module 0: Introduction Audience
Jeffrey Snover Distinguished Engineer Microsoft Session Code: SRV312.
System Center 2012 R2 Windows Azure Pack Service Management Automation 101.
Module 16: Software Maintenance Using Windows Server Update Services.
Deploying and Managing Windows Server 2012
Presenters: Winfred Wangeci Jignash Reddy.  It is Microsoft's new task-based command- line shell and scripting language designed especially for system.
MS WINDOWS POWER SHELL CSE 535 Operating Systems.
SQL Server Integration Services (SSIS) Presented by Tarek Ghazali IT Technical Specialist Microsoft SQL Server (MVP) Microsoft Certified Technology Specialist.
Session 1 - Introduction and Data Access Layer
Meir Botner David Ben-David. Project Goal Build a messenger that allows a customer to communicate with a service provider for a fee.
©Kwan Sai Kit, All Rights Reserved Windows Small Business Server 2003 Features.
Datacenter X Datacenter Y ….com Contoso.com Exchange Labs ACME.com Ops NK App user Finance HR Sales Purchase Fabrikam Enterprises.
Microsoft ® Official Course Module XA Using Windows PowerShell ®
PowerShell Basics. o PowerShell is a great way to manipulate server and/or workstation components o It’s geared toward system administrators by creating.
Appendix A Starting Out with Windows PowerShell™ 2.0.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
Phone: Mega AS Consulting Ltd © 2007  CAT – the problem & the solution  Using the CAT - Administrator  Mega.
Section 6: Using Windows PowerShell to Manage Group Policy Introducing Windows PowerShell Windows PowerShell Library for Group Policy Windows PowerShell-Based.
December, 21, 2010 Bartek Bielawski Sr IT Site Services Specialist Warsaw, Poland.
Introduction to Windows PowerShell DANIEL HIBBERT PRIMER FIELD ENGINEER DMVMUG User Conference 2013 – Reston, VA.
Good Morning and Thank You!.  Have some Fun!  Learn at least one thing new!  Make myself available to you So please …  Ask questions and enjoy!
Mesquite Information Technologies innovative technology (858) or Skype Claude.Nikula.
Managing Windows Servers with PowerShell V2 James O’Neill: Evangelist, Microsoft UK Richard Siddaway MVP.
PowerShell For SharePoint Developers Neil Iversen Inetium
Ed Wilson, MCSE, MCSD Microsoft Scripting Guy Microsoft Session Code: WCL314.
Virtual techdays INDIA │ 9-11 February 2011 Monitoring and managing remote Windows 7 desktops with Windows PowerShell Ravikanth C │ Dell Inc.
Corey Hynes HynesITe, Inc Session Code: SRV317 Objectives Let you walk out of here, being able to run a script against an OU of computers, to make some.
Windows PowerShell Introduction 1 Morgan Simonsen Ementor.
MSG331 Exchange Server 2000/2003 Software Development Kit Susan Hill Lead Programmer Writer Microsoft Corporation.
POWERSHELL BASICS. BACKGROUND  Powershell is a task automation and scripting language based off the.NET framework  It provides the user full access.
 It is Microsoft's new task-based command- line shell and scripting language designed especially for system administration.  It helps Information Technology.
Windows PowerShell. What is Windows PowerShell? A command-line interface (CLI) A new way of developing Windows and other products to be more manageable.
Automating SharePoint 2010 administration tasks with Power Shell Toni Frankola SharePoint MVP, Croatia
Phil Pennington, Sr. Developer Evangelist, Microsoft Christian Saborio, Chief Software Architect, Scorpiotek Solutions SESSION CODE: WSV329.
Module 14: Advanced Topics and Troubleshooting. Microsoft ® Windows ® Small Business Server (SBS) 2008 Management Console (Advanced Mode) Managing Windows.
POWERSHELL ABOVE AND BEYOND: GUIS, WORKFLOWS, AND MORE Dean Corcoran Partner Service Account Manager (Cloud) – MCT – MCITP:EA Microsoft Australia SESSION.
Ravikanth C.
A Detailed Introduction To Visual Studio.NET CRB Tech ReviewsCRB Tech Reviews introduces you to the world of Visual.
SharePoint Online and PowerShell?
PowerShell 5 & Windows 10. What are we covering today? What is PowerShell? Why is PowerShell important? Some simple demos on Windows 10.
Start-SPPowerShell – Introduction to PowerShell for SharePoint Admins and Developers Paul BAker.
From SharePoint to Office 365 Development
How to be a SharePoint Developer
PowerShell Where we are, where we‘re going
Windows Server 8 beta og Windows PowerShell 3.0
PowerShell 2.0 Remoting Ravikanth C.
Introduction to PowerShell
Getting Started with the Data ONTAP PowerShell Toolkit
Introduction to PowerShell
SharePoint Saturday Omaha April 2016
Visio Professional 2007 & BI Data
Web Development Using ASP .NET
Tech Ed North America /28/2018 7:06 PM Required Slide
PowerShell Best Practices for SQL DBA’s
Grow Your Script From Simple to Module
Mark Quirk Head of Technology Developer & Platform Group
Presentation transcript:

Fabrice Romelard [MVP] Intranet – Extranet CTO SGS

MVP since 2003 ASP.NET SQL Server SharePoint since 2008 French communities member ASP-PHP Codes Sources GUSS SharePoint Expert, SQL Server DBA and.NET developer Coworkers SGS at Geneva (Suisse)

Who know PowerShell ? Who know SharePoint ?

What’s SGS ? What’s PowerShell ? What’s New in PowerShell V2 PowerShell and SharePoint

Founded in Rouen in 1878, under the name of Goldstück, Hainzé & Co. First registration as Société Générale de Surveillance in Geneva in 1919 Growth by agglomerations of various companies which until 2002 had great degree of autonomy Listed publicly in 1985 Single share structure introduced in 2001 Four significant shareholder groups Famille A. Von Finck IFIL investment Allianz SE FMR Corp

Inspection Verification Testing Certification

More than 50'000 employees Europe, Middle East & Africa: 23’000 employees Americas: 11’300 employees Asia/Pacific: 15’700 employees A network of over 1’000 offices & laboratories

AGRICULTURAL SERVICES MINERALS SERVICES OIL, GAS & CHEMICALS SERVICES AUTOMOTIVE SERVICES LIFE SCIENCE SERVICES INDUSTRIAL SERVICES SYSTEMS & SERVICES CERTIFICATION GOVERNMENTS AND INSTITUTIONS SERVICES

What’s SGS ? What’s PowerShell ? What’s New in PowerShell V2 PowerShell and SharePoint

As interactive and composable as BASH/KSH As programmatic as Perl/Python/Ruby As production oriented as AS400 CL/VMS DCL Allows access to data stores as easy to access as filesystem

Automation Frameworks Cmdlets In-Proc, Local, Remote In-Proc, Local, Remote Runtime Engines Automation Platform (API) ScriptingLanguage Type Normalizers ProvidersEvents, Jobs, Transactions Shells, ISEs, GUI s, Applications Universal Interactive or programmatic Wide range of OSes Local or Remote Single or Multi Machine Synch or Asynch Wide range of authentication mechanisms.NET, native code, COM, WMI, ADSI, XML, ADO, WebServices, WSMAN, etc Simple scripting to systems programming Powered by a strong community

Have better solution than standard « cmd.exe » (Evolution of MS-DOS) Replace Perl, KixStart or VBScript scripts, for execute simple tasks PowerShell : Object Oriented Can use.Net objects Give many command

In classical environment, command execution results in text In PowerShell each result is object. We can use also the attributes and methods

.Net powered Can call WSH, COM, and WMI objects with.Net objects Many Commandlets Standard in commands and parameters

Version 1.0 Pre-requisites : Framework.Net 2.0 Available for: Windows Server 2008 A feature Not available in « Server Core » x86 x64 IA64 Windows Server 2003 SP1 An update between SP1 and SP2 (KB926139, 140, 141) To download x86 x64 IA64 Windows Vista Update (KB928439) To download x86 x64 Windows XP SP2 Need an update (KB926139, 140, 141) To download x86 x64

PowerShell commands named « cmdlets » (ie: command-applets). One verb and a name with a dash (-), Generic verb list (Get, Set, Add, Remove, etc.) with diferent name like Path, Variable, Item, Object etc. Lot of name possible for commands

Diferent solutions for use parameters get-command -Name [string] -Type [CommandTypes] -Verb [string] -Noun [string] Use “” if parameter have a space or special char

First of all: « Get-Command ». For help: Get-Help with command. More help on command: « Get-Help Get-Command –detailed » with some examples « Get-Help Get-Command –full » with all technical informations

Command « Short Name» Alias «my_cmd» for the command « very-long- command-to-write». Help shell Unix or cmd.exe users with their uses … ls, more, pwd, etc. ls is the command alias for Get-ChildItem which shows the file or folder list.

A PowerShell variable is define by the prefix $ with the name and can receive value We can create the named variable $current- process and store the active process list $current_process = Get-Process

Action between commands PowerShell built for transition data between commands without change (more text transform) Get-Process | where { $_.handlecount -gt 400 } | Format-List

Condition in PowerShell, we can use operators If, ElseIf and Else $current_process = Get-Process If ($current_process.count -lt 50) { Write-Host « Low server load"; } Elseif (($current_process.count -ge 50) -and ($current_process.count -lt 80)) { Write-Host « Middle server load"; } Else { Write-Host « High server load"; }

We can create loop in PowerShell as While, Do While, For or Foreach. $var = 1 // One variable set to 1 while ($var -le 50) {$var; $var += 1} // while the value is not equal to 50, we add 1 for ($var = 1; $var -le 50; $i++) // {$var} // each steps we show the variable value

WMI objects Include in PowerShell in standard, no creation need Get-WmiObject –list.NET and COM objects Create a new object for a variable PS C:\> $xls = New-Object -ComObject Excel.Application We can use the methods and properties

Basic Scripts for Services and file management

What’s SGS ? What’s PowerShell ? What’s New in PowerShell V2 ? PowerShell and SharePoint

Reduce the cost and effort to: Use PowerShell Get, learn, share scripts Layer applications on PowerShell GUI, web, workflow, etc. Manage anything/everything Servers, clients, distributed systems, applications, web services, cloud services, raw HW, other OSes, everything Using any and all mechanisms (WMI,.Net, native code, web services, WSMAN)

Microsoft.NET Framework 2.0 Windows PowerShell remoting et background jobs needs WinRM 2.0 CTP3 : Only for Vista SP1 and W2008 Windows PowerShell Integrated Scripting Environment (ISE) and Out-GridView cmdlet needs Microsoft.NET Framework 3.5 SP1

Windows PowerShell Remoting 1:1 et 1:plusieurs Background Jobs Advanced Functions Modules Transactions

Script Debugging Nouvelles Cmdlets Windows PowerShell Integrated Scripting Environment (ISE) Nouveaux opérateurs Splatting Split Join

V1V2 DeveloperCmdlets and/or providers Help PowerShell cmdlets Transaction support PowerShell CLI & API Rich language w/access to com, wmi,.Net, adsi, xml & ado Utilities to manipulate, format, import/export 129 Cmdlets Web service & workflow activities Richer language w/access to web services, unmanaged code, wsman Richer utilities including eventing, job control, remote execution 241 Cmdlets Graphical ISE to create/debug scripts UsersSimple ad hoc scripts Sophisticated production scripting Systems programming Across multiple machines Community Write and share scripts Write and Share Modules V1 Scripts and Cmdlets run on PowerShell V2

Management initiative driven by DMTF Platform independent, interoperable & industry standard management solution CIM based standards for Server and Desktop management WS-Management (WSMAN) IT Console Managed Platforms WSMAN

Power control and boot control HW/ SW inventory Alerts and lifecycle events Config/manage BIOS Software and Firmware update Health monitoring

Power Off Command Invoke-WSManAction -CN $svr -cred $cred -port ` -Auth digest CIM_ComputerSystem ` –Action RequestStateChange ` ` Chassis Class Get-WSManInstance -CN $svr -cred $cred -port Auth digest - enum CIM_Chassis Chip Class Get-WSManInstance –CN $srv -cred $cred -port Auth digest - enum CIM_Chip Power On Command Invoke-WSManAction -CN $svr -cred $cred -port ` -Auth digest CIM_ComputerSystem ` –Action RequestStateChange ` `

Remote WMI Remote Command/Script Execution Remote Background Jobs Remote Interactive Session

-ComputerName # txt format list -Throttle # fix parallel session number -AsJob # execut in background PS> gwmi -CN (cat servers.txt) Win32_Bios -Throttle 64 | Select __Server, Name, Manufacturer, Version | ConvertTo-Html > BiosInventory.htm PS> $job = gwmi -CN (cat servers.txt) Win32_Bios -Throttle 64 –AsJob PS> Wait-job $j # or go do something else PS> Receive-Job $j | Select __Server, Name, Manufacturer, Version | ConvertTo-Html > BiosInventory.htm

xxxxx

What’s SGS ? What’s PowerShell ? What’s New in PowerShell V2 ? PowerShell and SharePoint

Load the SharePoint DLL [System.Reflection.Assembly]::LoadWithPartialName("Microsoft.S harePoint") > $null Set the variable $site = new-object Microsoft.SharePoint.SPSite(“ Use the MSDN site as the.NET SharePoint Development

Scripts for SharePoint management

Technical Blog Online Articles SharePoint Management PowerShell scripts PowerShell Blogs

14 – 15 avril 2010, CICG

Classic Sponsoring Partners Premium Sponsoring Partners