Frosted Glass Tutorial for Dioramas

Video


A quick tutorial I did to show one way of making a frosted glass effect for your diorama windows. Make sure you subscribe to my YouTube Channel for more. I plan on adding to my library of tutorials often.

Creating Desktop Shortcuts to PowerShell that Pass a Parameter


Previously I wrote about how to create a Dynamic PowerShell Profile which allows you to choose upon execution of PowerShell whether you are running your scripts in a DEV state or PROD state.

In this article, I’ll go one step further and show you how to create a custom Desktop Shortcut that will automatically pass the parameters you’ve identified in your Dynamic PowerShell Profile so you don’t need to enter them when you double click the shortcut.

Scenario

In this scenario, I want to have 2 desktop shortcuts. One that will open PowerShell using my DEV profile and one that will open my PROD profile. Technically, the shortcuts are opening the same PowerShell executable, and are running the same profile. The difference is in the parameter/s it is passing when it executes.

Instructions

  1. Click Start and Enter “PowerShell” into the search bar (this is assuming you’re running Windows 7 or higher)
  2. Right Click the “Windows Powershell” result
  3. Choose Send To > Deskop (create shortcut)
  4. Right Click the new shortcut on your desktop
  5. Click Properties
  6. Click the Shortcut tab
  7. Place or cursor at the end of the text in the Target: field
  8. Enter the following text:  -noprofile -noexit -command . $profile -inpType DEV
  9. The entire string will now look similar to: %SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -noprofile -noexit -command . $profile -inpType DEV
  10. Click OK

What Did We Just Do?

Let’s take a look at the additional text we added and break it down.

-noprofile = This tells powershell not to load the $profile we have created and associated with PowerShell. We’re not loading this initially because we want to easily pass a parameter without needing user interaction

-noexit = This tells PowerShell to stay open after executing. If you don’t include this, you’ll see the PowerShell application open and then it will disappear just like that. Allowing PowerShell to close right away is useful when you’re doing silent installs or other tasks that you don’t want/need the user to interact with the application once the process is complete.

-command . $profile = This tells PowerShell to run a command which is the . $profile command which is actually telling PowerShell to run the $profile script.

-inpType DEV = This tells PowerShell that you’re going to pass the $profile script a parameter with is named “inpType” which is created in the $profile script we created previously (you can name your parameters whatever you want). DEV is the parameter itself. You could pass PROD if you wanted instead.

Now, you can change the name of the shortcut to something like “DEV – Windows PowerShell” then copy and paste, rename the new one as “PROD – Windows PowerShell” then change the Target path entry to reflect a PROD parameter entry and now you have 2 shortcuts that will allow you to quickly run in DEV or PROD mode.

I hope this is useful to you. If you have questions or need assistance, feel free to post a question. If you need help adding to your profile, by all means post the question and hopefully I’ll be able to help you out.

Advertisement

Dynamic PowerShell Profile


If you’re writing PowerShell scripts the right way, you’re testing your scripts against a Test, or DEV environment prior to deploying those scripts to your Production environment (You ARE testing your scripts right?). If you’re using source control for your scripts (You ARE using source control for your scripts right?) then you’re likely using a DEV branch for your in progress script and then when all is ready you can Merge that into MAIN or whatever you call your production branch.

NOTE: If you aren’t using source control, branching & merging, and testing, you’ve probably got bigger problems than your PowerShell profile.

Scenario

If you are able to remotely run your code against your servers or if you’re like me and you’re managing Office 365, you’re running your test scripts and your production scripts on the same workstation.

Some of the common repeatable steps I have to take to differentiate my DEV and PROD instance are to change my directory I’m running my scripts from and since I write a lot of Modules, I need to ensure I’m using the correct Modules.

Out of the box, you’re going to have to manually change your directory and go in and add a temporary module directory depending on where your DEV and PROD modules are stored. I can write a script to do this and that’s what I’ve done, but instead of calling that script manually, why not incorporate it into your profile?

Solution

Below is a simple profile I’ve created for my workstation that allows me to determine what environment I’m working in when I run PowerShell. Now, I do nothing different when I open my Windows PowerShell. When it executes it runs the $profile and my script executes prompting me to enter “DEV” or “PROD” based on what I’m working on at the time.

Here’s the script you will copy and paste into your $profile file on your workstation. See below for the instructions.

param(
	[Parameter(Mandatory=$True,HelpMessage="Enter the environment you will be working on (DEV or PROD)")]
	[String]$inpType
)

