0

Code snippets : Unzip file in PowerShell

-

Recently I needed to unzip file from PowerShell script. Here is result what I did use to achieve that:

$archiveDir = "C:\Downloads"
$fileZip = $archiveDir + "\file.zip"
$shell=new-object -com shell.application
$zip = $shell.NameSpace($fileZip)
foreach ($item in $zip.items())
{
 $shell.NameSpace($archiveDir).CopyHere($item)
}
0

Tips & tricks : Detect your public IP using telnet

-

If you need to identify your public IP and have no possibility to run web browser of any kind you can use telnet.

In order to identify public IPv4:

telnet v4address.com

In order to identify public IPv6:

telnet v6address.com

Once connection is established autoresponder will show your public IP address:

This is the telnet autoresponder at v6address.com.
You have connected over IPv4.
Your IP address is 5.10.15.20

This might be helpful when using console on some *NIX systems or on the routers.

0

Code snippets : VBscript : Change local admin username and password

-

Script I used as computer statup script pushed via GPO. It renames local Administrator to Admin and sets password for Admin account to one specified in script.
(more…)

0

Config snippets : Cisco : DHCP on Catalyst switches

-

Usually I tend to create DHCP server on Windows Server. However, sometimes there is no server on site. Only what I have are network devices, workstations and voip phones. In those cases I used to create DHCP server on switches. As environment I operate in contains mainly Cisco devices, each location has at least one or more Cisco Catalyst switches (2960 or 3560) it is possible to provide DHCP service using IOS features. Example contains DHCP configuration for network with different VLANs for data, voice and printers.

Below is short description and set of commands demonstrating how to setup:

  • DHCP scopes
  • Exclusions
  • Define DHCP helper on the interface
  • Check status of DHCP assignments

(more…)

0

Tips & Tricks : xcrun: error after upgrading to macOS Mojave

-

After upgrading to macOS Mojave you might experience following error when trying to run some command line tools like git, for example:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

To resolve that run those commands in Terminal:

sudo xcode-select --switch /Applications/Xcode.app
sudo xcode-select --switch /Library/Developer/CommandLineTools

Issue should be resolved.

 

 

0

Cheat Sheet : Windows 8.1 Shortcut

-

Some handy keyboard shortcuts you can use in Windows 8.1

WINKEY - Toggles between Desktop and Start Menu

Esc  Key - If you have the Desktop running it will exit to desktop whenever in Start Menu

WINKEY + ,  Provides Peak of Desktop if open

WINKEY + B Switch to the Windows Desktop and select the tray notification area.

WINKEY + C  Display Charms and notification

WINKEY + D Switch to the Windows desktop and toggle Show Desktop.

WINKEY + E Switch to the Windows desktop and launch Windows Explorer with Computer view displayed.

WINKEY + F - Search Files using the new Windows Search pane.

WINKEY + I - Display Settings pane for the Start screen.

WINKEY + L - Lock PC and return to Lock screen.

WINKEY + M - Minimize the selected Explorer window.

WINKEY + O - Toggle orientation switching on slate and tablet PCs.

WINKEY + P - Display the new options for items like projectors.

WINKEY + Q - Search within Apps using the new Windows Search pane.

WINKEY + R - Switch to the Windows desktop and display the Run box.

WINKEY + U - Switch to the Windows desktop and launch the Ease of Access Center.

WINKEY + X - Switch to the Windows desktop and Administrative tools.

WINKEY + Z - Display the App Bar in a Metro-style app.

WINKEY + 1, WINKEY + 2,  WINKEY + 3 ,,,,  Launches each of the classic desktop Task Bar apps from Left to right.

These are Windows Classic Desktop Keys

WINKEY + .  List all Running Apps

WINKEY + 1, WINKEY + 2,  WINKEY + 3 ,,,,  Launches each of the classic desktop Task Bar apps from Left to right.

WINKEY + B - Select the tray notification area.

WINKEY + C - Display Charms and notification

WINKEY + D - Toggle Show Desktop. Very cool feature to help find other apps / shortcuts on desktop

WINKEY + E. Launch Windows Explorer with Computer view displayed.

WINKEY + F - Search Files using the new Windows Search pane.

WINKEY + I - Display Settings pane for Windows Desktop

WINKEY + L - Lock PC and return to Lock screen.

WINKEY + M - Minimize the selected Explorer window.

WINKEY + O - Toggle orientation switching on slate and tablet PCs.

WINKEY + P - Display the new options for items like projectors.

WINKEY + Q - Search (within) Apps using the new Windows Search pane.

WINKEY + R - Display Run box.

WINKEY + U - Launch Ease of Access Center.

WINKEY + W - Search Settings using the new Windows Search pane. Defaults to Settings first

WINKEY + X - Switch to the Windows desktop and Administrative tools.

WINKEY + Left or Right Arrow - Aero Snap Moves position of selected app.

WINKEY + Up Arrow - Will Maximize Selected App

WINKEY + Down Arrow - Will Change app from Maximize to Normal then to Task Bar of Selected App
5

How-to : Access BlackBerry PlayBook via SSH

-

So, I was wondering how to access my PlayBook using SSH. It would be really convinient to access it from laptop, browse files, etc. I did poke around on Internet and finally identified solution how to SSH to PlayBook 🙂 For now only as a normal user and working towards getting root access (I guess Dingleberry will be helpful at some stage) 🙂

For now let’s have a look into details of accessing PlayBook via SSH. for that I will use:

  • BlackBerry Tablet SDK 2.0.0 – available for free on BlackBerry web page here. There might be newer version available by now.
  • PuTTY – I guess most popular free terminal emulator for SSH, Telnet and Serial connections, available here. From that package PuTTY.exe and PuTTYgen.exe will be required.

(more…)

0

How-to : Create Zend Framework 1.x based project with home.pl as hosting platform

-

I’m using home.pl to host some of my projects. Also, this is test platform for some of the application I work on. At some point I started using Zend Framework and when tried to use home.pl to host Zend Framework-based project went into bit of trouble. By default there is no shell access, so no way to manipulate httpd settings.

After few emails with Technical Support from home.pl I received step-by-step instructions from them on how to create Zend Framework-based project and make it run correctly, so I thought it is worth to share.

(more…)

0

How-To : System Center 2012 SP1 Service Manager Installation

-

Quick reference with screenshots and requirements for System Center 2012 SP1 Service Manager installation.

(more…)

0

How-to : Create DAG on Exchange 2010

-

Set of screenshots from old archives. It shows how to setup DAG on Microsoft Exchange Server 2010.

If there will be interest in that subject I will put some description around that, just request that in comments.

Otherwise, enjoy step-by-step screenshot guide for DAG on Exchange 2010

(more…)