Looking to open different powershell script from current and close current

Home Forums Scripting PowerShell Looking to open different powershell script from current and close current

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    5habbaranks
    Member
    #166899

    Hi,
    Im currently building a menu based PowerShell script and thought its probably easier to call on other scripts rather than just having one continuous script which is a pain to see whats going on. After doing a little reading I thought I had it mastered but sadly not. Here is my code the running script is in the same directory as the script I am trying to call

    [FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500]$PSScriptRoot[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9]=[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]Split-Path[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#000080][FONT=Lucida Console][SIZE=1][COLOR=#000080][FONT=Lucida Console][SIZE=1][COLOR=#000080]-Parent[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#000080][FONT=Lucida Console][SIZE=1][COLOR=#000080][FONT=Lucida Console][SIZE=1][COLOR=#000080]-Path[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500]$MyInvocation[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9].[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1]MyCommand[/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9].[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1]Definition [/SIZE][/FONT][/SIZE][/FONT][/CODE]

    [CODE][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]

    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”AD Management Menu”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”Press 1: To Create A New User Account”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”Press 2: To Manage O365 Accounts”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”Press Q: To Quit”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]

    [FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500]$MM[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9]=[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]Read-Host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”Please Make Your Selection”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#00008b][FONT=Lucida Console][SIZE=1][COLOR=#00008b][FONT=Lucida Console][SIZE=1][COLOR=#00008b]Switch[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] ([/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500]$MM[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1]) {[/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]’1′[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] {[/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500]$PSScriptRoot[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9]+[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”UserCreation.ps1″[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1]}[/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]’2′[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] { [/SIZE][/FONT][/SIZE][/FONT]
    [/CODE]

    Is it obvious what Im doing incorrectly? Thanks[CODE]$PSScriptRoot = Split-Path -Parent -Path $MyInvocation.MyCommand.Definition [/CODE]

    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]

    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”AD Management Menu”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”Press 1: To Create A New User Account”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”Press 2: To Manage O365 Accounts”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”Press Q: To Quit”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]write-host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]

    [FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500]$MM[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9]=[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff][FONT=Lucida Console][SIZE=1][COLOR=#0000ff]Read-Host[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”Please Make Your Selection”[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#00008b][FONT=Lucida Console][SIZE=1][COLOR=#00008b][FONT=Lucida Console][SIZE=1][COLOR=#00008b]Switch[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] ([/SIZE][/FONT][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500]$MM[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1]) {[/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]’1′[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] {[/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500][FONT=Lucida Console][SIZE=1][COLOR=#ff4500]$PSScriptRoot[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9][FONT=Lucida Console][SIZE=1][COLOR=#a9a9a9]+[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]”UserCreation.ps1″[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] [/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1]}[/SIZE][/FONT][/SIZE][/FONT]
    [FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000][FONT=Lucida Console][SIZE=1][COLOR=#8b0000]’2′[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Lucida Console][SIZE=1][FONT=Lucida Console][SIZE=1] { [/SIZE][/FONT][/SIZE][/FONT]
    [/CODE]

    Is it obvious what Im doing incorrectly? Thanks[CODE]write-host “++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++”

    write-host “AD Management Menu”
    write-host
    write-host “Press 1: To Create A New User Account”
    write-host “Press 2: To Manage O365 Accounts”
    write-host “Press Q: To Quit”
    write-host
    write-host
    write-host
    write-host “++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++”

    $MM = Read-Host “Please Make Your Selection”
    Switch ($MM) {
    ‘1’ {
    $PSScriptRoot+“UserCreation.ps1”
    }
    ‘2’ {
    [/CODE]

    Is it obvious what Im doing incorrectly? Thanks

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.