Skip to content

Commit

Permalink
2.7.1 release (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
jworkmanjc authored Jul 16, 2024
1 parent 7b199d7 commit ee0a00c
Show file tree
Hide file tree
Showing 5 changed files with 105 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/admu-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- master
permissions:
contents: read
contents: write
id-token: write
jobs:
Check-If-Merged:
Expand Down
4 changes: 2 additions & 2 deletions jumpcloud-ADMU/JumpCloud.ADMU.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#
# Generated by: JumpCloud Solutions Architect Team
#
# Generated on: 5/14/2024
# Generated on: 7/16/2024
#

@{
Expand All @@ -13,7 +13,7 @@

# Version number of this module.

ModuleVersion = '2.7.0'
ModuleVersion = '2.7.1'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
6 changes: 3 additions & 3 deletions jumpcloud-ADMU/Powershell/Form.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function show-mtpSelection {
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="JumpCloud ADMU 2.7.0"
Title="JumpCloud ADMU 2.7.1"
WindowStyle="SingleBorderWindow"
ResizeMode="NoResize"
Background="White" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible" Width="1010" Height="580">
Expand Down Expand Up @@ -698,11 +698,11 @@ $tbJumpCloudUserName.add_TextChanged( {
$img_localaccount_valid.Source = DecodeBase64Image -ImageBase64 $ActiveBase64
$img_localaccount_valid.ToolTip = $null
}
if($tbJumpCloudUserName.Text -eq $hostname){
if ($tbJumpCloudUserName.Text -eq $hostname) {
Write-ToLog "JumpCloud Username can not be the same as the hostname"
$script:bMigrateProfile.IsEnabled = $false
$img_localaccount_valid.ToolTip = "JumpCloud Username can not be the same as the hostname. Please change the username."
}
}
})

$tbJumpCloudConnectKey.Add_PasswordChanged( {
Expand Down
196 changes: 98 additions & 98 deletions jumpcloud-ADMU/Powershell/ProgressForm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function DecodeBase64Image {
$ObjBitmapImage
}

function New-ProgressForm{
function New-ProgressForm {
# Synchash the values
[System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms') | Out-Null
[System.Reflection.Assembly]::LoadWithPartialName('presentationframework') | Out-Null
Expand All @@ -37,7 +37,7 @@ function New-ProgressForm{
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Name="Window" Title="JumpCloud ADMU 2.7.0"
Name="Window" Title="JumpCloud ADMU 2.7.1"
WindowStyle="SingleBorderWindow"
ResizeMode="NoResize"
Background="White" Width="720" Height="540">
Expand Down Expand Up @@ -195,9 +195,9 @@ The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for t
</Grid>
</Window>
"@
# Colors
# Foreground="#90b7fc" Darkblue
# Foreground="#52C4C1" Teal
# Colors
# Foreground="#90b7fc" Darkblue
# Foreground="#52C4C1" Teal
# Create a runspace to run the form in
$newRunspace.ApartmentState = "STA"
$newRunspace.ThreadOptions = "ReuseThread"
Expand All @@ -206,106 +206,106 @@ The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for t

# Add the form code to the powershell instance
$psCommand = [PowerShell]::Create().AddScript({
# Load an xaml form
# Load an xaml form

$syncHash.Window = [Windows.Markup.XamlReader]::parse( $SyncHash.XAML )
$syncHash.Window = [Windows.Markup.XamlReader]::parse( $SyncHash.XAML )
([xml]$SyncHash.XAML).SelectNodes("//*[@Name]") | ForEach-Object { $SyncHash."$($_.Name)" = $SyncHash.Window.FindName($_.Name) }
# Image
$SyncHash.JCLogoImg.Source = $syncHash.base64JCLogo
$syncHash.Username.Content = $syncHash.UsernameInput
$syncHash.ProfileSize.Content = $syncHash.ProfileSizeInput
$syncHash.LocalPath.Content = $syncHash.LocalPathInput
$syncHash.NewLocalUsername.Content = $syncHash.NewLocalUsernameInput
# Image
$SyncHash.JCLogoImg.Source = $syncHash.base64JCLogo
$syncHash.Username.Content = $syncHash.UsernameInput
$syncHash.ProfileSize.Content = $syncHash.ProfileSizeInput
$syncHash.LocalPath.Content = $syncHash.LocalPathInput
$syncHash.NewLocalUsername.Content = $syncHash.NewLocalUsernameInput

# Scroll to end of Log
$syncHash.ScrollLog.ScrollToEnd()


$updateForm = {

# Migration Details

if ($SyncHash.closeWindow -eq $True) {
$syncHash.Window.Close()
[System.Windows.Forms.Application]::Exit()
Break
}
# IF close window button is clicked
if ($SyncHash.Closing) {
$SyncHash.Window.Close()
[System.Windows.Forms.Application]::Exit()
Break
}
if ($SyncHash.logLevel -eq "Error") {
#$syncHash.Status.Foreground = "Red"
# Hide Progress Bar
$SyncHash.ProgressBar.Visibility = "Hidden"
# Show Eorr Link and make clickable
$syncHash.ErrorBlock.Visibility = "Visible"
# Clickable link
$SyncHash.ErrorLink.add_RequestNavigate({
#Sender is an event handler and used when the link is clicked https://learn.microsoft.com/en-us/dotnet/api/system.windows.navigation.requestnavigateeventargs.invokeeventhandler?view=windowsdesktop-8.0#system-windows-navigation-requestnavigateeventargs-invokeeventhandler(system-delegate-system-object
# Suppress PSScriptAnalyzer rule that warns about 'Sender' being an automatic variable
# <pragma>disable PSAvoidUsingAutomaticVariable
param ($SenderParam, $e)
if (-not $SenderParam) {
Write-Error "SenderParam needs to be populated"
}
[System.Diagnostics.Process]::Start($e.Uri.AbsoluteUri) # Open the link in the default web browser
$e.Handled = $true
})

}
if ($synchash.PercentComplete -eq 100) {
$SyncHash.ViewLogButton.IsEnabled = $true
$SyncHash.StartJCADMUButton.IsEnabled = $true
$SyncHash.ExitButton.IsEnabled = $true
}

# Update Log TextBlock
$SyncHash.LogTextBlock.Text = $syncHash.LogText
# Update Progress Bar
$SyncHash.ProgressBar.Value = $SyncHash.PercentComplete
# Update Status Text
$SyncHash.Status.Text = $SyncHash.StatusInput

# Scroll to end of Log
$syncHash.ScrollLog.ScrollToEnd()


$updateForm = {

# Migration Details

if ($SyncHash.closeWindow -eq $True) {
$syncHash.Window.Close()
[System.Windows.Forms.Application]::Exit()
Break
}
# IF close window button is clicked
if ($SyncHash.Closing) {
$SyncHash.Window.Close()
[System.Windows.Forms.Application]::Exit()
Break
}
if ($SyncHash.logLevel -eq "Error") {
#$syncHash.Status.Foreground = "Red"
# Hide Progress Bar
$SyncHash.ProgressBar.Visibility = "Hidden"
# Show Eorr Link and make clickable
$syncHash.ErrorBlock.Visibility = "Visible"
# Clickable link
$SyncHash.ErrorLink.add_RequestNavigate({
#Sender is an event handler and used when the link is clicked https://learn.microsoft.com/en-us/dotnet/api/system.windows.navigation.requestnavigateeventargs.invokeeventhandler?view=windowsdesktop-8.0#system-windows-navigation-requestnavigateeventargs-invokeeventhandler(system-delegate-system-object
# Suppress PSScriptAnalyzer rule that warns about 'Sender' being an automatic variable
# <pragma>disable PSAvoidUsingAutomaticVariable
param ($SenderParam, $e)
if (-not $SenderParam) {
Write-Error "SenderParam needs to be populated"
# View Log Button
$SyncHash.ViewLogButton.Add_Click({
# Open log \Windows\Temp\jcAdmu.log
$scriptPath = "$(Get-WindowsDrive)\Windows\Temp\jcAdmu.log"
# Open the log
Invoke-Item -Path:($scriptPath)
})
# Start JCADMU Button
$syncHash.StartJCADMUButton.Add_Click({
# Get the path of the exe then rerun
$exeFilePath = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName
Start-Process -FilePath $exeFilePath
# Close the current window
$syncHash.CloseWindow = $true
})

$synchash.ExitButton.Add_Click({
$syncHash.CloseWindow = $true
})

# Time to update the form
$syncHash.Window.Add_SourceInitialized( {
$timer = new-object System.Windows.Threading.DispatcherTimer
$timer.Interval = [TimeSpan]"0:0:0.01"
$timer.Add_Tick( $updateForm )
$timer.Start()
if (!$timer.IsEnabled ) {
$clock.Close()
Write-Error "Timer didn't start"
}
[System.Diagnostics.Process]::Start($e.Uri.AbsoluteUri) # Open the link in the default web browser
$e.Handled = $true
})

}
if ($synchash.PercentComplete -eq 100) {
$SyncHash.ViewLogButton.IsEnabled = $true
$SyncHash.StartJCADMUButton.IsEnabled = $true
$SyncHash.ExitButton.IsEnabled = $true
}
} )

# Update Log TextBlock
$SyncHash.LogTextBlock.Text = $syncHash.LogText
# Update Progress Bar
$SyncHash.ProgressBar.Value = $SyncHash.PercentComplete
# Update Status Text
$SyncHash.Status.Text = $SyncHash.StatusInput

}
# View Log Button
$SyncHash.ViewLogButton.Add_Click({
# Open log \Windows\Temp\jcAdmu.log
$scriptPath = "$(Get-WindowsDrive)\Windows\Temp\jcAdmu.log"
# Open the log
Invoke-Item -Path:($scriptPath)
})
# Start JCADMU Button
$syncHash.StartJCADMUButton.Add_Click({
# Get the path of the exe then rerun
$exeFilePath = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName
Start-Process -FilePath $exeFilePath
# Close the current window
$syncHash.CloseWindow = $true
})

$synchash.ExitButton.Add_Click({
$syncHash.CloseWindow = $true
$syncHash.Window.Show() | Out-Null
$appContext = [System.Windows.Forms.ApplicationContext]::new()
[void][System.Windows.Forms.Application]::Run($appContext)
})

# Time to update the form
$syncHash.Window.Add_SourceInitialized( {
$timer = new-object System.Windows.Threading.DispatcherTimer
$timer.Interval = [TimeSpan]"0:0:0.01"
$timer.Add_Tick( $updateForm )
$timer.Start()
if (!$timer.IsEnabled ) {
$clock.Close()
Write-Error "Timer didn't start"
}
} )

$syncHash.Window.Show() | Out-Null
$appContext = [System.Windows.Forms.ApplicationContext]::new()
[void][System.Windows.Forms.Application]::Run($appContext)
})
# Invoke PS Command
$psCommand.Runspace = $newRunspace
$data = $psCommand.BeginInvoke()
Expand Down
2 changes: 1 addition & 1 deletion jumpcloud-ADMU/Powershell/Start-Migration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1869,7 +1869,7 @@ Function Start-Migration {
$AGENT_INSTALLER_URL = "https://cdn02.jumpcloud.com/production/jcagent-msi-signed.msi"
$AGENT_INSTALLER_PATH = "$windowsDrive\windows\Temp\JCADMU\jcagent-msi-signed.msi"
$AGENT_CONF_PATH = "$($AGENT_PATH)\Plugins\Contrib\jcagent.conf"
$admuVersion = '2.7.0'
$admuVersion = '2.7.1'

$script:AdminDebug = $AdminDebug
$isForm = $PSCmdlet.ParameterSetName -eq "form"
Expand Down

0 comments on commit ee0a00c

Please sign in to comment.