Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 3 additions & 14 deletions ConfigMgrPXEBootLog.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,7 @@
### ConfigMgr PXE Boot Log ###
##############################

# Set the source directory
$OS = (Get-CimInstance -ClassName Win32_OperatingSystem -Property OSArchitecture).OSArchitecture
If ($OS -eq "32-bit")
{
$ProgramFiles = $env:ProgramFiles
}
If ($OS -eq "64-bit")
{
$ProgramFiles = ${env:ProgramFiles(x86)}
}

$Source = "$ProgramFiles\SMSAgent\ConfigMgr PXE Boot Log"
$Source = $PSScriptRoot

# Load the required assemblies
Add-Type -AssemblyName PresentationFramework
Expand Down Expand Up @@ -77,7 +66,7 @@ $PSFiles | foreach {
}

# Define the XAML code for the main window
[XML]$Xaml = [System.IO.File]::ReadAllLines("$Source\XAML files\App.xaml")
[XML]$Xaml = [System.IO.File]::ReadAllLines("$Source\XAML files\App.xaml")

# Create a synchronized hash table and add the WPF window and its named elements to it
$Global:UI = [System.Collections.Hashtable]::Synchronized(@{})
Expand Down Expand Up @@ -191,4 +180,4 @@ Else
$app = New-Object -TypeName Windows.Application
$app.Run($UI.Window)

}
}