Corona vs IT

Hello
Apologies for missing items, I hope all of you out there are doing well and are staying home and safe from Coronal. It’s really scary how a virus knocks out society, but it also put things at the forefront.
The pressure has increased that you should be able to work or access the internet anywhere. So computers, mobiles, and networks really put in for tough testing now. With that, it is also required that security is in the game and on sitting at the sideline. Does on the other side who want to access your things do not rest they have increased their activity, and are not companies ready for storms of attacks they will soon be taken in their bed, many companies and authorities around the world have already been exposed.


Be safe, and take care of your self and does around you

Interesting site that knows good information about the status around Corona.
Johns Hopkins University

Unfortunately, this information can be misleading as every countries count differently when it comes to death by Corona.

How to fetch ESX config with SSH

If you cant connect to ESX with SSH
If you can, you can scroll down to ” SSH to EXS host login with the root”


Login to Vcenter with Vmwarevsphere web client
Pick Esx, pick Manage to the left, then you will have a menu called Settings.
Then you go to the Security Profile.

ESX config with SSH 1


Now you can click on Edit (not sure if it’s necessary to mark SSH?)

ESX config with SSH 2


Mark SSH and click on Start or Stop depending on what you want to do

ESX config with SSH 3


SSH to EXS host login with root

Run this command: vim-cmd hostsvc/firmware/backup_config
Bundle can be downloaded at : http://*/downloads/random.url/configBundle-localhost.tgz
Replace * with IP for that ESX host.
Surf to that URL and you can download the config file

And you’re done.


Don’t forget to turn off SSH to EXS if that you want

Powershell SMB

Windows Server 2012 R2 & 2016: PowerShell methods

Detect: SMB v1
Get-WindowsFeature FS-SMB1

Disable:
Disable-WindowsOptionalFeature -Online -FeatureName smb1protocol

Enable:
Enable-WindowsOptionalFeature -Online -FeatureName smb1protocol

Detect: SMB v2/v3
Get-SmbServerConfiguration | Select EnableSMB2Protocol

Disable:
Set-SmbServerConfiguration -EnableSMB2Protocol $false

Enable:
Set-SmbServerConfiguration -EnableSMB2Protocol $true

Windows 8.1 and Windows 10: PowerShell method

Detect: SMB v1 Protocol
Get-WindowsOptionalFeature –Online –FeatureName SMB1Protocol

Disable:
Disable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

Enable:
Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol

Detect: SMB v2/v3 Protocol
Get-SmbServerConfiguration | Select EnableSMB2Protocol

Disable:
Set-SmbServerConfiguration –EnableSMB2Protocol $false

Enable:
Set-SmbServerConfiguration –EnableSMB2Protocol $true

Read more about at Microsoft

HP Switch Commands


SwitchNameNo = replaced with the name of the real switch name, you will see when you log in on the switch, with Putty for example.


SwitchNameNo# show interfaces brief    =    This command will show all port if they are active or not example below

  Port  Type      | Alert     Enabled Status Mode       Mode  Ctrl  Limit

  —– ——— + ——— ——- —— ———- —– —– ——

  4     100/1000T | No        Yes     Up     1000FDx    MDI   off   0 Activity

  5     100/1000T | No        Yes     Down   1000FDx    MDIX  off    No Activity



SwithNameNo # conf t  =  Enter config

SwitchNameNameNo (config)# vlan 999   =  You will enter vlan 999

SwitchNameNo (vlan-999)# untagged 6   =  Remove vlan tag on port in the vlan 999

SwitchNamehNo (vlan-999)# tagged Trk3   =  Tag vlan 999 to a Trunk

SwitchNameNo (vlan-999)# tagged 6   =  Tag a port to a specific vlan

SwitchNameNo (vlan-205)# show run   =  Show information about all port on the switch

SwitchNameNo (config)# wr mem  =  “publish your change to the Switch”

SwitchNameNo (config)# write memory   =  “publish your change to the Switch”

SwitchNameNo (vlan-201)# exit   =  Exit specific location you are, you repeat that you will finally logout.


Note: if you do not for example run wr mem when you are done,
all the change will be gone, if something happens to the switch that force it to reboot or lose power.

Scheduled task as SYSTEM

For Windows Server 2008 (probably works very similar to later versions as well) this is how to change to use the SYSTEM user account when executing a scheduled task:

  1. Go to Start > Administrative Tools > Task Scheduler
  2. In the Task Scheduler window click “Create Task” on the right-hand bar under the “Actions” pane
  3. In the “Create Task” dialog click the “Change User or Group” button
  4. Make sure “From this location” is set to the local machine name (to change click “Locations” button and select the local computer name)
  5. Type “SYSTEM” in the text box and press ok. Under “When running the task, use the following user account:” you should see “NT AUTHORITY\SYSTEM“.

Powershell mount drive

How to mount a drive in Powershell



$url = hostname
$folder = specific folder
$port = port nr
$username = account name
$pass = password

 

$connectTestResult = Test-NetConnection -ComputerName $url -Port $port
if ($connectTestResult.TcpTestSucceeded) {
    # Save the password so the drive will persist on reboot
    cmd.exe /C "cmdkey /add:`"$url`" /user:`"$username`" /pass:`$pass`""
    # Mount the drive
    New-PSDrive -Name Z -PSProvider FileSystem -Root "$folder"-Persist
} else {
    Write-Error -Message "Unable to reach the $url storage account via port $port. Check to make sure your organization or ISP is not blocking port $port"

}

Microsoft end of extended support

Keep track of Support that will soon expire

Windows 7 Support Ends January 14, 2020
This End of Life means no more bug-fixes, security patches or new functionality, making any user – personal or enterprise – significantly more susceptible to malware attacks.


Seven editions of Windows Server 2008 R2 were released: Foundation, Standard, Enterprise, Datacenter, Web, HPC Server, and Itanium, as well as Windows Storage Server 2008 R2, and the end of Extended Support 2020-01-14.


Windows Home Server 2011 is the last Windows Home Server release, Windows Small Business Server 2011, Windows MultiPoint Server 2011, Windows Home Server 2011 and Windows MultiPoint Server 2010, and the end of Extended Support 2020-01-14.


Windows 8.1 falls under the same lifecycle policy as Windows 8 and will reach the end of Mainstream Support on January 9, 2018, and end of Extended Support on January 10, 2023.


Windows Server 2012 has four editions: Foundation, Essentials, Standard and Datacenter, and the end of Extended Support 2023-10-10.