Windows PC and server {from XP and 2003}, Command line

 

 

 

 

Update Windows Server 2012

wuauclt /detectnow

wuauclt /updatenow

wuauclt.exe /reportnow

 

Unicode characters on command prompt

C:\>REG ADD HKCU\Console /v CodePage /t REG_DWORD /d 0xfde9

 

Execute just for one time and your code-page on CMD will be changed to 65001 forever.

 

 

Using DISM and SFC for system repair

For check:

C:\>dism /online /cleanup-image /checkhealth

 

Il error occur are repaiable:

C:\> dism /online /cleanup-image /restorehealth

 

Reducing size of WinSxS

Checking WinSxS folder size

C:\> dism /Online /Cleanup-Image /AnalyzeComponentStore

 

Cleaning up WinSxS folder

C:\dism /online /Cleanup-Image /StartComponentCleanup

 

Windows Server (2019, 2016, 2012 / R2, 2008 / R2), command line admin tools

 

·         adfs.msc : Active Directory Federation Services

·         adrmsadmin.msc : Active Directory Rights Management Services

·         adsiedit.msc : Editeur Active Directory Services Interfaces

·         azman.msc : Gestionnaire d’autorisations

·         certlm.msc : Certificats de l’Ordinateur local

·         certmgr.msc : Gestionnaire de certificats

·         certsrv.msc : Autorité de certification

·         certtmpl.msc : Console de modèles de certificat

·         cluadmin.msc : Gestionnaire de cluster de basculement

·         comexp.msc : Services de composants

·         compmgmt.msc : Gestion de l’ordinateur

·         devmgmt.msc : Gestionnaire de périphériques

·         dhcpmgmt.msc : Gestionnaire DHCP

·         diskmgmt.msc : Gestion des disques

·         dsa.msc : Utilisateurs et ordinateurs Active Directory

·         dfsmgmt.msc : Gestion des DFS

·         dnsmgmt.msc : Gestionnaire DNS

·         domain.msc : Domaines et approbations Active Directory

·         dssite.msc : Sites et services Active Directory

·         eventvwr.msc : Observateur d’événements.

·         fsmgmt.msc : Dossiers partagés

·         fxsmgmt.msc : Gestionnaire de services de télécopie Microsoft

·         fsrm.msc : Gestionnaire de ressources du serveur de fichiers

·         gpedit.msc : Éditeur de stratégies de groupe local

·         gpmc.msc : Console de gestion des stratégies de groupe

·         gpme.msc : Rechercher l’objet de stratégie de groupe

·         gptedit.msc : Éditeur d’objet de stratégie de groupe Starter

·         hcscfg.msc : Autorité d’inscription de l’intégrité

·         idmumgmt.msc : Gestionnaire d’identités

·         iis.msc : Internet Information Services Manager

·         lsdiag.msc : RD Licensing Diagnoser

·         lusrmgr.msc : Utilisateurs et groupes locaux

·         napclcfg.msc : Configuration du client NAP

·         nfsmgmt.msc : Gestion NFS

·         nps.msc : Serveur de stratégies réseau

·         ocsp.msc : Répondeur en ligne

·         perfmon.msc : Surveillance des performances

·         pkiview.msc : Enterprise PKI

·         printmanagement.msc : Gestion de l’impression (imprimantes partagées)

·         rrasmgmt.msc : Routage et accès à distance

·         rsop.msc : Ensemble de stratégies résultantes

·         scanmanagement.msc : Gestion de la numérisation (scanner)

·         secpol.msc : Stratégie de sécurité locale

·         services.msc : Services

·         schmmgmt.msc : Active Directory Schema

·         storagemgmt.msc : Gestion du partage et du stockage

·         tapimgmt.msc : Téléphonie

·         taskschd.msc : Planificateur de tâches

·         tpm.msc : Gestion du module de plate:forme sécurisée

·         tsgateway.msc : Gestionnaire de passerelles RD

·         wbadmin.msc : Sauvegarde du serveur Windows

·         winsmgmt.msc : Gestion WINS

·         wlbbackup.msc : Sauvegarde locale

·         wf.msc : Pare:feu Windows avec sécurité avancée

·         wmimgmt.msc : Contrôle WMI

