More Storage

I have been running 2 Synology’s for quite some time now. The first one has 4 bays, and I loaded it up with 4 x 8TB drives. In a raid 5 configuration, that gave my just under 22Tb usable. I was running out of space fast and I was able to pickup another Synology 4 bay, but this one already has 3 x 2TB drives. This helped for a little while, but i was again running out of space.

Luckily with all of the Sales leading up to Black Friday, i was able to pickup 3 x 12TB drives and replaced them 1 by 1.

After Replacing the 1st drive, it took about 4-5 hours to rebuild the array. I then replaced the 2nd drive and it took another 4-5 hours to rebuild the array, but this time when it was done, it expanded the capacity to a little over 12Tb which took another hour. (Very Interesting… )

I finally was able to replace the 3rd drive and it took another 4-5 hours to rebuild, but this time at the end it restarted the rebuild. That time it took 3 days and when it was done, it Expanded the capacity again for another couple hours.

When it was all said an done, I had this one sitting at just under 22TB usable, but i still have a spare bay when the drives go on sale again.

That will keep me going for awhile.

Batch File Menu System

I have been helping someone replace a bunch of computers on their network and decided to see if a could help speed things up a bit with a batch file.

Their Network is spread out across multiple sites and they only use static IP addresses. They refuse to have a DHCP server. This makes things fun….

I came up with a simple batch file that Allows me to setup the network and install apps and set the power settings. Here is how I did it.

Needed a Menu system:

@echo off

:choice
cls
echo.
echo Please Make sure you are running this as an Admin!
echo.
echo Choose:
echo [1] Set Static IP
echo [2] Install Apps with Office (Site1)
echo [3] Install Apps with Office (Site2)
echo [4] Install Apps Without Office
echo [5] Power Settings
echo.
echo [99] Exit
echo.

SET choice=
SET /P choice="What would you like to do? "
if '%choice%'=='1' goto 1
if '%choice%'=='2'goto 2
if '%choice%'=='3' goto 3
if '%choice%'=='4' goto 4
if '%choice%'=='5' goto 5
if '%choice%'=='99' goto end
goto choice

So the first option we needed is to set the IP Address Information and DNS. When the User entered option 1 then they would be prompted to enter the Static Address, Gateway, Subnet and 2 DNS servers. It then sets the information on the computer and shows the IP information to verify it was set. It will pause and wait for a Key Press.Then once a key has been pressed it will go to the main menu again.

:1
@echo off
echo "Please enter Static IP Address Information"
echo "Static IP Address:"
set /p IP_Addr=

echo "Default Gateway:"
set /p D_Gate=

echo "Subnet Mask:"
set /p Sub_Mask=

echo "DNS 1:"
set /p DNS_2=

echo "DNS 2:"
set /p DNS_2=

echo "Setting Static IP Information"
netsh interface ipv4 set address name="Local Area Connection" static %IP_Addr% %Sub_Mask% %D_Gate% 1
netsh interface ipv4  set dns name="Local Area Connection" static %DNS_1%
netsh interface ipv4  set dns name="Local Area Connection" static %DNS_2% index=2

netsh int ip show config
pause
goto choice

Next I have 2 areas that are to install Applications including Office. The difference is that We have 2 different Product keys depending on the site where we are installing.

First part of the Applications install is to create a directory if it doesnt exist on the local hard drive called Installs

if not exist "c:\installs\" mkdir c:\installs

then lets copy teh installers to the local computer

copy AcroRdr*.exe c:\installs
copy ChromeSetup.exe c:\installs
xcopy "Office Standard 2013" c:\installs
copy SophosSetup-Endpoint.exe c:\installs

In order to to the Office Installs, I made a couple xml files and placed them in the Office Install Directory. Site1_config.xml and Site2_config.xml.

Content of XML files

<Configuration>
<Display Level="Basic" CompletionNotice="Yes" SuppressModal="No" AcceptEula="Yes" />
<PIDKEY Value="XXXXXXXXXXXXXXXXXXXXXXXXX" />
<Setting Id="AUTO_ACTIVATE" Value="1" />
<Setting Id="SETUP_REBOOT" Value="Never" />
</Configuration>

So based on the install selected, the next step is to rename the XML file to just config.xml. I actually used a copy command because that is how i like to do and I get to still keep the original one intact.

copy "c:\Installs\Office Standard 2013\Site1_config.xml" "c:\Installs\Office Standard 2013\config.xml"

