Archive for the ‘Uncategorized’ Category.

Upgrading Gigabyte MZ31-AR0 to AMI Management Console

I have MZ31-AR0 rev 1.0 motherboard that was on the older AST2500 Vertiv BMC firmware. Although you can download the newer AMI firmware, the update just leaves you non functional BMC. I searched the internet found other individuals with similar issue. I found old gigabyte news post talking about transition from Vertiv to AMI BMC firmware. It had screenshots of the example upgrade and referenced different upgrade script ‘NR_flashall.sh’. Searching the web I found public FTP site which had firmware for different gigabyte motherboard with this NR_flashall64.sh. Inside I found what was missing.

./gigaflash_x64 ../fw/126039.bin -cs 0 -a -2500 -no-reboot

Only difference I can find for the final upgrade string was ‘-no-reboot’. In all previous attempts I’ve powered my system down each and pull the AC plugs to make sure BMC get a full reset. But this time with with ‘-no-reboot’ option, after my cold reset, BMC was alive and kicking with AMI version.

Enjoy the more modern BMC UI.

Windows – Set various power settings via command line

Set various timeout setting for sleep, hibernate, disk, and monitor. Below will disable all timeouts. Great for VM workstations that need to run 24/7

powercfg /x -hibernate-timeout-ac 0
powercfg /x -hibernate-timeout-dc 0
 
powercfg /x -disk-timeout-ac 0
powercfg /x -disk-timeout-dc 0
 
powercfg /x -monitor-timeout-ac 0
powercfg /x -monitor-timeout-dc 0
 
Powercfg /x -standby-timeout-ac 0
powercfg /x -standby-timeout-dc 0

Powershell – Install RAST (Remote Server Administration Tools)

These tools can be install on any workstation to administrate servers remotely. Command below will install all Window Server tools

Get-WindowsCapability -Online |? {$_.Name -like "*RSAT*" -and $_.State -eq "NotPresent"} | Add-WindowsCapability -Online

Windows – Compress each file in folder into 7z archive. Keep modified date and delete original.

for /f %i in ('forfiles /D -12/31/2011 /c "cmd /c echo @FILE"') do @7z a Archives/%~i.7z %~i -mmt=on -sdel -stl
  • Command is to be ran at same folder you want to compress every file into a single 7z.
  • Forfiles /D will only select files older than specified date. 
  • It will place each 7z into Archives subfolder.
  • Keeps the date of the file inside as archive date.
  • “-sdel” Delete file when done.

 Windows AD – Get list of computers in domain

Get-ADComputer -filter * | select name | ft

Windows – Test AD Credentials in Powershell

Function Test-ADAuthentication {
    param($username,$password)
    (new-object directoryservices.directoryentry "",$username,$password).psbase.name -ne $null
    }
 
 
Test-ADAuthentication "dom\myusername" "mypassword"

Windows – Edit Printer configuration CLI

You can do various thing with prnmgr.vbs. Built-in VBS script since windows vista. https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/prnmngr

Delete a Printer:

cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -d -p "Send To OneNote 2013"\

Install Driver into Driver Store:

pnputil.exe -i -a \\bwl-dc-01\NETLOGON\BrotherPrintDriver\32_64\BRPRM13A.INF


Install Printer Driver into Print Store: 

cscript C:\Windows\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs -a -m "Brother MFC-L2700DW series" -h "\\server\path-to-driver\BrotherPrintDriver\32_64" -i "\\server\path-to-driver\BrotherPrintDriver\32_64\BRPRM13A.INF"

For non-servers use ` rundll32 printui.dll PrintUIEntry`   https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/ee624057(v=ws.10)?redirectedfrom=MSDN

Delete a Printer:

rundll32 printui.dll,PrintUIEntry /dl /n "Name of Printer"


Install a Printer Driver from INF:

rundll32 printui.dll,PrintUIEntry /ia /m "Name of Driver referenced in INF File" /K /h "3" /v "3" /f "Path\to\inf\file.inf"


Update printer driver:

rundll32 printui.dll,PrintUIEntry /Xs /n "Name of Printer" DriverName "Name of Driver referenced in INF File"


Add SMB printer for all users (per computer):

rundll32 printui.dll PrintUIEntry /ga /n\\print-server\SMASH

Windows – Get serial number of PC / Workstation

Great way to get SN used to for warranty and support lookup on OEM PCs

wmic bios get serialnumber

Basic Samba Config (smb.conf) for Windows 7 Guest sharing

This global section of the smb.conf, in my case, is the bare minimum to get started with simple guest/anonymous access to their Samba box to Windows 7 clients.

[global]

netbios name = [server name here]
workgroup = [workgroup name here]
socket options = TCP_NODELAY
guest account = nobody
map to guest = Bad User
smb passwd file = /var/etc/private/smbpasswd  #Not needed. I bet default value of smb passwd file would work also
private dir = /var/etc/private #Same here. Default value should work.
passdb backend = tdbsam
idmap config * : backend = tdb
idmap config * : range = 10000-39999

First!

Hello World! This will be the most boring post ever. For who ever reads this post, my goal with the website is to store notes, steps on how I solved problems, tips, and other computer related things. There has been many times blogs have shown me the way to fix complicated computer issues. So now on I will try to post every computer issues I have with a solution so maybe I can help someone with the same issue.