·         wsus.msc : Services Windows Server Update

 

 

 

Checksum (md5, sha1, sha2(256, 384, 512)

From powershell:

certutil -hashfile "VMware-VMvisor-Installer-6.7.0.iso" md5

 

 

SAN Bay generat log file

C:\> ftp10.10.10.41

After authentication

get logs Storage2_A_20130126.zip

 

Handle installed package

dism /online  /get-packages /format:table                           // list of installed package

dism /online  /remove-package / /PackageName:[The_Name_Of_Package_Listed]          // Remove a installed package

 

Export AD’s user list

csvde -r objectClass=User -f useronly.csv

 

BitLocker

PS C:\> Disable-BitLocker -MountPoint "C:"                                                  // from Powershell

Manage-BDE -Off "C:"                                                                // from DOS disable the protection

Manage-BDE –Status "C:"                                                           // from DOS show status

Get-BitLockerVolume -MountPoint "C:"                                    // form DOS show decryptage status

 

Initialize LAN adapter (Win10)

C:\>netsh int ip reset
C:\>
netsh winsock reset

 

Screenshot automatic

C:\>psr.exe

 

System Information

Text mode => C:\>systeminfo

Graphic mode => C:\>msinfo32

C:\>getmac /S remotepc.domain.com  /u administrator /p adminpassword

 

 

Win10/update OS

Wuauclt.exe /updatenow

 

Long Paths Enabled

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled

 

By GPO enable long path names windows 7

gpedit.msc : Stratégie Ordinateur local > Configuration ordinateur > Modèles d’administration > Système > Systèmes de fichiers > NTFS

 

 

Don’t install involuntary Win10 : disable -> *** WIN10 KB 3035583 ***

 

 

{10} repair system (System File Checker)

C:\>sfc /scannow / scan and repair the dommaged file

 

C:\Dism /Online /Cleanup-Image /RestoreHealth / maintenance of deploiyment image

Powershell :> Get-AppXPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register "$($_.InstallLocation)\AppXManifest.xml"}

 

 

Windows Remote support

C:\>msra

 

Uninstall KBwindows 10 from Windows 7

C:\>wusa /uninstall /kb:3035583

 

Synchronize files to another directory

To sync files from one directory to another you can use xcopy like this:

xcopy c:\temp\*.* c:\temp2\ /D /I /E /F /Y /H /R

 

To sync with a remote server can just use a server address and directory name as the destination directory:

xcopy c:\temp\*.* \\srv1\temp2\  /D /I /E /F /Y /H /R

 

/D - Copies files changed on or after the specified date.

If no date is given, copies only those files whose source time is newer than the destination time.

/I - If destination does not exist and copying more than one file assumes that destination must be a directory.

/E - Copies directories and subdirectories, including empty ones.

/Y - Supresses prompting to confirm you want to overwrite and existing destination file.

/H - Copies hidden and system files also.

/R - Overwrites read only files.

 

 

Clear PWD admin without third party software

Run WINPE from usb key

ren c:\windows\system32\sethc.exe sethc_toto.exe

copy c:\windows\system32\cmd.exe sethc.exe

From Ctrl+Alt+Del screen press Shift five times

In shell windows do

Net user admin * [Enter] [Enter]

 

Rebuild the boot sector

Boot to WINPE then run the following:

bcdedit /export C:\BCD_Backup

C:

cd boot

attrib bcd -s -h -r

ren c:\boot\bcd bcd.old

Bootrec /RebuildBcd

 

NIC Adapter (disable, enable)

wmic nic get name, index

wmic path win32_networkadapter where index=16 call disable (eg : “16” is wireless adapter)

wmic path win32_networkadapter where index=16 call enable

 

 

Repair the system files (System File Checker)

SFC /scannow

 

Tester the trust relationship between a workstation and domain

nltest /server:rpsrv12

C:\>nttest /dsgetdc:[ <DomainName>]  // Queries the Domain Name System (DNS) server for a list of domain controllers

 and their corresponding IP addresses. This parameter also contacts each domain controller to check for connectivity.

C:\>nltest /dclist:resoprint                          //create a list of domain controllers of the domain resoprint.fr

 

 

Cryptage services

sc config "bdesvc"  start= disabled                                // bdesvc=BitLocker Drive Encryption Service

