JDM

Informatique


Ce document réuni un ensemble d’informations, Manip et autre tips concernant la gestion / Maintenance des postes utilisateur et la gestion maintenance des parcs informatiques.


Cours et connaissances génériques

  1. Microsoft Azure [8] : Liste de Webinar en français sur l’utilisation et l’administration d’Azure

  2. Les Expressions Régulières (RegEx [9]) : Une rubrique spéciale RegEx a été créer dans le journal de manip

  3. Microsoft Virtual Academy [10] : Cours en ligne gratuis dispenser par microsoft

  4. VIM / VI [11] : une rubrique spéciale VIM a été créer dans le journal de manip

  5. Logical Unit Number (LUN) [1]

  6. Maximum Transmission Unit (MTU) [2]

  7. Server Message Block Protocol (SMB protocol) [3]

LUN

In computer storage, a logical unit number, or LUN, is a number used to identify a logical unit, which is a device addressed by the SCSI protocol or by Storage Area Network protocols that encapsulate SCSI, such as Fibre Channel or iSCSI.

A LUN may be used with any device which supports read/write operations, such as a tape drive, but is most often used to refer to a logical disk as created on a SAN. Though not technically correct, the term « LUN » is often also used to refer to the logical disk itself.

MTU

Dans les réseaux, Maximum Transmission Unit (MTU) [2] est une mesure représentant le plus grand paquet de données qu’un appareil connecté au réseau acceptera. Imaginez cette mesure comme une hauteur limitée dans les voies souterraines ou les tunnels : les voitures et les camions qui dépassent la hauteur limitée ne peuvent pas passer, tout comme les paquets qui dépassent le MTU d’un réseau ne peuvent pas passer par ce réseau.

Cependant, contrairement aux voitures et aux camions, les paquets de données qui dépassent le MTU sont fragmentés en plus petites parties pour pouvoir passer. Ce processus est appelé fragmentation. Les paquets fragmentés sont réassemblés une fois arrivés à destination.

Le MTU est mesurée en octets - un « octet » est égal à 8 bits d’information, c’est-à-dire 8 uns et zéros. 1 500 octets est la taille maximale du MTU.

N.B : Il est possible d’autoriser l’utilisation de paquet de 9000 octets en activant le Jumbo Frame. Le jumbo devra alors être autorisé / Activé sur tous les equipements devant recevoir les paquets envoyés.


Protocoles

iSCSI

Liens_WEB:

iSCSI is an acronym that stands for Internet Small Computer System Interface. It is a storage area networking (SAN) protocol used to send block storage from storage arrays or devices to client computers that aren’t directly connected to those devices.

iSCSI Targets and iSCSI Initiators

Storage = Taget client = Initiator

An iSCSI storage area network consists of iSCSI targets on storage array controllers and iSCSI initiators on storage clients. These targets and initiators are used by the iSCSI protocol to connect storage to clients and are represented by a unique name called the iSCSI Qualified Name or IQN.

On the client side, the initiator is linked to the target.

Once the client initiators are configured, an iSCSI LUN (Logical Unit Number) is created on the storage device and is assigned to an initiator group or client definition. At this point, assuming the target and initiator are on the same IP network, the client may be able to automatically discover the target. Once the initiator is connected to the target, the iSCSI LUN at that target IQN is available for use.

iSCSI LUNs are configured and used the same as any other block storage by the client operating system.

SMB

SMB - Server Message Bloc protocol is a client server communication used for sharing acces to files, printers, serial ports and other resources on a network.

Servers make file systems and other resources (printers, named pipes, APIs) available to clients on the network. Client computers may have their own hard disks, but they also want access to the shared file systems and printers on the servers.

The SMB protocol is known as a response-request protocol, meaning that it transmits multiple messages between the client and server to establish a connection. Clients connect to servers using TCP/IP (actually NetBIOS over TCP/IP as specified in RFC1001 and RFC1002), NetBEUI or IPX/SPX.

Once they have established a connection, clients can then send commands (SMBs) to the server that allow them to access shares, open files, read and write files, and generally do all the sort of things that you want to do with a file system. However, in the case of SMB, these things are done over the network.

TELNET

Telnet is an application protocol which allows you, with the use of a telnet client, to connect to and execute commands on a remote machine that’s hosting a telnet server.

The telnet client will establish a connection with the server. The client will then become a virtual terminal- allowing you to interact with the remote host.

How does Telnet work? The user connects to the server by using the Telnet protocol, which means entering « telnet » into a command prompt. The user then executes commands on the server by using specific Telnet commands in the Telnet prompt. You can connect to a telnet server with the following syntax: « telnet [ip] [port] »

Replacement Telnet sends all messages in clear text and has no specific security mechanisms. Thus, in many applications and services, Telnet has been replaced by SSH in most implementations.


Matériel

Information pour la gestion et maintenance des matériel

Trouver le numéro de série d’un poste / serveur en CLI

wmic bios get serialnumber

Vérifier les garantie constructeur


Poste de travail

Toutes les informations concernant l’utilisation et la maintenance des postes utilisateurs.

Lancer la restauration système depuis windows

L’utilitaire de restauration système se nomme :

rstrui.exe

Nettoyer / Réparer