Now that everything has been prepared, lets start installing.

START /W c:\Installs\AcroRdr*.exe
START /W c:\Installs\ChromeSetup.exe
START /W "c:\Installs\Office Standard 2013\setup.exe"
START /W c:\Installs\SophosSetup-Endpoint.exe

Office will see the config.xml file there and will follow the options selected in it.

The 3rd Applications install is everything but Office

if not exist "c:\installs\" mkdir c:\installs
copy AcroRdr*.exe c:\installs
copy ChromeSetup.exe c:\installs
copy SophosSetup-Endpoint.exe c:\installs

START /W c:\Installs\AcroRdr*.exe
START /W c:\Installs\ChromeSetup.exe
START /W c:\Installs\SophosSetup-Endpoint.exe
goto choice

Then we set the power settings to never turn off the computer, or Hard drive, and to disable Hibernation.

:5
powercfg.exe -change -disk-timeout-ac 0
powercfg.exe -change -standby-timeout-ac 0
powercfg.exe -h off
goto choice

Then we are done. It is super simple , but saves time on this project. The whole Script is saved as a batch file and Looks like this:

@echo off

if not exist "c:\installs\" mkdir c:\installs

:choice
cls
echo.
echo Please Make sure you are running this as an Admin!
echo.
echo Choose:
echo [1] Set Static IP
echo [2] Install Apps with Office (Site1)
echo [3] Install Apps with Office (Site2)
echo [4] Install Apps Without Office
echo [5] Power Settings
echo.
echo [99] Exit
echo.

SET choice=
SET /P choice="What would you like to do? "
if '%choice%'=='1' goto 1
if '%choice%'=='2'goto 2
if '%choice%'=='3' goto 3
if '%choice%'=='4' goto 4
if '%choice%'=='5' goto 5
if '%choice%'=='99' goto end
goto choice


:1
@echo off
echo "Please enter Static IP Address Information"
echo "Static IP Address:"
set /p IP_Addr=

echo "Default Gateway:"
set /p D_Gate=

echo "Subnet Mask:"
set /p Sub_Mask=

echo "DNS 1:"
set /p DNS_2=

echo "DNS 2:"
set /p DNS_2=

echo "Setting Static IP Information"
netsh interface ipv4 set address name="Local Area Connection" static %IP_Addr% %Sub_Mask% %D_Gate% 1
netsh interface ipv4  set dns name="Local Area Connection" static %DNS_1%
netsh interface ipv4  set dns name="Local Area Connection" static %DNS_2% index=2

netsh int ip show config
pause
goto choice

:2
if not exist "c:\installs\" mkdir c:\installs
copy AcroRdr*.exe c:\installs
copy ChromeSetup.exe c:\installs
xcopy "Office Standard 2013" c:\installs
copy SophosSetup-Endpoint.exe c:\installs
copy "c:\Installs\Office Standard 2013\Site1_config.xml" "c:\Installs\Office Standard 2013\config.xml"

START /W c:\Installs\AcroRdr*.exe
START /W c:\Installs\ChromeSetup.exe
START /W "c:\Installs\Office Standard 2013\setup.exe"
START /W c:\Installs\SophosSetup-Endpoint.exe
goto choice

:3
if not exist "c:\installs\" mkdir c:\installs
copy AcroRdr*.exe c:\installs
copy ChromeSetup.exe c:\installs
xcopy "Office Standard 2013" c:\installs
copy SophosSetup-Endpoint.exe c:\installs
copy "c:\Installs\Office Standard 2013\Site2_config.xml" "c:\Installs\Office Standard 2013\config.xml"

START /W c:\Installs\AcroRdr*.exe
START /W c:\Installs\ChromeSetup.exe
START /W "c:\Installs\Office Standard 2013\setup.exe"
START /W c:\Installs\SophosSetup-Endpoint.exe
goto choice

:4
if not exist "c:\installs\" mkdir c:\installs
copy AcroRdr*.exe c:\installs
copy ChromeSetup.exe c:\installs
copy SophosSetup-Endpoint.exe c:\installs

START /W c:\Installs\AcroRdr*.exe
START /W c:\Installs\ChromeSetup.exe
START /W c:\Installs\SophosSetup-Endpoint.exe
goto choice

:5
powercfg.exe -change -disk-timeout-ac 0
powercfg.exe -change -standby-timeout-ac 0
powercfg.exe -h off
goto choice

:end

Until Next time…