Skip to main content

Posts

Showing posts from August, 2015

Powershell get folder size

Get folder size on Powershell is not a relatively straight forward task. But with the power lifting of Powershell on the background process, you don't have to sweat a lot to get things done. Getting folder size of a single directory is relatively straight forward in Powershell. But if you need to get folder size on all the directories on the root drive is quite a heavy task. Why is it a heavy task? Powershell needs to get the size of each file in the specified directory and get the total of all the files. So if you have a lot of folders and you want to get the size of each folder, Powershell will take some time to process. But if you need to monitor a single folder and check the folder size capacity daily then this one-liner code below will help. Get-ChildItem d:\Video -Recurse -Force | Measure-Object -Property Length -Sum ) . Sum / 1MB ) " + ' MB' Or use the alias: dir d:\Video -Recurse -Force | Measure-Obj

Powershell get folder names

Messing up with folders in Powershell? Got a thousand and hundreds of folders on your drive and you want to get the folder names or just having some free time and you want to organize it? Powershell will save time to organize those folders and will save time on searching and finding information. Organizing folders or even organizing your own activities in life makes it easier and systematic. How to mess up with folders in Powershell? And get the data that you wanted. Powershell provides a relatively quick and easy way to list folders. Open Powershell ISE or the Powershell command prompt. Or you are a command line junkie, dir command will be the first command that will cross your mind if you need to list folders in Windows and it also even works in Linux. Since "dir" command does a beautiful job of listing folders and files, the outout can easily be pipe to Powershell for further processing. Try this command in Powershell ISE or Powershell

Change product key in Windows 10