sc config "bdesvc" obj= resoprint\mazdak password= test

 

sc config "efs"  start= disabled                                      // efs = Encrypting File System

sc config "efs" obj= resoprint\mazdak password= test

 

 

Recherche de fichier :

Les caractères génériques sont valables « * » et « ? »

 

tropicale ET île

tropicale OU île

tropicale SAUF île

attention : opérateurs doievent être e MAJUSCUL

 

System.filename:~<"pro"                                                                     fichiers commançant par « pro

System.filename:="pro"                                                                        fichiers correspond parfaitement

System.filename:~="pro"                                                                     fichiers contient « pro »

System.Kind :<>image                                            fichiers qui « n’est pas » image

                                                                                                             

System.DateModified : 25/05/2010                                 fichiers modifié à cette datte

System.DateModified : 2010                                       fichiers modifé à cette année

 

System.Author :~!"herbe"                                         fichiers dont le nom ne contien pas « herbe »

System.Keywords :"crépuscule"                                                            fichiers comportant le mot « crépuscule »

 

System.Size :<1 mo                                                                              fichier dont la taille est inférieur à 1mo

System.Size :>1 mo                                                                              fichier dont la taille est supérieur à 1mo

 

 

System.Author:"Charles Moore"                                                            fichier dont Auteur est Charles Moore

System.Author : Charles ET System.DateModified :>2009

 

 

Sans langage naturel

Avec langage naturel

System.Music.Artist : (Beethoven OU Mozart)

musique Beethoven ou Mozart

System.Kind : document System.Author : (Charles ET Durand)

documents Charles et Durand

Source  :Explorer/Folder Options/Tools/Search

 

 

                                                                                                 

                                                                                                 

xxxx

 

 

Image disk

From winpe :

dism /capture-image /compress:fast /capturedir:E:\ /imagefile g:\rppor011_w7_C /name:rppor011 - image windows 7 dd C 20150415"

 

 

Imprimante erreur 0x0000007e

pas besoin du correcif, il suffisait de supprimer la clé CopyFiles située dans:

