Vmware: Unterschied zwischen den Versionen

Aus SchnallIchNet
Wechseln zu: Navigation, Suche
(Clone System)
(SCCM Tasks)
Zeile 45: Zeile 45:
 
=== SCCM Tasks ===
 
=== SCCM Tasks ===
  
 +
<pre>
 
$scriptblock = {
 
$scriptblock = {
 
   net stop CCMEXEC
 
   net stop CCMEXEC
Zeile 52: Zeile 53:
 
   C:\ITutils\Setup\ClientHealth\ccmsetup.exe SMSSITECODE=ARI DNSSUFFIX=Arifleet.com
 
   C:\ITutils\Setup\ClientHealth\ccmsetup.exe SMSSITECODE=ARI DNSSUFFIX=Arifleet.com
 
}
 
}
 
+
</pre>
 
And then:
 
And then:
  
 +
<pre>
 
foreach( $vm in (get-vm *dev-v0001*).name ) {
 
foreach( $vm in (get-vm *dev-v0001*).name ) {
 
   echo "Trying $vm"
 
   echo "Trying $vm"
Zeile 60: Zeile 62:
 
   echo ""
 
   echo ""
 
}
 
}
 
+
</pre>
  
 
=== Winlogbeat Tasks ===
 
=== Winlogbeat Tasks ===

Version vom 10. Mai 2021, 08:53 Uhr


Clone System

1)	Shut down the VM
2)	Clone the VM
3)	Disconnect the NIC
4)	Bring up the VM
Win10)  Run uninstall.ps1 script below, to uninstall unprovisioned AppStore Apps
5)	Run sysprep /generalize
        cd %WINDIR%\system32\sysprep; ./sysprep /generalize
6)	Assign new workstation name / admin pw
7)      Run SCCM Tasks
8)      Run winlogbeat tasks
9)	Configure network / Connect NIC
10)     Join to domain

Uninstall.ps1

# Get the list of provisioned packages
$provisioned = Get-AppxProvisionedPackage -online

# Check each installed app
$count = 0

for ($i=1; $i -ile 2; $i++) {
  # Check each app (two loops just in case there are dependencies that can't be removed until the
  # main app is removed)
  Get-AppxPackage | ? {$_.SignatureKind -ne 'System'} | ForEach-Object {
    $current = $_
    $found = $provisioned | ? {$_.DisplayName -eq $current.Name -and $_.Version -eq $current.Version}
    if ($found.Count -eq 0)
    {
      Write-Host "$($current.Name) version $($current.Version) is not provisioned, removing."
      Remove-AppxPackage -Package $current.PackageFullName
      $count++
    }
  }
}

SCCM Tasks

$scriptblock = {
   net stop CCMEXEC
   del C:\Windows\SMSCFG.INI
   certutil -delstore SMS SMS
   C:\Windows\ccmsetup\ccmsetup.exe /uninstall
   C:\ITutils\Setup\ClientHealth\ccmsetup.exe SMSSITECODE=ARI DNSSUFFIX=Arifleet.com
}

And then:

foreach( $vm in (get-vm *dev-v0001*).name ) {
   echo "Trying $vm"
   Invoke-Command -ComputerName $vm -ScriptBlock $scriptblock
   echo ""
}

Winlogbeat Tasks

rm C:\ProgramData\winlogbeat\meta.json

ESXi upgrade

Get list of storage adapters

esxcli storage core adapter list

HBA Name  Driver      Link State  UID                                     Capabilities      
--------  ----------  ----------  --------------------------------------  ------------------
vmhba0    nhpsa       link-n/a    sas.50014380361bab70                                      
vmhba1    qlnativefc  link-up     fc.500143802318ab7b:500143802318ab7a    Data Integrity, Se
vmhba2    qlnativefc  link-up     fc.500143802318a82f:500143802318a82e    Data Integrity, Se
vmhba32   bnx2i       unbound     iscsi.vmhba32                           Second Level Lun I
vmhba33   bnx2i       unbound     iscsi.vmhba33                           Second Level Lun I
vmhba34   bnx2fc      link-down   fcoe.10003ca82a244d11:20003ca82a244d11  Second Level Lun I
vmhba35   bnx2fc      link-down   fcoe.10003ca82a244d15:20003ca82a244d15  Second Level Lun I

cat /proc/scsi/bnx2fc/7 | grep 'Host Device Name'
 Host Device Name vmhba34


Run this script in ESXi 6.x to obtain the driver version and Firmware for all HBAs in the system:

for name in `vmkchdev -l | grep vmhba | awk '{print$5}'`;do echo $name ; echo "VID :DID  SVID:SDID"; vmkchdev -l | grep $name | awk '{print $2 , $3}';printf "Driver: ";echo `esxcfg-scsidevs -a | grep $name |awk '{print $2}'`;vmkload_mod -s `esxcfg-scsidevs -a | grep $name|awk '{print $2}'` |grep -i version;echo `lspci -vvv | grep $name | awk '{print $1=$NF="",$0}'`;printf "\n";done


list interfaces

esxcli network ip interface list