paybackman 3a9dd43380 Minor changes... About to port from other Repo
Port from New-CLI repo with MVS working.

Changed naming from Openstack to OpenStack across the board to match API..

Trying to comit

Change-Id: I575d847e38c903e1ae308b55d0f0768bd33fa7e1
2014-05-08 09:51:36 -05:00

81 lines
2.0 KiB
PowerShell

# ---------------------------------------------------------------
# Set up support methods first..
# ---------------------------------------------------------------
function is64bit() {
return ([IntPtr]::Size -eq 8)
}
function get-programfilesdir() {
if (is64bit -eq $true) {
(Get-Item "Env:ProgramFiles(x86)").Value
}
else {
(Get-Item "Env:ProgramFiles").Value
}
}
# ---------------------------------------------------------------
# Set up the default windows size and color....
# ---------------------------------------------------------------
#$DebugPreference=$VerbosePreference="Continue"
#$DebugPreference = "Continue"
$a = (Get-Host).UI.RawUI
$b = $a.WindowSize
$b.Width = 109
$b.Height = 61
$a.WindowSize = $b
$a.BackgroundColor = "black"
$a.ForegroundColor = "green"
cls
# ---------------------------------------------------------------
# Register known providers, write out welcome and status messages..
# -----------------------------------------------------------------
$a.BackgroundColor = "black"
Echo ''
$a.ForegroundColor = "gray"
Echo '========================================================================================'
$a.ForegroundColor = "yellow"
Echo 'Welcome to the OpenStack Powershell Environment.'
$a.ForegroundColor = "gray"
Echo '========================================================================================'
Echo ''
$a.ForegroundColor = "green"
echo ' ==> Registering Providers...'
$tempvar = get-programfilesdir
$tempvar = $tempvar + "\OpenStack\OpenStack-Powershell"
cd $tempvar
import-module .\CLIManifest.psd1 -DisableNameChecking
echo ' ==> Applying Command Aliases...'
echo ' ==> Registering Views...'
echo ''
# ---------------------------------------------------------------
# Reset Shell to default colors..
# ---------------------------------------------------------------
$a.ForegroundColor = "yellow"
echo 'Ready..'
$a.ForegroundColor = "green"
echo ''