Creating a Powershell profile is a great way to create variables or aliases that you can use in your day to day work.
The first thing you need to do is see if you already have a Powershell profile. You can do this by running the following Powershell command.
test-Path $Profile if you get the following result.
False
This means that you need to create a Powershell profile.
I was working with TypeScript today and I ran into a JavaScript problem that caused me some issues.
I needed to fix the number of decimal places in a temperature calculation example.
This is my original TypeScript code.
let printOutput = (fahrenheit: number, celsius: number) => { console.log(`${fahrenheit} f = ${celsius} c.`); }; let convert = (fahrenheit: number) => { let celsius = ((fahrenheit - 32) * (5 / 9)); return celsius; }; let fahrenheit = 100; let celsius = convert(fahrenheit); printOutput(fahrenheit, celsius); Returns.
One of the shortcomings I find with Hyper-V is that it isn’t easy to copy files from Windows into my Hyper-V virtual environment.
I have found a quick and easy method to share a virtual Windows folder with Hyper-V and will describe how to set this up.
Starting a file share You need to open Control Panel and “Turn Windows Features On And Off”. From here select SMB 1.0/CIFS File Sharing Support and SMB Direct.
I have installed Hyper-V on my PC. I am going to use this to test various Linux distributions.
I have noticed that every time I load a new distribution as a virtual machine it doesn’t display full screen. I have to change the resolution to be able to see my Linux system in full screen mode.
One way to change your resolution is via the following:
Open a terminal window.
I needed to recreate my doskeys.macro file on a new computer. The following commands show how to setup permanent doskey commands.
Open Regedit.
Go to the following regedit directory.
HKEY_CURRENT_USER\Software\Microsoft\Command Processor Create a new key named Autorun.
REG_SZ Value
doskey /macrofile="d:\util\macros.doskey" My macros.doskey These are short key commands that I use every day.
cr=createcmd cu=cleanup dl=dlist no="C:\Program Files\Notepad++\notepad++.exe" $1 mp=D:\Util\BuildMp3Tag.exe Added note I have found a better way to install this registry setting.
In one of the Windows 10 feature upgrades Microsoft decided to make Powershell the default command shell on the Windows start menu (Win-X keys). I use Powershell occasionally and wanted the option to use the Command prompt instead.
To do this go to:
Settings > Personalization > Taskbar There is an option to replace Windows Powershell with the command prompt.
I recently upgraded my working computer so had to reinstall all of my software. I ran into problems with my SQL Server installation.
When I am installing any major piece of software I must remember to install it with Administrator privileges.
In the installation process I give the SQL Server Instance ID a name. If you don’t do this your SQL Server instance will be named mssqlserver. You will use this for all database connection strings in your applications.
Yesterday morning I opened my computer and noticed that I had a Window 10 feature update waiting to be installed. I completed the process and started working on the Rest API that I am creating. I am using Node.js and running my server with Express.js.
I booted up the server and immediately got a server error. I had worked on the application the day before and knew that it was running without any problems.
For a number of years I have been using Dillinger.io to compile my Markdown files into HTML. The process was relatively easy and I could quickly take the body content out of the exported web page and insert it into a Bootstrap HTML template to produce a styled web page.
The HTML that was created wasn’t valid HTML but I wasn’t concerned with that. Recently I found that Dillinger started changing the formatting of the HTML content it was producing.
I was working on my computer today when I needed to search for a topic on Google. To my surprise the internet had stopped working. I quickly checked on another device and found that the internet was working there.
It was just my computer with the problem.
I have had this problem in the past and use ipconfig to fix it.
The commands are:
ipconfig /registerdns ipconfig /release ipconfig /renew The part that I always forget to do is reboot my computer after I do the renew.