HKEY_Local_Machine\System\CurrentControlSet\Control\Print\Printers\(nom de l'imprimante)\

 

 

Extract MSU file (exemple)

C:\tmp\>expand -f:* "Windows6.1-KB982728-x64.msu" c:\tmp\

 

 

Mail, send testing

telnet mail.theirdomain.com 25
ehlo mydomain.com
mail from:<
mazdak@zoho.com>
rcpt to:<
recipient@theirdomain.com>
data
This is a test, please do not respond
.
quit

 

 

Dell Vostro restore system

Ctrl+F9

 

Printer Cluster

cluadmin.msc / {Server.domain.local} /{Services et applications} / [SRV-IMPPS]/right-clic/Printers Manager => printmanagement.msc /from AD

 

 

GPO

Goupdate /force

Gpresult /r

 

Query AD

C:\>dsquery user -inactive 48

 

Disable cryptage identification

Gpedit.msc

GPO local / Local Policy / Security Options /

Client réseau Microsoft : communication signées numériquement (toujours) = Disable

Serveur réseau Microsoft : communication signees numériquement (toujours) = Disable

 

 

Printer Cluster 2008 R2

cluadmin.msc

printmanagement.msc

 

 

Liste of installed device drivers

driverquery.exe

 

Dismount a volume

fsutil fsinfo drives

fsutil volume dismount c:

fsutil volume diskfree c:

 

 

Query the dirty bit on drive C

fsutil dirty query c:

 

Creates a hard link between an existing file and a new file

fsutil hardlink create hl_test.txt test.txt

fsutil hardlink list test.txt

 

Create large size file

fsutil file createnew test2.txt 1555240870            // create a file in 1,5 Gb

 

 

Control Panel Command line

 

   Control panel tool             Command

   -----------------------------------------------------------------

   Accessibility Options          control access.cpl

   Add New Hardware               control sysdm.cpl add new hardware

   Add/Remove Programs            control appwiz.cpl

   Date/Time Properties           control timedate.cpl

   Display Properties             control desk.cpl

   FindFast                       control findfast.cpl

   Fonts Folder                   control fonts

   Internet Properties            control inetcpl.cpl

   Joystick Properties            control joy.cpl

   Keyboard Properties            control main.cpl keyboard

   Microsoft Exchange             control mlcfg32.cpl

      (or Windows Messaging)

   Microsoft Mail Post Office     control wgpocpl.cpl

   Modem Properties               control modem.cpl

   Mouse Properties               control main.cpl

   Multimedia Properties          control mmsys.cpl

   Network Properties             control netcpl.cpl

                                  NOTE: In Windows NT 4.0, Network

                                  properties is Ncpa.cpl, not Netcpl.cpl

   Password Properties            control password.cpl

   PC Card                        control main.cpl pc card (PCMCIA)

   Power Management (Windows 95)  control main.cpl power

   Power Management (Windows 98)  control powercfg.cpl

   Printers Folder                control printers

   Regional Settings              control intl.cpl

   Scanners and Cameras           control sticpl.cpl

   Sound Properties               control mmsys.cpl sounds

   System Properties              control sysdm.cpl

 

 

 

List of installed software in remote computer

wmic /node:192.168.5.106 /output:c:\softpsarfati.txt softwarefeature get caption,name,version,installdate

 

 

Time server, define

0.fr.pool.ntp.org 

w32tm /config /manualpeerlist:0.fr.pool.ntp.org  /syncfromflags:manual /update

w32tm /query /status

 

 

Printer in command-line

cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r IP_192.168.1.100 -h 192.168.1.100 -o raw -n 9100      /*   Add a port   */

cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnport.vbs -d -r IP_192.168.1.100                                              /*  Delete a port */

cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -l |findstr "port name"                     /*  list of ports */

 

LAN command-line

netsh interface ip set address LAN dhcp & netsh interface ip  set dns name=LAN dhcp

netsh interface ip set address LAN static 192.168.100.6 255.255.255.0 192.168.100.1    

netsh interface ip  set dns name=LAN static 194.2.0.20

netsh interface ip show config

netsh interface ip show ip

netsh interface ip show dns

netsh interface ip show config

 

netsh firewall opmode disable

netsh firewall opmode enable

 

Backup restore wireless profile

netsh wlan export profile {export all profile to 1 .XML file)

netsh wlan add profile filename=”nom_fichier”

 

 

Autologon (win7)

control userpasswords2

 

Eject USB

In command line : RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

 

diskpart

list volume

select volume 4 {4 is number of removable USB disk}

remove all dismount

exit

 

{if reinsert}

diskpart

list volume

select volume 4 {4 is number of removable USB disk}

assign

exit

 

 

Winpe (from usb/cdrom boot)

wpeutil shutdown

wpeutil reboot

 

wpeutil EnableFirewall / DisableFirewall

wpeutil SetMuiLanguage fr-FR

 

robocopy

 

 

Delete/ active c:\hyberfil.sys

C:\windows\system32\powercfg –h [off/on]

This command turn (off/on) or (disable/enable) hibernation and (delete/create) c:\hyberfil.sys

 

 

Disable/Enable Windows UAC

C:\Windows\System32\UserAccountControlSettings.exe

 

 

Robocopy

La racine de “WindowsImageBackup” est copiée sur la racine de “scan”.

robocopy d:\WindowsImageBackup c:\scan /e /s                                        copy sans droit, dates changes

robocopy d:\WindowsImageBackup c:\scan /e /s /copyall                           copy tout droit

robocopy d:\WindowsImageBackup c:\scan /e /s /dcopy:T                          timestamps ne changes pas

robocopy d:\WindowsImageBackup h: /e /copyall /z                                    reprend après la rupture du réseau

 

Active the Office 2010

C:\Program Files\Microsoft Office\Office14>cscript ospp.vbs /act

Or

C:\Program Files\Microsoft Office\Office14>cscript ospp.vbs /inpkey:VYBBJ-TRJPB-QFQRF-QFT4D-H3GVB

Application tracing

1.     sxstrace trace logfile:test.etl

2.     Launch the application

3.     From console window press enter

4.     Read it from eventvwr

 

Analyse the communication of computer

1.       netsh trace start capture=YES report=YES

2.     You then reproduced issue, and finished with command

3.       netsh trace stop

4.     4.lire le etl avec “Microsoft Network Monitor”

ou

1.     sxstrace trace -logfile:ErrApache.etl

2.     Lancer l’application qui pose de probème

3.     sxstrace stopetrace

4.     sxstrace parse -logfile:ErrApache.etl -outfile:ErrApache.txt

 

 

 

 

 

Add a PC in domain,  offline mode (W2008 R2 requiered) : (source : http://technet.microsoft.com/en-us/library/offline-domain-join-djoin-step-by-step(v=ws.10).aspx )

  1. Run cmd as administrator into AD server
  2.  djoin /provision /domain billis.local /machine port01 /savefile c:\AddPCIndomainBillis_Port01.txt
  3. Run cmd as administrator into Workstation
  4. djoin /requestODJ /loadfile c:\AddPCIndomainBillis_Port01.txt /windowspath %SystemRoot% /localos
  5. restart the workstation it is joined to the domain

 

 

To remove old updates from the WSUS database (Source : Microsoft http://technet.microsoft.com/en-us/library/bb432641.aspx )

  1. As a local administrator, access the distribution server.
  2. Stop the WSUS Web site in Internet Information Services (IIS). To do so, open IIS from Administrative Tools, navigate to the WSUS Administration Web site, right-click the Web site, and click Stop.
  3. Open a Command Prompt window and change folders to %drive%\Program Files\Update Services\Tools.
  4. Type the following:

wsusutil.exe deleteunneededrevisions

  1. After the command has completed successfully, restart the WSUS Administration Web site. To do so, right-click the Web site in IIS and click Start.

 

 

Define Default trusts

cd c:\windows\system32

   Takeown /f %windir%\winsxs\filemaps\* /a

   icacls %windir%\winsxs\filemaps\*.*  /grant "NT AUTHORITY\SYSTEM:(RX)"

   icacls %windir%\winsxs\filemaps\*.*  /grant "NT Service\trustedinstaller:(F)"

   icacls %windir%\winsxs\filemaps\*.*  /grant "BUILTIN\Users:(RX)"

 

Visualizer les writers de Windows

vssadmin list writers

show task list witth services

tasklist /svc

Repair boot sector (after deleting other OS is deleted from PC in Windows 7)

Insert DVD windows 7/choose "Repair Your Computer"/"Command Prompt"

"bootsect /nt60 sys" or "bootsect /nt60 all

 

Server Manager (w2008)

%SystemRoot%\system32\CompMgmtLauncher.exe     # graphic mode

%SystemRoot%\system32\ServerManagerCmd.exe      # text mode

 

Backup with ntbackup in 2008

Copy from :

Windows 2003 64-bit :\Windows\system32 : ntbackup.exe, ntmsapi.dll, and vssapi.dll

To:

Windows 2008 in a folder

And run ntbackup

 

Bascule beethween users’s session

C:\windows\system32\tscon 3 /password:*         # It demande password of resoprint\mazdak and bascule from rppot004\administrator(id:4) session to resoprint\mazdak session(id:3)

C:\windows\system32\runas /user:rppor004\administrator "tscon 4 /password:*" #bascule from “resoprint\mazdak” to “rpport004\administrator”

C:\windows\system32\tsdiscon 4                       # Close the current session for switch to another session

 

Ctrl+Alt+Del (Required in logon process without username, Windows 7)

1)In console (cmd) type C:\Windows\System32\netplwiz.exe

  Advanced tab/Click “Require users press Ctrl+Alt+Delete”

2) [HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System]DontDisplayLastUserName=1

 

Active NumLock in start

HKEY_USERS\.DEFAULT\ControlPanelKeyboard\InitialKeyboardIndicators

2          = active

0          = inactive

 

Activation by internet

Slmgr –rearm    Allow to rearm the activation time

slmgr –dti         #show the key needed for registration by phone/ communicate this to support (France : 0 805 11 02 35)

slmgr –atp        type the Key supplied by support

cscript C:\windows\system32\slmgr.vbs –ato     # allow to Active (register)

 

 

BACKUP/RESTORE

sdclt {in Vista}

wbadmin.exe {texte mode in Windows 2008}

wbadmin.msc {graphic mode in Windows 2008}

backup sys state : wbadmin start systemstatebackup -backuptarget:g:  -quiet  { backup os system stat envir : 12 Gb}

                            wbadmin start backup -backupTarget:f: -include:e:,d:\mountpoint,              (windows 7)

Restore state :{start server in recovery mode}

            wbadmin get versions

wbadmin start systemstaterecovery -version:06/10/2009-12:16 -backuptarget:g:

3 examples :

Scenario #1

·         Schedule backups of the folder d:\documents to the network location \\backupshare\backup1

·         Use the network credentials for the backup administrator Aaren Ekelund (aekel), who is a member of the domain CONTOSOEAST to authenticate access to the network share. Aaren’s password is $3hM9^5lp.

·         Run backups daily at 12:00 A.M. and 7:00 P.M.

wbadmin enable backup –addtarget:\\backupshare\backup1 –include: d:\documents –user:CONTOSOEAST\aekel –password:$3hM9^5lp –schedule:00:00,19:00

 

Scenario #2

·         Schedule backups of volume t: and folder d:\documents to the drive h:, but exclude the folder d:\documents\~tmp

·         Perform a full backup using the Volume Shadow Copy Service.

·         Run backups daily at 1:00 A.M.

wbadmin enable backup –addtarget:H: –include T:,D:\documents –exclude D:\documents\~tmp –vssfull –schedule:01:00

 

Scenario #3

·    Attention : At this time , a partial backup of volumes is not supported on  Windows 7!

wbadmin start backup -backuptarget:d:\bakup1 -include:c:\scan

·    A complet backup is supported in Windows 7

wbadmin start backup -backuptarget:d:\bakup1 -include:c:

 

 

 

 

 

BCDEDIT (boot sequence)

bcdedit /enum all /v

bcdedit /timeout 7

 

bcdedit /bootsequence {802d5e32-0784-11da-bd33-000476eba25f}

bcdedit /enum bootmgr   # correct default code

 

Amongst the entries for Windows Boot Manager is:

Default: {cbd971bf-b7b8-4885-951a-fa03044f5d71}   (Meaning Vista)

If you wanted to change it to an XP Boot Manager then type

bcdedit /default {466f5a88-0af2-4f76-9038-095b170dc21c}  (Meaning XP)

 

bcdedit /export "D:\BCD Backup\Bcd Backup"

bcdedit /import "D:\BCD Backup\Bcd Backup"

 

bcdedit /default {current}  # sets the current Windows as default value

bcdedit /set {legacy} Description “Windows XP Professional SP2”

 

Boot device information, Handle Manipulating

bcdedit.exe

 

Cache file, Empty

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\ClearPageFileAtShutdown\

Type 1

 

jobs,  Create, download or upload and monitor their progress

Bitsadmin /list

 

1-bitsadmin /create DownloadTools

2-bitsadmin /addfile DownloadTools ftp://ftp.astro.ch/pub/swisseph/programs/unzip.exe c:\tmp\unzip.exe

3-bitsadmin /resume DownloadTools      {active the job}

4-bitsadmin /complete DownloadTools   {complete the job} 

Or

bitsadmin /transfer myDownloadJob http://downloadsrv/10mb.zip  c:\10mb.zip

 

Process, Killing

wmic process where (ProcessID=5824) delete

or

wmic process where (name="calc.exe") delete

 

OS Update

wuapp.exe.

 

Restore system

rstrui.exe

 

Roles showing for DS serveur

ntdsutil

roles

connection

connect to server <servername>

q

select operation target

list roles for connected server

 

 

 

Tasks Scheduler

taskschd.msc.  {graphic}

schtasks.exe.  {text}

ex:      schtasks /run /tn \mazdak\showram

                                  schtasks /create /tn \mazdak\test /sc once /tr C:\windows\system32\calc.exe /st 21:56

Taskman

Taskmgr.exe  {graphic}

Tasklist.exe  {text}

Taskkill.exe {text}         

                                 

SECURITY

AccessChk                                                                                                                                                                    

AccessEnum

AuditPol

Icacls

{Malicous Software Removal Tool}

{Basline Security Analyze Tool}

{Security Assessment Tool}

{Threat Analysis & Modeling}

{Security Configuration Wizard}

{Entended Security Update Inventory Tool}

 

SendTo (Add a item)

shell:sendto

 

Windows 2008 Core’s Command

 

-Pour vérifier les paramètres TCP/IP actuels

 netsh interface ipv4 show interfaces

 

-Pour définir une adresse TCP/IP fixe

 netsh interface ipv4 set address name="<ID>" source=static address=<StaticIP> mask=<SubnetMask> gateway=<DefaultGateway>

 netsh interface ipv4 add dnsserver name="<ID>" address=<D#SIP> index=1 => pour ajouter des serveurs DNS

 

-Changer le nom du serveur

 netdom renamecomputer <ComputerName> /NewName:<NewComputerName>

 

-Joindre le serveur a un domaine

 netdom join <ComputerName> /domain:<DomainName> /userd:<User#ame> /password:*

 

-Changer le mot passe du serveur

 net user administrator *

 

-Configurer les mises à jour

 cscript C:\Windows\System32\Scregedit.wsf /au /v => interroger la configuration

 cscript C:\Windows\System32\Scregedit.wsf /au /1 => désactiver

 cscript C:\Windows\System32\Scregedit.wsf /au /4 => activer

 

-Ajouter un périphérique

 pnputil -i -a <driverinf> => <driverinf> est le chemin du pilote - le fichier .inf

 

-Administrer les drivers

 sc query type= driver => liste les drivers installés

 sc delete <service_name> => supprimer un driver

 

-Redémarrer le serveur

 shutdown /r /t 0 => le commit /t est le délai avant redémarrage du serveur

 

-Activer le Windows Remote Shell WRS

 WinRM quickconfig => confirmer Y à la question

 winrs -r:<ServerName> cmd => à lancer sur la machine distante

 

-Gestion des rôles du serveur

 oclist => lister les rôles installés

 start /w ocsetup DirectoryServices-ADAM-ServerCore => installer les Directory Services

 start /w ocsetup DirectoryServices-ADAM-ServerCore /uninstall => pour désinstaller le Directory Services

 start /w ocsetup DHCPServerCore => installer le service DHCP

 start /w ocsetup DNS-Server-Core-Role => installer le service DNS

 start /w ocsetup ROLE => installer un rôle - ROLE est le nom du services à installer

 

-Gestion des services

 sc config dhcpserver start= auto => configurer le service DHCP pour démarrer automatiquement

 net start dhcpserver => démarrer le service DHCP

 

-Gestion du l'heure

 Control timedate.cpl => configurer l'heure

 w32tm /config /update /syncfromflags:DOMAIN => synchroniser l'heure

for an external udate :

w32tm /config /update /manualpeerlist:fr.pool.ntp.org

net stop w32time && net start w32time

{Exemple serveur de temps : Meudon, France : Observatoire de Paris-Meudon ntp.obspm.fr }

 

 

 

Les Consoles MSC

azman.msc

certmgr.msc

ciadv.msc

comexp.msc

compmgmt.msc

devmgmt.msc

dfrg.msc

diskmgmt.msc

eventvwr.msc

fsmgmt.msc

gpedit.msc

gpmc.msc

ipsecure.msc

lusrmgr.msc

napclcfg.msc

ntmsmgr.msc

ntmsoprq.msc

perfmon.msc

printmanagement.msc

rsop.msc

secpol.msc

services.msc

taskschd.msc

tpm.msc

wf.msc

wmimgmt.msc

 

Control.exe

control.exe

control.exe color

control.exe date/time

control.exe international

control.exe mouse

control.exe keyboard

control.exe printers

control.exe fonts

control.exe folders

control.exe netware

control.exe telephony

control.exe admintools

control.exe schedtasks

control.exe netconnections

control.exe infrared

control.exe userpasswords

 

 

 

 

 

 

 

 

 

 

Troubleshooting

To resolve the wireless connection problem

 1) Click the Start button.

 2) Select All Programs > Accessories.

 3) Right click Command Prompt and click Run as administrator.

 4) Type regedit.exe and press enter.

 5) Go to the following location:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters

 6) Right click this entry and select New Dword.

 7) Rename the new entry ArpRetryCount (leave it set to 0 by default).

 8) Restart the computer.

 9) Reassociate with the SonicWALL. You should notice a successful connection.

 

 Disable IPV6