Windows 2012 Core
December 10, 2016 — 0:04

Author: silver  Category: windows  Comments: 0

PS = Run in Powershell

System config:

sconfig
netdomf
wmic product
WMIC SOFTWAREFEATURE LIST BRIEF
PS:
wmi Win32_SoftwareFeature|Select ProductName,Caption,Version|FT *
PS:
Rename-Computer
PS:

Remove-Computer -credential domain\account -passthru -verbose -force; restart-computer

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

Diskpart:

list disk
select disk X

(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" | format-table Name, Enabled -autosize
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</del>
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: linux other  Comments: 0

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>