Windows 2012 Core
December 10, 2016 — 0:04

Author: silver  Category: windows  Comments: Off

PS = Run in Powershell

System config:

sconfig
netdomf

slmgr.vbs /skms kms.domain.local:1688

wmic product
wmic softwarefeature list brief

# PS:
wmi Win32_SoftwareFeature | Select ProductName, Caption, Version | ft *
# change name
Rename-Computer
# remove from domain & reboot
Remove-Computer -credential domain\account -passthru -verbose -force
Restart-Computer

Diskpart:

list disk
select disk X

If disk is set as read-only, first run:
attributes disk clear readonly

create partition primary (or size = )
select partition X
format fs=ntfs quick
assign
list volume
select volume X
remove letter=D
assign letter=L

Network:

# PS:
Get-NetIPInterface
New-NetIPAddress -InterfaceIndex 12 -IPAddress 192.0.2.2 -PrefixLength 24 -DefaultGateway 192.0.2.1
Set-DNSClientServerAddress -InterfaceIndex 12 -ServerAddresses 192.0.2.4,192.0.2.5

netsh interface ip set address name="Local Area Connection" static 10.94.45.213 255.255.255.224 10.94.45.193

Firewall:

netsh advfirewall set allprofiles state off
netsh advfirewall set allprofiles state on

RDP:

# PS:
Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name 'fDenyTSConnections'
Get-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name 'UserAuthentication'
Get-netfirewallrule -DisplayGroup 'Remote Desktop' | ft -autosize  Name, Enabled
New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name 'fDenyTSConnections' -Value 0 -PropertyType dword
New-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name 'UserAuthentication' -Value 1 -PropertyType dword
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -name 'fDenyTSConnections' -Value 0
Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -name 'UserAuthentication' -Value 1
Enable-NetFirewallRule -DisplayGroup 'Remote Desktop'

Task Scheduler:

schtasks /create /tn 'Task Name' /tr 'D:\Dir\file.exe' /ru DOMAIN\user /rp /sc daily /st 03:30
schtasks /change /tn 'Task Name' /ru DOMAIN\user
schtasks /delete /tn 'Task Name'
schtasks /run /tn 'Task Name' /i
schtasks /query /fo table /nh
schtasks /query /tn 'Task Name' /fo list /v

Telnet:

# PS:
Import-Module servermanager
Add-WindowsFeature telnet-client

TS Share:

# PS:
cd \\tsclient\c
HP ProLiant
December 9, 2016 — 21:54

Author: silver  Category: hardware linux  Comments: Off

Boot:

  • BIOS: F10
  • HP SSA Smart Storage Administrator / ACU Array Configuration Utility: F5
  • ORCA / Options ROM for Configuring Arrays: Press any key…, F8
  • HP IP: F10
  • Boot Menu: F11

Install HP software:

Repository:

wget http://downloads.linux.hp.com/add_repo.sh
sh add_repo.sh spp -d redhat -r 6.7 -n
sh add_repo.sh spp -d redhat -r 6.7
sh add_repo.sh spp -d redhat -r 5.10 -n
sh add_repo.sh spp -d redhat -r 5.10
sed -i 's/gpgcheck=0/gpgcheck=1/' /etc/yum.repos.d/HP-spp.repo
rpm --import http://downloads.linux.hp.com/SDR/hpPublicKey1024.pub
rpm --import http://downloads.linux.hp.com/SDR/hpPublicKey2048.pub
rpm --import http://downloads.linux.hp.com/SDR/hpPublicKey2048_key1.pub
for i in $( rpm -qa gpg-pubkey* ); do rpm -qi $i |grep -B 8 Hewlett; done
yum install hpacucli
yum install hponcfg

HP Server Management Application and Agents Command Line Interface

# hpasmcli -s "clear iml"

HP Lights-Out Online Configuration Utility for Linux

hponcfg -f Clear_EventLog.xml -i

Clear_EventLog.xml:

<RIBCL VERSION="2.0">
 <LOGIN USER_LOGIN="Administrator" PASSWORD="xxx">
 <RIB_INFO MODE="write">
 <CLEAR_EVENTLOG/>
 </RIB_INFO>
 </LOGIN>
</RIBCL>

Clear_IML.xml:

<RIBCL VERSION="2.0">
  <LOGIN USER_LOGIN="Administrator" PASSWORD="xxx">
  <SERVER_INFO MODE="write">
    <CLEAR_IML/>
  </SERVER_INFO>
  </LOGIN>
</RIBCL>

Administrator_reset_pw.xml:

<ribcl VERSION="2.0">
 <login USER_LOGIN="Administrator" PASSWORD="boguspassword">
  <user_INFO MODE="write">
   <mod_USER USER_LOGIN="Administrator">
    <password value="NewPass123"/>
   </mod_USER>
  </user_INFO>
 </login>
</ribcl>







We use Matomo free and open source web analytics
We also use Jetpack WordPress.com Stats which honors DNT