function Prompt
{
 	switch($inpType)
	{
		"DEV"
		{
			$color = "Yellow"
		}
		"PROD"
		{
			$color = "Green"
		}
		Default
		{
			Write-Host "ERR -- Environment Type entry not valid." `n -foregroundcolor Red
		}
	}
	Write-Host ($inpType + ">") -noNewLine -foregroundColor $color
	Return " "
}
if($inpType -eq "DEV")
{
	$env:PSModulePath = $env:PSModulePath + ";<ENTER YOUR DEV MODULE PATH>"
	Set-Location "<ENTER YOUR DEV SCRIPT DIRECTORY>"
	prompt
}
Else
{
	$env:PSModulePath = $env:PSModulePath + ";<ENTER YOUR PROD MODULE PATH>"
	Set-Location "<ENTER YOUR PROD SCRIPT DIRECTORY>"
	prompt
}
clear

What is this script doing?

There are three specific tasks this script is doing.

  • Add Temporary Module Path (based on Parameter entry)
  • Sets Current Directory (based on Parameter entry)
  • Changes Prompt text and color (based on Parameter entry

Instructions

Follow these steps to include the script above into your Windows PowerShell Profile. Note there are pieces you need to modify in the script above that are wrapped in <>’s. You’ll need to change the paths to represent your own locations.

  1. Open Windows PowerShell
  2. Verify you have a $profile created. Click for instructions and information about PowerShell Profiles
  3. Edit your profile by entering the following command: notepad $profile
  4. Copy the code above (make sure you’ve changed paths to represent your paths) and paste the code into the $profile notepad file
  5. Save
  6. Close PowerShell and Re-Open
  7. You should see a prompt similar to the image below

Profile Prompt

Once you’ve entered the environment, your PowerShell prompt should look like the below image

Profile DEV Prompt

Verify Your Profile Environment

It’s wise to verify you got the profile paths correct. Test that the $profile applied the variables as expected by running the following commands

Module Path

$env:PSModulePath

The information returned will be a semi-colon separated result including all current module paths. Your newly added path should be included in this

Current Directory

Get-Location

This should return the current directory your PowerShell session is set to right now. This should reflect your environment path you entered.

Prompt

You should be able to see the prompt is different depending on the input you chose.

PROD = PROD>

DEV = DEV>

If I Entered “DEV” Do I Have to Close PowerShell to get into “PROD”

No, you do not have to close out, though it might not be a bad idea depending on all the stuff you add to the profile. You can switch easily by entering the following command

. $profile PROD

There is a little bit of error handling, but not much in this script so be aware that you will want to augment this script if you want more error handling.

What can I do with this?

The sky is the limit. If you want to have specific modules loaded or snap-ins you know you’ll use, go ahead and add them. Just be warned, if you add too much stuff, it could slow the overall load time down as well.

Check back to my blog, I’ll show you how you can create a desktop shortcut to automatically enter the parameter so you can quickly get into your DEV or PROD PowerShell profile without entering anything.

End of QTR JMC Tips & Reminders


We hope these helpful JMC end of Quarter tips, tricks, and instructions help you as you do your end of quarter grade processing and submissions. If you have questions or comments feel free to leave them below or e-mail us.

*Click here to download a printable copy of these instructions*
Be on the Right Term

Check to make sure you are on the right TERM before entering any grades or information

Instructions

  1. Click TERMS
  2. Select correct Quarter

Office to Teacher

Your first step should be to perform an OFFICE to TEACHER

*If you don’t do so, any comments you entered will be erased*
  1. Click File
  2. Click Office to Teacher

Scores/Assignment Scores

Enter your scores and grades

  1. Click Edit
  2. Click Course Grades

Calculate

You must calculate your grades from scores before proceeding!

  1. Ensure you are in the Course Grades
  2. Click Options
  3. Click Calculate Q# Grades from Scores
  4. Click Yes to the “Will Modify” message.
  5. *CLICK SAVE AFTER EVERY CLASS/COURSE*
  6. Repeat for each course (Use the Drop Down Arrow to switch to the next class)

Don’t Print

There is no need to print anything anymore.

Click Done

When you have completed all of your grade/score entry you can click the Done button

Teacher to Office

When you are ready to submit your grades to the office you will need to perform a Teacher to Office in JMC.

  1. Click File
  2. Click Teacher to Office

End of Semester

The only difference from Quarter to Semester is you must calculate each quarter and do the weights

  1. Click Edit
  2. Click Course Grades
  3. Select the correct course
  4. Click Options
  5. Calculate both Qtr 1 and 2 or Qtr 3 and 4 depending on the Semester you are in
  6. Click the Weight Button
  7. Enter your grading weights (typically 50%-50%)
  8. Proceed with normal processing as usual

JMC IP Gradebook Setup Instructions


We are excited to announce that this year (assuming all goes as planned) you will not need to set up your JMC IP Gradebook or JMC Attendance. We have worked this summer to create a script that copies all the needed files to their correct locations within your profile and then create the appropriate shortcuts on your desktop.

Unfortunately we don’t have an accurate record of all the buildings everyone works in so we have simply created an icon for each building on your desktop. Those buildings you do not need, simply delete them.

As with anything there are always flaws and errors, so don’t fret if you don’t see your Gradebook program or Attendance shortcut on your desktop. Try rebooting your computer once and see if they show up. If not, create a ticket at http://support.isd2899.k12.mn.us/support (Click Open New Ticket) and we’ll help you ASAP. It will be a quick and easy fix.

For instructions on how to use the JMC Gradebook and Attendance program check out the Training section of this site at: http://pemsupport.wordpress.com/training/

or find more JMC training resources at http://www.jmcinc.com/resources

Have a great start to the year.

Creating a FOG Image – Start to Finish


Recently I and some other techs in the area have been setting up FOG servers and we have found the setup and installation of the FOG server to be well documented but the documentation for creating and uploading an image for Windows XP, Windows Vista, and Windows 7 are hard to come by.

Go to http://www.fogproject.org for more information on the FOG server software.

I decided to take it upon myself to write instructions for all 3 operating systems so I could be a useful participant in the group. Click the link below to download the instructions. If you find there are additions or corrections feel free to leave a comment as to what needs to be changed.

I hope these instructions will be useful to you.

Creating an Image in FOG

Thanks to Brian, Bob, and Damon for all their help and input