0

Code snippets : Downloading file from URL in PowerShell

-

To download file from URL I used following piece of code:

$fileURL = "http://server/file.zip"
$fileName = "C:\Downloads\file.zip"
$webclient = New-Object System.Net.WebClient
$webclient.DownloadFile($fileURL,$fileName)
0

Cheat Sheet : SCO Vi Quick Reference Guide

-

I just found vi reference from Santa Cruz Operation (SCO) 🙂 Nice piece of memorabilia as well as handy reference for vi beginners.

0

Tips & Tricks : Windows 10 & Windows Server 2016 reset on VMware ESX 6

-

Here is one from friend of mine, very skilled Senior IT Engineer, Tomasz Jagiello. Some bugs he identified while working with VMware ESX 6.

Symptoms

VM running Windows 10 (x64) as the Guest OS is automatically reset after some hours (roughly a day). Reoccurs daily.

The thread said it also applied to Windows Server 2016 VMs.

There is an unrecoverable error that cause the VMkernel to shut down / restart / crash the virtual machine.

VMware ESX unrecoverable error: (vcpu-0) NOT_REACHED bora/devices/ahci/ahci_user.c:1530

Check if you’re using a para-virtual SATA adapter in the settings of the VM.

 

Cause

There is a VMware bug where if the SATA adapter receives SMART communications on a non-SMART device the CPU bus locks up and ESX reboots the VM.

I was using SCSI for the VM disks and SATA for the VM CD-ROM.

 

Workaround

  1. Edit VM Hardware settings
    • Remove CD/ROM
    • OK
  2. Edit VM Hardware settings
    • Remove SATA Controller
    • OK
  3. Edit VM Hardware settings
    • Add CD/ROM
    • Change to IDE
    • Remove SATA Controller
    • OK
3

How-to : Windows Server 2008 R2 : Installing ADLDS

-

ADAM (Active Directory Application Mode) was predeccesor of ADLDS and Microsoft distributed it as additional download. Now in Windows Server 2008 R2 ADLDS (Active Directory Lightweight Directory Services) are built0in server role. ADLDS offers LDAP-based directory service which can be utilized by application LDAP-enabled. In addition to that ADLDS works as Windows-service and is non-operating-system service which allows multiple instances of ADLDS on same machine.

(more…)

0

Config snippets : Activating Windows Server 2012 Core

-

As there is no GUI in Windows Server 2012 Core, we have to use command line and script in order to acivate system.

slmgr.vbs is a VBscript which allows to set product key and activate operating system. Below most common use of slmgr.vbs.

Set product key

slmgr.vbs /ipk XXXXX-XXXXX-XXXXX-XXXXX

Activate Windows

slmgr.vbs /ato

Display information about licenses

slmgr.vbs /dli
slmgr.vbs /dlv
1

How-to : RANCID installation on openSUSE 11.4 “Celadon”

-

RANCID is a great automation tool which allows you to collect configuration from network devices and store in repository with version control (CVS or SVN). In this article I will show you how to install RANCID and prepare to work on openSUSE 11.4 with subversion as repository for configs.

Having repository with network devices configuration might be also part of disaster recovery planning as in case of failure it will be easy to pull recent configuration from repository and apply on replacement router or switch.

To demonstrate commands I’m using copy&paste from PuTTY while executing step-by-step what is described in this article.

(more…)

0

Config snippets : Cisco : Resetting interface statistics on Catalyst

-

Recently I went through troubleshooting of Site-to-Site Layer-2 link. One of the things we did during troubleshooting of that link was checking interface statistics for interfaces which were connecting two geographical sites together.

Below quick overview how ot check and reset port statistics if required during troubleshooting process.

(more…)

0

Tips & Tricks : Apache2 autostart on openSUSE 13.1

-

In order to have Apache2 started automatically after reboot use:


systemctl enable apache2.service

4

Tips & Tricks : OneNote 2013 keeps crashing when trying to open notebook from OneDrive

-

If you come across issue that OneNote 2013 will keep crashing each time you try to open notebook from OneDrive

  • Go to %userprofile%\AppData\Local\Microsoft\OneNote\15.0 folder and delete OneNoteOfflineCache_Files folder and OneNoteOfflineCache.onecache file
  • Go to %userprofile%\AppData\Local\Microsoft\Office\15.0\ path and delete OfficeFileCache folder.

Then go back to OneNote 2013 and try to open notebook from OneDrive. This time it should work.

PS. %userprofile% points to C:\Users\%username%\

0

Tips & Tricks : Hyperlinks are not working in Outlook

-

When you get a message “Your organization’s policies are preventing us from completing this action for you. For more info, please contact your help desk.” it means that you might want to apply this fix to be able to open links in emails:

http://support.microsoft.com/default.aspx?scid=kb;en-us;310049

Same fix applies also to other Office applications (they all might be affected along with Outlook).