How to change product key in Windows 10? Microsoft has provided an easy way of changing the product key in Windows 10 by launching an executable file via command line. Open command prompt, press together the Windows Key + R key to open run box. On run box, type "cmd" (don't include the quotes) and press enter or click the ok button. If the user account is not running with administrative privileges, system will prompt to enter the username and password for the account with admin rights. If the user account has admin rights, the command prompt window will open. On command prompt environment type: changepk and press enter Changepk.exe is a shortcut name for change product key. A window will open to enter or change the windows product key. See screen shot below for an example: Cheers..Hope it helps..  ----------------------------------------- Free Android app, download at Google play: Android Divine Mercy Chaplet Guide  

Sharing a single monitor with KVM switch

Having a multiple servers connected to a KVM (keyboard, video and mouse) switch? It's convenient and easy to switch from one server to another. By pressing the button on the KVM and boom your already connected to another server, or just press control key twice. But it will not be convenient if you have a multiple servers and you don’t know which one is which one. By switching from one server to another, we need to identify which server handles the specific function or service, or just show the server name and you will be able to know the current server. For example there are 2 accounting servers, 2 file servers and 2 web servers Accounting Server 1 Accounting Server 2 File Server - 1 File Server - 2 Web server Java Web server ASP When switching from one server to another, if the servers are locked they all look the same. You will not be able to identify the function or get the name the server unless you logon to it. How to know the

Windows 2008 upgrade has been disabled

Upgrading to another version of Windows is fully supported by Microsoft but need to check the OS or operating system upgrade path. The architecture platform has to be the same, which means (x86) 32 bit to 32 bit of OS and 64 bit to 64 bit OS. Upgrade of OS to 32 bit to 64 bit cannot be done. Upgrading an OS to another version will take a short time if no hiccups during the upgrade. I had tried upgrading a Win 2008 Standard to Win 2008 Enterprise; I was thinking that it will take only an hour to do the upgrade but it takes more than an hour. The SP2 installed on Win 2008 Standard has preventing the upgrade. The in-place upgrade shows that the "Upgrade has been disabled" and its grayed out and not clickable. After removing SP2, the option to upgrade was enabled and it goes smoothly. If not able to remove SP2, arrange the updates by date and remove some updates prior to SP2 and after SP2. But before doing the upgrade, if you have a s

Quickly access command prompt or control panel in Windows 10

How to launch or access command prompt, control panel and programs and features in Windows 10? Microsoft provides a quick easy on how to do this. To launch "Programs and Features",  "Disk Management" and elevated command prompt can also be quickly access using the method below. On a laptop or desktop PC with Windows 10, right click on the windows logo, or the windows start button and a pop up menu is shown. See screen shot below: The windows run box is also part of the menu which provides quick access to run or open programs. Windows run box provides quick access to most of the programs if you are familiar with the application name. For example to launch Microsoft paint brush you can easily launch it from the run box by typing "pbrush" (don't include the quotes when typing).  Or to run word type "winword", If you have been using snip to capture images on your screen, you can also launch it using the run box by typing: snipp

Log off or switch user account in Windows 10

How to log off, lock or switch user account in Windows 10? Log off is now called sign out in Windows 10. And switch user account cannot be found in Windows 10, all you need to do is click on the user account that is available on the start menu. If you cannot find any other user account, then you might need to create another account if you need it. Multiple user account is good if there are multiple users on the laptop or computer, or simply you just need to separate your files or prefer to have another account with less clutter of icons on desktop. See screen shot below, just click on the user account just below the sign out option and Windows will automatically switch to that user account. Press the Windows  icon to open the start menu and other tiles options. Just a quick tips on windows 10. Cheers. Hope it helps.  =============== Catholic Rosary Guide  for Android: Pray the Rosary every day, countless blessings will be showered upon your life i

Excel VBA lock cell values

Excel VBA to lock cell values but allowing user to copy the cell value. Locking a cell or protecting a sheet will lock the cells and make it as read only and user also has  to remember the password. So if the user forgot the password, whatever values on the cell or cells needs to type or do again  the worksheet. VBA code below will lock the cell value allowing user to copy the value or even modify it but the moment the cell is not active anymore, then VBA will put back whatever values that is on the code. Even if the macro has a password, the user don't need to type or the worksheet. Since the user will be able to copy the value. To protect a range, just adjust  the range value. ===================== Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Me.Range("B1")) Is Nothing Then Exit Sub     Application.EnableEvents = False  If Range("B1") <> "LA Lakers Simply the best" Then     Cells(1

VB.Net write date and time to text file

This is just a quick noob tips or beginner tips for vb.net. How to include date and time when writing to a text file using vb.net? Code below is taken from MSDN link: https://msdn.microsoft.com/en-us/library/hxwfzt61.aspx?f=255&MSPPError=-2147217396 Code to write to a text file on a path specified. Dim file As System.IO.StreamWriter file = My.Computer.FileSystem.OpenTextFileWriter("c:\test.txt", True) file.WriteLine("Here is the first string.") file.Close() Make sure the directory exist or the user account used to run the program has write permission on the specified path. If the directory does not exists or the user account used to open the program has no permission (account don't have admin privileges) then system will throw an error like this: DirectoryNotFound Exception was unhandled To include date and time to a text file. Just include it on the string but used "&" (ampersand) to tell the compiler that the command is part

Reset or refresh Firefox

Deleting profiles on user appdata folder  is not able to reset or refresh Firefox in a Windows OS, even a new re-installation will not help also. So how to refresh Firefox like it was a first installation? Well, it’s quite simple and straight forward resetting Firefox like resetting a device to its factor settings. Open Firefox, click on “Help”. If “Help” menu does not appear on the menu bar, press “Alt” key on the keyboard so the menu bar will display. Click on “Help”, then  click on “Troubleshooting Information” then click on “Refresh Firefox”. See screen shot below: After clicking on “Refresh Firefox”, all settings, add-ons will be completely gone. This process is very useful, if you experience nasty or unwanted toolbars, websites keeping popping up out of nowhere, if you do this process it will solve the issue. But if for some reason by doing this process, unwanted websites are still opening as new tabs. Then it could be some other issues,

Ubuntu Calendar

I was mingling with my virtual box with Ubuntu installed. I found this calendar quite interesting and impressive. I don't know whether this can be viewed  via GUI, nevertheless it is still interesting since the data can be viewed using the terminal window with just the simple cat command. Here's the path: /usr/share/calendar Open a terminal and browse to the path above. cd  /usr/share/calendar Here's some of the calendar available, it's not a complete list. calendar.australia calendar.computer calendar.music View the calendar contents by typing the command below: cat calendar.computer Sample output from calendar.computer: 01/17     Justice Dept. begins IBM anti-trust suit, 1969 (drops it, January 8, 1982) 01/24     DG Nova introduced, 1969 01/25     First U.S. meeting of ALGOL definition committee, 1958 01/26     EDVAC demonstrated, 1952 01/31     Hewlett-Packard founded, 1939 02/11     Last day of JOSS

Query windows remote registry via command line

To query the registry on a remote machine, the remote registry service should be running. If the remote registry service is not running, once a query is issued against the remote machine an error will be displayed as: "The network path was not found". To enable the remote registry service, type: sc \\computer_name start remoteregistry To start the service automatically type: sc \\computer_name config remoteregistry start= auto Once the remote registry service is up and running, the registry can be queried via command line. All these commands will only work if you have the right administrative privileges such as domain admin. To query the registry remotely type command below: C:\>reg query \\remote_comp_name\hklm\software\microsoft\windows\currentversion\explorer /s C:\>reg query \\192.168.100.100\hklm\software\microsoft\windows\currentversion\explorer /s Command-query above will look for the registry in HotKey Loc