Tuesday, April 17, 2018

VMWare vSphere 6.7 is out.

Some new features of vSphere 6.7
-HTML 5 Client
        More features enabled such as vSAN and core storage.
-UNMAP Enhancements
        Able to adjust reclaim rate.  6.5 has a rate of 25MBps.  6.7 can go to 2GBps.
-vSAN 6.7
        QOS Resyncing of data.
        On-Disk Format 6
                -No more actual data moves or evacuation to upgrade a disk format.  Going forward, it will just be meta-data upgrades.
        FIPS 140-2 Encryption.
        

Thursday, February 8, 2018

Setting up iSCSI initiator to connect to iSCSI target in Linux.

  1. Install open-iscsi
    • # sudo apt-get install open-iscsi
    • # sudo apt-get install open-iscsi-utils
  2. Configure the iscsid.conf file with your login credentials.
    • vi /etc/iscsi/iscsid.conf
    • edit the line 'node.session.auth.username='
    • edit the line 'node.session.auth.password='
    • enable CHAP authentication
    • uncomment the line 'node.session.auth.authmethod = CHAP'
  1. Restart open-iscsi service
    • /etc/init.d/open-iscsi restart
  2. Discover your iSCSI targets
    • # iscsiadm -m discovery -t sendtargets -p <ip address of the iscsi target>:3260
  3. List your iSCSI nodes
    • # iscsiadmin -m node
  4. Restart open-iscsi service
    • /etc/init.d/open-iscsi restart
  5. Find the disk
    • # dmesg | tail
  6. Mount the disk
    • # mount /dev/sdb1 /mnt/iscsi

Thursday, January 18, 2018

Decrypt Files from QNAP with OpenSSL

To decrypt files that was encrypted on a QNAP, use the following command.

From the Linux terminal:

    Decrypt one file
        openssl enc -d -aes-256-cbc -k <decrypt password> -in filename.jpg -out filename.jpg

    Decrypt multiple files in a folder.
        for f in * ; do [ -f $f ] && openssl enc -d -aes-256-cbc -k <decrypt password> -in $f -out _$f;


Export a Sharepoint list to a csv using C#.

Below is the code to export a Sharepoint List to a CSV file using C#.NET

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SharePoint;
using System.IO;

namespace export_sharepoint
{
    class Program
    {
        static void Main(string[] args)
        {
            string url = "<Site URL>" ;

            using (SPSite oSite = new SPSite(url))
            {
                using (SPWeb oWeb = oSite.OpenWeb())
                {
                    SPList oList = oWeb.Lists["<List Name>" ];

                    foreach (SPListItem oItem in oList.Items)
                    {
                         FileStream fs = new FileStream ( "C:\\Documents and Settings\\administrator.domain\\Desktop\\sites.txt", FileMode.Append, FileAccess.Write, FileShare .Read);
                         StreamWriter writer = new StreamWriter(fs);
                        // Access each item in the list... 
                        writer.Write(oItem[ "Site ID"]);
                        writer.Write( ",");
                        writer.Write(oItem[ "Column Name"]);
                        writer.Write( ",");

                        writer.Close();
                        fs.Close();
                    }

                }
            } 
        }
    }

Create a CIFS share on a Netapp from the command line.


cifs shares -add "SHARE NAME" "/vol/fw_volume1/share location/"
cifs access "AD GROUP" "ROLE_ETC" "Full Control"
cifs access -delete "Everyone"

Saturday, January 13, 2018

Finally got a Sega Saturn. Derby Stallion edition!

Sold a Neo Geo Cyberlip and a Nintendo Game and Watch to buy this console.  Wanted this console for a long time so I thought why not go for the Derby Stallion edition!  This console is awesome looking.  It's looks brand spanking new too.  The game inside is Battle Garegga!


Thursday, January 11, 2018

Reset Local Administrator Password

Here's a way to reset the local Administrator password in Windows 2008.

  1. Boot up a WIndows installer CD.
  2. Press F8 at the Local Deployment Wizard
  3. Type in 
    1. move d:\windows\system32\utilman.exe d:\
    2. copy d:\windows\system32\cmd.exe d:\windows\system32\utilman.exe
  4. Boot to normal Window.  At the log in, click on "Ease of Access" button at the bottom left.
  5. Type in:
    1. net user administrator /active:yes
    2. net user administrator <new password>



Tuesday, January 9, 2018

Add local printer via powershell

add-printerport -name 'printer_name' -printerhostaddress '192.168.0.1'
add-printerdriver -Name 'HP LaserJet 4200/4300 PCL6 Class Driver'
add-printer -Name 'printer_name' -DriverName 'HP LaserJet 4200/4300 PCL6 Class Driver' -PortName 'printer_name'



Disable SSL check on GIT

When you connect to a GIT repository, it may fail due to
Start GIT Bash
Run the following command.
     git config --global http.sslVerify false


Monday, January 8, 2018

Setting up Redhat Enterprise Virtualization Manager (RHEVM)

Steps to set up Redhat Enterprise Virtualization Manager.

1.  Install Redhat Enterprise Linux 

2.  Register to the Redhat Network
          #>Subscription-manager register
                    Type in your rhn account info.

3.  Attach all the subscriptions available to the version of Redhat Linux you're running.
          #>Subscription-manager attach --auto

4.  Install yum-config-manager utility
          #>yum install yum-utils

5.  Run yum-config-manager to add Redhat Enterprise Virtualization Manager package to the subscription.
          #>yum-config-manager --enable rhel-6-server-rhevm-3.4-rpms

6.  Run yum-config-manager to add JBoss package to the subscription.
          #>yum-config-manager --enable jb-eap-6-for-rhel-6-server-rpms

7.  Install JBoss
          #>yum install jbossas-standalone

8.  Downgrade sos package (not sure why this is required but it was complaining about the sos version is too new)
          #>yum remove sos-3.2-28.el6.noarch
          #>yum install sos-2.2-68.el6.noarch

9.  Install rhevm
          #>yum install rhevm

10. Install rhevm reporting
          #>yum install rhevm-reports

11. Run the setup wizard.
          #>engine-setup

12. Create ISO domain (Use to store .iso files so you can build the vm)

13. Upload to the ISO domain
          #>rhevm-iso-uploader --iso-domain=<ISO domain name> upload myfile.iso --insecure

14.  To be able to mount the windows drivers in the vm, run the following.
          #>yum install virtio-win
          #>yum install libvirt-devel
          #>yum install libvirt
          #>yum install virt-install