Liens_Web:
  • Medicat [14] : Un bon remplaçant de Hiren” Boot CD

Forcer la suppression d’une partition

Liens_Web:
  1. dispart

    Depuis une invite de command Administrateur

    c:\>diskpart
    DISKPART>rescan
    DISKPART>list disk
    DISKPART>slelect disk x
    # x = numéro du disque à effacer, attention à ne pas se tromper
    DISKPART>list partition
    DISKPART>select partition x
    # x = numéro de la partition à effacer, attention à ne pas se tromper
    DISKPART>delete partition override
    

Ajouter un élément dans le menu contextuel

Excel

Colorer une ligne sur deux dans un tableau Excel

Liens_Web:
  1. La commande à saisir pour calculer une les lignes pair :

    =MOD(LIGNE() ;2)
    
  2. Pour les lignes impair :

    =NON(MOD(LIGNE() ;2))
    

SysAdmin

Ensemble d’informations relative à l’administration Système

Sysinternals

Liens_Web:
  • Sysinternals pack [20]: Ensemble d’utilitaire pour l’administration et la gestion de parc informatique.

ex:
  • Disk2vhd

  • AdRestore

  • Whois

  • BGinfo

  • etc …

Exchange

Renouveler un certificats sur Exchange 2010

Exporter en CSV la taille et le nombre d’item des BAL

# Dans la console exchange PS

Get-MailboxStatistics -server [nom_du_serveur] | Sort-Object TotalItemSize -Descending | select DisplayName, TotalItemSize, ItemCount | export-csv -Path "[chemin_et_nom_du_fichiers.csv]" -Delimiter ";" -Encoding "Default"

WSUS

Libération de l’espace disque sur le serveur WSUS

Liens_Web:
  • Nettoyage WSUS [22] : description simple (et en Français) pour l’utilisation de l’assistant de nettoyage WSUS.

Hyper-V

Sysprep

Configurer un VHD Sysprep
Liens_Web:
  1. Installer tous les éléments nécessaires et faire les MAJ (on peut aussi intégrer des fonctionnalité)

  2. Executer la commande Syprep

    C:\Windows\System32\Sysprep.exe /Generalize /OOBE /Shutdown
    
  3. Copier le VHD “sysprepé”

    ex:
    Model_VHD
    
Mettre à jour une image VHD
Liens_Web:
  • UPD SysprepImg [24] : Script permettant de mettre à jour une image VHD sans devoir l’associer à une VM

  • ex UPD SysprepImg [25] : Exemple d’utilisation du script “Update-SysprepImage.ps1”

Check point (anciennement nommés Snapshot)

Liens_Web:
/!\Attention/!\:

L’application d’un point de contrôle ne le supprime pas

Réplication Hyper-V en workgroup

Liens_Web:

CLI : CMD et Powershell

Lister les rôles FSMO

Liens_Web:
# en CMD : Lister tous les rôles d'un coup
Netdom Query FSMO
# En Powershell :
Get-ADDomainController -Filter * | Select-Object Name, Domain, Forest, OperationMasterRoles | Where-Object {$_.OperationMasterRoles} | Ft -AutoSize

Installer le module PowerShell ActiveDirectory sous Windows 10

Liens_Web:

Identifier les PC qui ne se sont pas connecter au domaine depuis au moins 180 Jours

import-module ActiveDirectory
$vdate = (Get-Date).adddays(-180)
Get-ADComputer -filter {(Enabled -eq "True") -and (LastLogonDate -le $vdate)} -property * | ft LastLogonDate, CN
    # applique un filtre sur les élément qui ne sont pas désactivé et qui ne
    # se sont pas connecter de puis au moins 180 Jours

Pour ne pas filtrer le résultat et voir toutes les propriété

Get-ADComputer -filter * -property *
    # N.B : Fonctionne aussi avec get-ADUser

Identifier les comptes utilisateurs qui ne se sont pas connecter au domaine depuis au moins 180 Jours

import-module ActiveDirectory
$vdate = (Get-Date).adddays(-180)
Get-ADuser -filter {(Enabled -eq "True") -and (LastLogonDate -le $vdate)} -property * | ft LastLogonDate, CanonicalName
    # applique un filtre sur les élément qui ne sont pas désactivé et qui ne
    # se sont pas connécter de puis au moins 180 Jours

Connaitre la date du dernier démarrage d’un serveur

Get-CimInstance -ClassName Win32_OperatingSystem | Select CSName, LastBootUpTime
    # Windows2012 r2 et +

# ou :

$LastBootTime = (Get-WmiObject win32_Operatingsystem).LastBootUpTime
[System.Management.ManagementDateTimeConverter]::ToDateTime($LastBootTime)

Se connecter à Exchange

$Credentials = Get-Credential
$ExSession = New-PSSession –ConfigurationName Microsoft.Exchange –ConnectionUri ‘http://SRV-MAIL.poree.local/PowerShell/?SerializationLevel=Full’ -Credential $Credentials –Authentication Kerberos
Import-PSSession $ExSession
# ...
Remove-PSSession $ExSession

Connaitre le niveau fonctionnel Active Directory

(Get-ADDomain).DomainMode

Service DHCP

Replication et bascullement DHCP entre deux serveurs


Webography