Category: Microsoft
Category Archives: Microsoft
Troubleshooting Bootmgfw.efi Problems Preventing Windows 10 Booting
Salutations!
I have been enjoying the experience of simultaneously running Linux Mint and macOS on my laptop by utilizing separate external SSD drives for each operating system. The boot loader I’ve been employing is rEFInd. Recently, however, I encountered an issue when attempting to boot into macOS. A message appeared on the screen stating:
“Error: premature end of file /EFI/APPLE/BOOT/BOOTX64.efi.”
Despite my efforts to resolve this problem through online research, I could not find any useful resources addressing this specific premature end error. The solutions provided were more geared towards cases where the mentioned file was missing altogether.
To address the issue, I attempted to use the macOS recovery system. However, upon opening the Disk Utility, the external SSD drive housing macOS was not detected. Only the USB drive containing the macOS installer was visible.
Feeling quite uncertain about how to proceed, any guidance or assistance would be greatly appreciated.
Salutations! I have been enjoying the experience of simultaneously running Linux Mint and macOS on my laptop by utilizing separate external SSD drives for each operating system. The boot loader I’ve been employing is rEFInd. Recently, however, I encountered an issue when attempting to boot into macOS. A message appeared on the screen stating: “Error: premature end of file /EFI/APPLE/BOOT/BOOTX64.efi.” Despite my efforts to resolve this problem through online research, I could not find any useful resources addressing this specific premature end error. The solutions provided were more geared towards cases where the mentioned file was missing altogether. To address the issue, I attempted to use the macOS recovery system. However, upon opening the Disk Utility, the external SSD drive housing macOS was not detected. Only the USB drive containing the macOS installer was visible. Feeling quite uncertain about how to proceed, any guidance or assistance would be greatly appreciated. Read More
Lock Desktop Icon Positions
I recently adjusted my desktop settings by right-clicking on an empty area of the desktop, selecting “View,” unchecking “Auto arrange icons,” and checking “align icons to a grid.” Although my settings reflected this configuration, a peculiar issue persisted. When I transferred a movie file from a USB stick to the desktop, the file would unexpectedly disrupt the arrangement of existing desktop icons.
I recently adjusted my desktop settings by right-clicking on an empty area of the desktop, selecting “View,” unchecking “Auto arrange icons,” and checking “align icons to a grid.” Although my settings reflected this configuration, a peculiar issue persisted. When I transferred a movie file from a USB stick to the desktop, the file would unexpectedly disrupt the arrangement of existing desktop icons. Read More
Repair Installation Does Not Fully Restore Missing SYSTEM Settings Option
I recently performed a complete reinstall of Windows, as the Settings SYSTEM window was only displaying limited options. Following the update, the SYSTEM interface now includes a wider array of choices. How can I ensure that all options such as Display and Sound are fully restored on the SYSTEM window?
I recently performed a complete reinstall of Windows, as the Settings SYSTEM window was only displaying limited options. Following the update, the SYSTEM interface now includes a wider array of choices. How can I ensure that all options such as Display and Sound are fully restored on the SYSTEM window? Read More
Unusual Problem with Boots
Thank you for taking the time to engage in this content.
I am a user of Windows 10 Home edition and I typically keep my computer running continuously. Recently, I encountered a major issue when my PC forced an update that caused it to fail to boot back into the operating system. Despite trying various troubleshooting methods like entering automatic repair and utilizing commands like bcd and diskpart, I was unable to regain access to Windows.
After spending considerable time attempting to resolve the issue and consulting online resources, my system reached a point where it no longer recognized the drives as boot drives. I even encountered corruption in my USB drive when attempting to use it as a workaround for accessing Windows. Reinstalling Windows using the recovery tool proved unsuccessful, and it seemed as though the operating system was present but inaccessible.
In a moment of desperation, I removed the hard drive from another computer also running Windows 10 and managed to successfully boot my system from it. While this allowed me to access Windows and confirm that all my drives were functional, I am now faced with the challenge of restoring my system to boot from the solid-state drive that has been its primary boot drive for years.
Can you suggest any solutions to help me restore the original boot functionality to my solid-state drive?
Thank you for taking the time to engage in this content. I am a user of Windows 10 Home edition and I typically keep my computer running continuously. Recently, I encountered a major issue when my PC forced an update that caused it to fail to boot back into the operating system. Despite trying various troubleshooting methods like entering automatic repair and utilizing commands like bcd and diskpart, I was unable to regain access to Windows. After spending considerable time attempting to resolve the issue and consulting online resources, my system reached a point where it no longer recognized the drives as boot drives. I even encountered corruption in my USB drive when attempting to use it as a workaround for accessing Windows. Reinstalling Windows using the recovery tool proved unsuccessful, and it seemed as though the operating system was present but inaccessible. In a moment of desperation, I removed the hard drive from another computer also running Windows 10 and managed to successfully boot my system from it. While this allowed me to access Windows and confirm that all my drives were functional, I am now faced with the challenge of restoring my system to boot from the solid-state drive that has been its primary boot drive for years. Can you suggest any solutions to help me restore the original boot functionality to my solid-state drive? Read More
How to Cut, Copy, and Paste in Windows 11
I asked about this previously, but unfortunately lost the link. I recently upgraded my computer operating system to Windows 11, and I’ve noticed that I now have to tap on “Show More Options” every time I copy and paste. This was one of the reasons why I hesitated to upgrade to Windows 11 for so long. However, I finally decided to upgrade because I was tired of constantly receiving upgrade notifications.
Now that I’m on Windows 23H2, if anyone has a solution to this issue, please kindly share it with me. It’s frustrating to have to go through an additional step for something as simple as copying and pasting, especially since I use this function daily. Thank you in advance for your help.
I asked about this previously, but unfortunately lost the link. I recently upgraded my computer operating system to Windows 11, and I’ve noticed that I now have to tap on “Show More Options” every time I copy and paste. This was one of the reasons why I hesitated to upgrade to Windows 11 for so long. However, I finally decided to upgrade because I was tired of constantly receiving upgrade notifications. Now that I’m on Windows 23H2, if anyone has a solution to this issue, please kindly share it with me. It’s frustrating to have to go through an additional step for something as simple as copying and pasting, especially since I use this function daily. Thank you in advance for your help. Read More
Event ID 41: Your System Restarted Without Properly Shutting Down First
Occasionally, my computer experiences a frustrating crash due to a critical error, regardless of my activity, whether it’s gaming or watching videos on YouTube.
I am puzzled about the root cause of this issue. Any assistance provided would be greatly appreciated. Thank you in advance for your help!
Occasionally, my computer experiences a frustrating crash due to a critical error, regardless of my activity, whether it’s gaming or watching videos on YouTube. I am puzzled about the root cause of this issue. Any assistance provided would be greatly appreciated. Thank you in advance for your help! Read More
Struggling with Freezes After Fresh Installation of Windows 10
This is a completely new setup, the third attempt, and while it functions smoothly once running, it is marred by the necessity of 4-5 hard resets every day (within just 4 days). The recurrent need for resets seems entirely random and frustrating.
Launching a program requires a delay of 15-30 seconds after double-clicking – if the program even starts. Often, multiple clicks are needed due to a slightly unresponsive mouse. The tower has been reset so frequently that a crucial 40GB ORP file intended for archiving, acquired legally through torrenting, has now rendered the storage drive unusable. Until this issue is resolved or I revert to Windows 7, the drive remains disconnected.
For instance, when I installed Wordweb, a popup dictionary, and attempted to launch it, the system froze completely. After utilizing the reset button (my trusty companion), the program ran smoothly, but my Firefox profile suffered irreparable damage.
The main suspect in this situation is ZoneAlarm, an older version that has operated without issue or complaint. Apart from small applications like Total Commander and MusicBee, nothing else has been added to the system.
This is a completely new setup, the third attempt, and while it functions smoothly once running, it is marred by the necessity of 4-5 hard resets every day (within just 4 days). The recurrent need for resets seems entirely random and frustrating. Launching a program requires a delay of 15-30 seconds after double-clicking – if the program even starts. Often, multiple clicks are needed due to a slightly unresponsive mouse. The tower has been reset so frequently that a crucial 40GB ORP file intended for archiving, acquired legally through torrenting, has now rendered the storage drive unusable. Until this issue is resolved or I revert to Windows 7, the drive remains disconnected. For instance, when I installed Wordweb, a popup dictionary, and attempted to launch it, the system froze completely. After utilizing the reset button (my trusty companion), the program ran smoothly, but my Firefox profile suffered irreparable damage. The main suspect in this situation is ZoneAlarm, an older version that has operated without issue or complaint. Apart from small applications like Total Commander and MusicBee, nothing else has been added to the system. Read More
“Modification of Onedrive File Path”
Hello everyone,
I need some guidance. My Outlook pst file in MS Office 2016 is currently stored within the Onedrive framework. Outlook indicates that it can be found under C:Users…(me)…Onedrive…
Interestingly, this structure is also visible in Explorer under “Onedrive – Personal”.
The issue is that the pst file displayed within this structure is incorrect and outdated. How can I align and resolve the discrepancy between these two structures?
I appreciate any assistance you can provide on this matter.
Hello everyone, I need some guidance. My Outlook pst file in MS Office 2016 is currently stored within the Onedrive framework. Outlook indicates that it can be found under C:Users…(me)…Onedrive… Interestingly, this structure is also visible in Explorer under “Onedrive – Personal”. The issue is that the pst file displayed within this structure is incorrect and outdated. How can I align and resolve the discrepancy between these two structures? I appreciate any assistance you can provide on this matter. Read More
app password required for outlook 2fA
When I try to access 2FA desktop Outlook accounts from Thunderbird, I am told:
You need an app passwordWe noticed that you tried to sign in with the password for your Microsoft account on one of these apps or devices. Since you’ve turned on two-step verification for sb**email address removed for privacy reasons, you need to use an app password instead for any of the following to work with two-step verification. We’ve sent this reminder to all the security info you’ve provided. If you haven’t already done this, we’ll help you set up these apps and devices with app passwords:Outlook desktop app for your PC or Mac
I successfully generated an app password, but when I tried to directly access an Outlook account with it (not through Thunderbird), the password was rejected. What am I doing wrong?
When I try to access 2FA desktop Outlook accounts from Thunderbird, I am told: You need an app passwordWe noticed that you tried to sign in with the password for your Microsoft account on one of these apps or devices. Since you’ve turned on two-step verification for sb**email address removed for privacy reasons, you need to use an app password instead for any of the following to work with two-step verification. We’ve sent this reminder to all the security info you’ve provided. If you haven’t already done this, we’ll help you set up these apps and devices with app passwords:Outlook desktop app for your PC or Mac I successfully generated an app password, but when I tried to directly access an Outlook account with it (not through Thunderbird), the password was rejected. What am I doing wrong? Read More
AVD pool one public address
Hi all,
We currently have a Host pool setup with 3 session hosts. we installed some legacy applications(image) that need whitelist one only Public IP address, how can i configure the 3 AVD hosts pointing to same Public IP address?
Thanks
lee
Hi all, We currently have a Host pool setup with 3 session hosts. we installed some legacy applications(image) that need whitelist one only Public IP address, how can i configure the 3 AVD hosts pointing to same Public IP address? Thankslee Read More
can anyone help me with this formula??
(english is not my 1st language hoping anyone can understawanted the net to show “0” instead of negative numbers, anyone know the formula ? also can its also count all the NET even all the gross not yet finish, so it will automatically show me the present calculation of the net. Now i try it cannot coz it will also count the negative figure.
(english is not my 1st language hoping anyone can understawanted the net to show “0” instead of negative numbers, anyone know the formula ? also can its also count all the NET even all the gross not yet finish, so it will automatically show me the present calculation of the net. Now i try it cannot coz it will also count the negative figure. Read More
Optimisation for Resource Allocation
Hello!
I’m currently trying to process data in Excel, and looking at how I might optimise my distribution of resources.
Effectively, I have a number of students who have provided up to 3 preferences for a staff member to talk to for guidance, and I’m looking if there’s a way to optimise my spread for the most equal distribution of students per staff member.
Some staff members have been requested more than others, which is unavoidably going to lead to them having larger loads, but trying to distribute as evenly as possible. Is there a solution I’m not thinking of right now? I have the ability to process this data in either 365 or the desktop app.
Hello!I’m currently trying to process data in Excel, and looking at how I might optimise my distribution of resources.Effectively, I have a number of students who have provided up to 3 preferences for a staff member to talk to for guidance, and I’m looking if there’s a way to optimise my spread for the most equal distribution of students per staff member. Some staff members have been requested more than others, which is unavoidably going to lead to them having larger loads, but trying to distribute as evenly as possible. Is there a solution I’m not thinking of right now? I have the ability to process this data in either 365 or the desktop app. Read More
How to onboard Sentinel in GCCHigh
Is there any good documentation for how to onboard Sentinel in GCCHigh?
Is there any good documentation for how to onboard Sentinel in GCCHigh? Read More
How to COUNTIFS with mixed criteria
I am having some issues with using the COUNTIFS function. My spreadsheet has all the readers enrolled in my reading challenges for June, sorted by age. I need to be able to quickly calculate how many readers in each of my age groups logged reading during the month, but the Ages are messing me up. I used the following functions to successfully determine:
How many Avid readers aged 0-11 logged reading: =COUNTIFS(AVID!$A$2:$A$500,”<12″,AVID!I2:$I$500,”>0″)
How many Avid readers aged 12-18 logged reading:
=COUNTIFS(AVID!$A$2:$A$500,”>11.5″,AVID!$A$2:$A$500,”<19″,AVID!$I$2:$I$500,”>0″)
How many Casual readers aged 0 – 11 logged reading:
=COUNTIFS(CASUAL!$A$2:$A$500,”<12″,CASUAL!$I$2:$I$500,”>0″)
How many Casual readers aged 12-18 logged reading:
=COUNTIFS(CASUAL!$A$2:$A$500,”>11.5″,CASUAL!$A$2:$A$500,”<19″,CASUAL!$I$2:$I$500,”>0″)
note: I have not imported RTM reader data yet . . .
What is messing me up are the ages of my Adult readers. We collect readers ages up to age 20, but all other adult readers are listed as “21+”. How do I amend the COUNTIFS formula to scrape “19,” “20,” and “21+” from my Age column? A link to my sample is below.
Sample Reader Participation Report.xlsx
I am having some issues with using the COUNTIFS function. My spreadsheet has all the readers enrolled in my reading challenges for June, sorted by age. I need to be able to quickly calculate how many readers in each of my age groups logged reading during the month, but the Ages are messing me up. I used the following functions to successfully determine: How many Avid readers aged 0-11 logged reading: =COUNTIFS(AVID!$A$2:$A$500,”<12″,AVID!I2:$I$500,”>0″)How many Avid readers aged 12-18 logged reading: =COUNTIFS(AVID!$A$2:$A$500,”>11.5″,AVID!$A$2:$A$500,”<19″,AVID!$I$2:$I$500,”>0″)How many Casual readers aged 0 – 11 logged reading: =COUNTIFS(CASUAL!$A$2:$A$500,”<12″,CASUAL!$I$2:$I$500,”>0″)How many Casual readers aged 12-18 logged reading: =COUNTIFS(CASUAL!$A$2:$A$500,”>11.5″,CASUAL!$A$2:$A$500,”<19″,CASUAL!$I$2:$I$500,”>0″)note: I have not imported RTM reader data yet . . . What is messing me up are the ages of my Adult readers. We collect readers ages up to age 20, but all other adult readers are listed as “21+”. How do I amend the COUNTIFS formula to scrape “19,” “20,” and “21+” from my Age column? A link to my sample is below. Sample Reader Participation Report.xlsx Read More
Newly added staff not being sent activation email
Having an issue where staff are being added to an existing booking page, but they aren’t receiving the activation email to confirm being added to the Booking page. As a result, they remain ‘not bookable’ – we have a need to add some staff as Administrators, but can’t confirm their access because they don’t receive the email when they are initially added (even though the Bookings dialogue suggests that one has been sent) and when I try to re-send the activation email, nothing changes – the time and date doesn’t update, and no email is received by the user, so it seems like the system hasn’t even tried to send an email out to the user:
It’s interesting to note, that users with existing access can have an email re-sent to them – is there a permissioning issue at play here? All our users should already have the required access (as existing users were added with no issue earlier this year), so I’m not sure what to look at first.
Any helps is greatly appreciated.
Kind regards,
Peter
Having an issue where staff are being added to an existing booking page, but they aren’t receiving the activation email to confirm being added to the Booking page. As a result, they remain ‘not bookable’ – we have a need to add some staff as Administrators, but can’t confirm their access because they don’t receive the email when they are initially added (even though the Bookings dialogue suggests that one has been sent) and when I try to re-send the activation email, nothing changes – the time and date doesn’t update, and no email is received by the user, so it seems like the system hasn’t even tried to send an email out to the user: It’s interesting to note, that users with existing access can have an email re-sent to them – is there a permissioning issue at play here? All our users should already have the required access (as existing users were added with no issue earlier this year), so I’m not sure what to look at first. Any helps is greatly appreciated. Kind regards,Peter Read More
Dev Channel update to 128.0.2730.0 is live.
Hello Insiders! We released 128.0.2730.0 to the Dev channel! This includes numerous fixes. For more details on the changes, check out the highlights below.
Added Features:
Included an icon in the footer elements for autofill suggestions.
Improved Reliability:
Resolved an issue when signing into an AAD account would cause a crash on Android.
Resolved an issue where the browser crashes when playing YouTube videos after a restart.
Changed Behavior:
Resolved an issue where the UI overlapped during AAD login and after a successful sync under favorites.
Resolved an issue where the search button icon lacked sufficient contrast in high contrast mode.
Resolved an issue where, upon opening the same group in browser, all tabs initially load, but a few tabs subsequently disappear.
Fixed an issue where the buttons overlapped on screens with smaller resolutions, even when the browser was maximized.
Mac: Resolved an issue where the FRE page was skipped, and the browser was unresponsive on Mac and Mac Arm platforms upon launch.
Android:
Resolved an issue where the Sign-In page’s layout and color scheme were not consistent with other pages on android.
Resolved an issue where the Immersive Translate panel was displayed in the middle of the screen on android.
iOS:
Fixed an issue where the ‘Continue’ button was displayed in a lower position on the implicit sign-in page on iOS.
Fixed an issue where users were unable to rearrange or drag items using single-point mode on the All-menu page in iOS.
Resolved an issue where clicking ‘sync settings’ on the implicit sign-in page caused the account information to appear blank.
See an issue that you think might be a bug? Remember to send that directly through the in-app feedback by heading to the … menu > Help and feedback > Send feedback and include diagnostics so the team can investigate.
Thanks again for sending us feedback and helping us improve our Insider builds.
~Gouri
Hello Insiders! We released 128.0.2730.0 to the Dev channel! This includes numerous fixes. For more details on the changes, check out the highlights below.
Added Features:
Included an icon in the footer elements for autofill suggestions.
Improved Reliability:
Resolved an issue when signing into an AAD account would cause a crash on Android.
Resolved an issue where the browser crashes when playing YouTube videos after a restart.
Changed Behavior:
Resolved an issue where the UI overlapped during AAD login and after a successful sync under favorites.
Resolved an issue where the search button icon lacked sufficient contrast in high contrast mode.
Resolved an issue where, upon opening the same group in browser, all tabs initially load, but a few tabs subsequently disappear.
Fixed an issue where the buttons overlapped on screens with smaller resolutions, even when the browser was maximized.
Mac: Resolved an issue where the FRE page was skipped, and the browser was unresponsive on Mac and Mac Arm platforms upon launch.
Android:
Resolved an issue where the Sign-In page’s layout and color scheme were not consistent with other pages on android.
Resolved an issue where the Immersive Translate panel was displayed in the middle of the screen on android.
iOS:
Fixed an issue where the ‘Continue’ button was displayed in a lower position on the implicit sign-in page on iOS.
Fixed an issue where users were unable to rearrange or drag items using single-point mode on the All-menu page in iOS.
Resolved an issue where clicking ‘sync settings’ on the implicit sign-in page caused the account information to appear blank.
See an issue that you think might be a bug? Remember to send that directly through the in-app feedback by heading to the … menu > Help and feedback > Send feedback and include diagnostics so the team can investigate.
Thanks again for sending us feedback and helping us improve our Insider builds.
~Gouri Read More
Help with Powershell scripts to backup and restore printers
Hello all.
I’m rather new to PowerShell. I hope I’m not causing any grief here. I whipped together a proof of concept because I need to protect certain computers’ printing abilities as they are crucial to our business. I know I can use Print Migration to export and import the set of printers. I don’t know how to start Printer Migration giving it a destination of the UNC to the server, the current computer’s name. It does not seem to restore all the printers either.
I really would appreciate the ability to clone an existing printer to a new name and new IP address.
I wanted to see how far Perplexity.AI could take this. It made a start but then started forgetting requirements, re-writing whole scripts, and losing functionality already obtained.
My premise is that copying is backup, change, and restore. So I made Backup-SinglePrinter, Restore-SinglePrinter, and Copy-ExistingPrinter. A settings file is included. I expect that once backup-singleprinter and restore-singleprinter work, I could make a BackupPrinters and RestorePrinters to handle all existing printers.
One final thing is I would like to have the scripts locate each other by using the single settings file or by knowing the starting location of the first script.
Mike
Copy-ExistingPrinter.ps1
<#
.SYNOPSIS
Copies an existing printer to a new printer with a different name and a new IP address.
.DESCRIPTION
This script copies an existing printer by backing it up, modifying the backup,
and then restoring it with a new name and a new IP address.
.PARAMETER ExistingPrinterName
The name of the existing printer to copy from.
.PARAMETER NewPrinterName
The name of the new printer to create.
.EXAMPLE
.Copy-ExistingPrinter.ps1 -ExistingPrinterName “Printer1” -NewPrinterName “Printer2”
#>
param (
[Parameter(Mandatory=$true)]
[string]$ExistingPrinterName,
[Parameter(Mandatory=$true)]
[string]$NewPrinterName
)
# Import settings
$settingsPath = Join-Path $PSScriptRoot “settings.ps1”
if (Test-Path $settingsPath) {
. $settingsPath
} else {
Write-Error “Settings file not found at $settingsPath”
exit 1
}
# Verify that $BaseFolder is set in settings.ps1
if (-not $BaseFolder) {
Write-Error “BaseFolder is not set in settings.ps1”
exit 1
}
# Manually import required modules
$modulesToImport = @(
“Backup-SinglePrinter.psm1”,
“Restore-SinglePrinter.psm1”,
“Find-AvailableIPPort.psm1”,
“Get-PrinterExtendedConfig.psm1”
)
foreach ($module in $modulesToImport) {
$modulePath = Join-Path $BaseFolder $module
if (Test-Path $modulePath) {
Import-Module $modulePath -Force
Write-Host “Imported module: $module” -ForegroundColor Green
} else {
Write-Error “Module $module not found at $modulePath”
exit 1
}
}
# Verify that the functions are available
$requiredFunctions = @(“Backup-SinglePrinter”, “Restore-SinglePrinter”, “Find-AvailableIPPort”, “Get-PrinterExtendedConfig”)
foreach ($func in $requiredFunctions) {
if (-not (Get-Command -Name $func -ErrorAction SilentlyContinue)) {
Write-Error “Required function $func is not available.”
exit 1
} else {
Write-Host “Function $func is available.” -ForegroundColor Green
}
}
try {
# Create backup folder structure
$backupsFolder = Join-Path $BaseFolder “Backups”
$computerName = $env:COMPUTERNAME
$computerBackupFolder = Join-Path $backupsFolder $computerName
$driversFolder = Join-Path $computerBackupFolder “Drivers”
if (-not (Test-Path $computerBackupFolder)) {
New-Item -ItemType Directory -Path $computerBackupFolder -Force | Out-Null
}
if (-not (Test-Path $driversFolder)) {
New-Item -ItemType Directory -Path $driversFolder -Force | Out-Null
}
# Backup the existing printer
Write-Host “Backing up existing printer: $ExistingPrinterName” -ForegroundColor Cyan
$backupFileName = “$ExistingPrinterName.xml”
$backupFile = Join-Path $computerBackupFolder $backupFileName
$backupResult = Backup-SinglePrinter -PrinterName $ExistingPrinterName -BackupFile $backupFile
if (-not $backupResult) {
throw “Failed to backup the existing printer.”
}
# Get the IP address of the existing printer
$existingPrinter = Get-Printer -Name $ExistingPrinterName
$existingPort = Get-PrinterPort -Name $existingPrinter.PortName
$BaseIP = $existingPort.PrinterHostAddress
if ([string]::IsNullOrEmpty($BaseIP)) {
Write-Error “Unable to retrieve IP address for existing printer $ExistingPrinterName”
exit 1
}
Write-Host “Existing printer IP address: $BaseIP” -ForegroundColor Cyan
# Find an available IP port for the new printer
Write-Host “Finding an available IP port for the new printer” -ForegroundColor Cyan
$NewIPAddress = Find-AvailableIPPort -BaseIP $BaseIP
if ($NewIPAddress) {
Write-Host “Available IP port found: $NewIPAddress” -ForegroundColor Green
} else {
throw “No available IP address found.”
}
# Create a new port with the new IP address
$NewPortName = $NewIPAddress
Add-PrinterPort -Name $NewPortName -PrinterHostAddress $NewIPAddress
# Restore the modified backup as a new printer
Write-Host “Restoring modified backup as new printer: $NewPrinterName” -ForegroundColor Cyan
$restoreResult = Restore-SinglePrinter -BackupFile $backupFile -NewPrinterName $NewPrinterName -NewPortName $NewPortName
if ($restoreResult) {
Write-Host “Printer ‘$ExistingPrinterName’ successfully copied to ‘$NewPrinterName’ with IP $NewIPAddress.” -ForegroundColor Green
# Create a backup summary
$summaryFile = Join-Path $computerBackupFolder “BackupSummary.txt”
$summaryContent = @”
Backup performed on: $(Get-Date)
Original Printer: $ExistingPrinterName
New Printer: $NewPrinterName
New IP Address: $NewIPAddress
“@
Add-Content -Path $summaryFile -Value $summaryContent
} else {
throw “Failed to restore the new printer.”
}
}
catch {
Write-Error “An error occurred during the printer copying process: $_”
# Clean up the new printer if it was created
if (Get-Printer -Name $NewPrinterName -ErrorAction SilentlyContinue) {
Remove-Printer -Name $NewPrinterName -ErrorAction SilentlyContinue
}
# Clean up the new port if it was created
if ($NewPortName -and (Get-PrinterPort -Name $NewPortName -ErrorAction SilentlyContinue)) {
Remove-PrinterPort -Name $NewPortName -ErrorAction SilentlyContinue
}
}
# Script Version: 3.9
Backup-SinglePrinter.psm1
function Backup-SinglePrinter {
param (
[Parameter(Mandatory=$true)]
[string]$PrinterName,
[Parameter(Mandatory=$true)]
[string]$BackupFile
)
# Import settings
$settingsPath = Join-Path $PSScriptRoot “settings.ps1”
if (Test-Path $settingsPath) {
. $settingsPath
} else {
Write-Error “Settings file not found at $settingsPath”
return $false
}
# Import printer properties
$propertiesModulePath = Join-Path $BaseFolder “Get-PrinterExtendedConfig.psm1”
if (Test-Path $propertiesModulePath) {
Import-Module $propertiesModulePath -Force
} else {
Write-Error “Get-PrinterExtendedConfig module not found at $propertiesModulePath”
return $false
}
$computerName = $env:COMPUTERNAME
$computerBackupFolder = Join-Path $BackupsFolder $computerName
$driversFolder = Join-Path $computerBackupFolder “Drivers”
if (-not (Test-Path $computerBackupFolder)) {
New-Item -ItemType Directory -Path $computerBackupFolder -Force | Out-Null
}
if (-not (Test-Path $driversFolder)) {
New-Item -ItemType Directory -Path $driversFolder -Force | Out-Null
}
try {
$printer = Get-Printer -Name $PrinterName -Full
$printerConfig = Get-PrintConfiguration -PrinterName $PrinterName
$printerProperties = Get-PrinterProperty -PrinterName $PrinterName
$backupObject = @{
Printer = $printer
Configuration = $printerConfig
Properties = $printerProperties
IsShared = $printer.Shared
ShareName = $printer.ShareName
}
$backupObject | Export-Clixml -Path $BackupFile -Depth 10
# Backup driver files
$driverName = $printer.DriverName
$driverInfo = Get-PrinterDriver -Name $driverName
$driverPath = $driverInfo.InfPath
if ($driverPath) {
Copy-Item -Path $driverPath -Destination $driversFolder -Force
}
Write-Host “Printer ‘$PrinterName’ backed up successfully to $BackupFile”
return $true
}
catch {
Write-Error “Printer backup process failed: $_”
return $false
}
}
Export-ModuleMember -Function Backup-SinglePrinter
Restore-SinglePrinter.psm1
function Restore-SinglePrinter {
param (
[Parameter(Mandatory=$true)]
[string]$BackupFile,
[Parameter(Mandatory=$true)]
[string]$NewPrinterName,
[Parameter(Mandatory=$false)]
[string]$NewPortName
)
try {
$backupObject = Import-Clixml -Path $BackupFile
$printer = $backupObject.Printer
$printerConfig = $backupObject.Configuration
$printerProperties = $backupObject.Properties
# Import printer properties module
$propertiesModulePath = Join-Path $PSScriptRoot “Get-PrinterExtendedConfig.psm1”
if (Test-Path $propertiesModulePath) {
Import-Module $propertiesModulePath -Force
} else {
Write-Error “Get-PrinterExtendedConfig module not found at $propertiesModulePath”
return $false
}
$printerExtendedConfig = Get-PrinterExtendedConfig
# If NewPortName is not provided, use the original port
if (-not $NewPortName) {
$NewPortName = $printer.PortName
}
# Create or update the printer
if (Get-Printer -Name $NewPrinterName -ErrorAction SilentlyContinue) {
Set-Printer -Name $NewPrinterName -DriverName $printer.DriverName -PortName $NewPortName
} else {
Add-Printer -Name $NewPrinterName -DriverName $printer.DriverName -PortName $NewPortName
}
# Restore printer settings
$validPrinterParams = $printerExtendedConfig.PrinterProperties
$printerParams = @{}
foreach ($param in $validPrinterParams) {
if ($null -ne $printer.$param) {
$printerParams[$param] = $printer.$param
}
}
if ($printerParams.Count -gt 0) {
Set-Printer -Name $NewPrinterName @printerParams
}
# Restore configuration
$validConfigParams = $printerExtendedConfig.PrinterConfiguration
$configParams = @{}
foreach ($param in $validConfigParams) {
if ($null -ne $printerConfig.$param -and $printerConfig.$param -isnot [System.Management.Automation.PSMethod]) {
$configParams[$param] = $printerConfig.$param
}
}
if ($configParams.Count -gt 0) {
Set-PrintConfiguration -PrinterName $NewPrinterName @configParams
}
# Restore properties
foreach ($prop in $printerProperties) {
if (-not [string]::IsNullOrWhiteSpace($prop.Name) -and $null -ne $prop.Value) {
try {
Set-PrinterProperty -PrinterName $NewPrinterName -PropertyName $prop.Name -Value $prop.Value -ErrorAction Stop
} catch {
Write-Warning “Unable to set printer property $($prop.Name): $_”
}
}
}
# Restore sharing settings
if ($printer.Shared) {
Set-Printer -Name $NewPrinterName -Shared $true -ShareName $NewPrinterName
}
Write-Host “Printer ‘$NewPrinterName’ restored successfully from $BackupFile”
return $true
}
catch {
Write-Error “Printer restoration process failed: $_”
return $false
}
}
Export-ModuleMember -Function Restore-SinglePrinter
Settings.ps1
# settings.ps1
$BaseFolder = “\testserverdeveloperprinterBackup”
$BackupsFolder = Join-Path $BaseFolder “Backups”
Get-PrinterExtendedConfig.psm1 I hoped would be a single place to list all settings to capture. Maybe that is not needed.
function Get-PrinterExtendedConfig {
return @{
PrinterProperties = @(
‘Comment’,
‘Location’,
‘Shared’,
‘Published’
)
PrinterConfiguration = @(
‘Collate’,
‘Color’,
‘DuplexingMode’,
‘PaperSize’,
‘Orientation’
)
}
}
Export-ModuleMember -Function Get-PrinterExtendedConfig
Find-AvailablePort.psm1
# Find-AvailableIPPort.psm1
function Find-AvailableIPPort {
param (
[string]$BaseIP
)
$existingPorts = Get-PrinterPort | Where-Object { $_.Name -like “$BaseIP*” } | Select-Object -ExpandProperty Name
# If the base IP is not in use, return it
if ($BaseIP -notin $existingPorts) {
return $BaseIP
}
# Check for available ports with suffixes
for ($i = 1; $i -lt 100; $i++) {
$newIP = “${BaseIP}_$i”
if ($newIP -notin $existingPorts) {
return $newIP
}
}
# If no available port found, create a new one with the next available suffix
$maxSuffix = $existingPorts |
Where-Object { $_ -match “${BaseIP}_(d+)” } |
ForEach-Object { [int]($Matches[1]) } |
Measure-Object -Maximum |
Select-Object -ExpandProperty Maximum
return “${BaseIP}_$($maxSuffix + 1)”
}
Export-ModuleMember -Function Find-AvailableIPPort
Hello all. I’m rather new to PowerShell. I hope I’m not causing any grief here. I whipped together a proof of concept because I need to protect certain computers’ printing abilities as they are crucial to our business. I know I can use Print Migration to export and import the set of printers. I don’t know how to start Printer Migration giving it a destination of the UNC to the server, the current computer’s name. It does not seem to restore all the printers either. I really would appreciate the ability to clone an existing printer to a new name and new IP address. I wanted to see how far Perplexity.AI could take this. It made a start but then started forgetting requirements, re-writing whole scripts, and losing functionality already obtained. My premise is that copying is backup, change, and restore. So I made Backup-SinglePrinter, Restore-SinglePrinter, and Copy-ExistingPrinter. A settings file is included. I expect that once backup-singleprinter and restore-singleprinter work, I could make a BackupPrinters and RestorePrinters to handle all existing printers. One final thing is I would like to have the scripts locate each other by using the single settings file or by knowing the starting location of the first script. Mike Copy-ExistingPrinter.ps1 <#
.SYNOPSIS
Copies an existing printer to a new printer with a different name and a new IP address.
.DESCRIPTION
This script copies an existing printer by backing it up, modifying the backup,
and then restoring it with a new name and a new IP address.
.PARAMETER ExistingPrinterName
The name of the existing printer to copy from.
.PARAMETER NewPrinterName
The name of the new printer to create.
.EXAMPLE
.Copy-ExistingPrinter.ps1 -ExistingPrinterName “Printer1” -NewPrinterName “Printer2”
#>
param (
[Parameter(Mandatory=$true)]
[string]$ExistingPrinterName,
[Parameter(Mandatory=$true)]
[string]$NewPrinterName
)
# Import settings
$settingsPath = Join-Path $PSScriptRoot “settings.ps1”
if (Test-Path $settingsPath) {
. $settingsPath
} else {
Write-Error “Settings file not found at $settingsPath”
exit 1
}
# Verify that $BaseFolder is set in settings.ps1
if (-not $BaseFolder) {
Write-Error “BaseFolder is not set in settings.ps1”
exit 1
}
# Manually import required modules
$modulesToImport = @(
“Backup-SinglePrinter.psm1”,
“Restore-SinglePrinter.psm1”,
“Find-AvailableIPPort.psm1”,
“Get-PrinterExtendedConfig.psm1”
)
foreach ($module in $modulesToImport) {
$modulePath = Join-Path $BaseFolder $module
if (Test-Path $modulePath) {
Import-Module $modulePath -Force
Write-Host “Imported module: $module” -ForegroundColor Green
} else {
Write-Error “Module $module not found at $modulePath”
exit 1
}
}
# Verify that the functions are available
$requiredFunctions = @(“Backup-SinglePrinter”, “Restore-SinglePrinter”, “Find-AvailableIPPort”, “Get-PrinterExtendedConfig”)
foreach ($func in $requiredFunctions) {
if (-not (Get-Command -Name $func -ErrorAction SilentlyContinue)) {
Write-Error “Required function $func is not available.”
exit 1
} else {
Write-Host “Function $func is available.” -ForegroundColor Green
}
}
try {
# Create backup folder structure
$backupsFolder = Join-Path $BaseFolder “Backups”
$computerName = $env:COMPUTERNAME
$computerBackupFolder = Join-Path $backupsFolder $computerName
$driversFolder = Join-Path $computerBackupFolder “Drivers”
if (-not (Test-Path $computerBackupFolder)) {
New-Item -ItemType Directory -Path $computerBackupFolder -Force | Out-Null
}
if (-not (Test-Path $driversFolder)) {
New-Item -ItemType Directory -Path $driversFolder -Force | Out-Null
}
# Backup the existing printer
Write-Host “Backing up existing printer: $ExistingPrinterName” -ForegroundColor Cyan
$backupFileName = “$ExistingPrinterName.xml”
$backupFile = Join-Path $computerBackupFolder $backupFileName
$backupResult = Backup-SinglePrinter -PrinterName $ExistingPrinterName -BackupFile $backupFile
if (-not $backupResult) {
throw “Failed to backup the existing printer.”
}
# Get the IP address of the existing printer
$existingPrinter = Get-Printer -Name $ExistingPrinterName
$existingPort = Get-PrinterPort -Name $existingPrinter.PortName
$BaseIP = $existingPort.PrinterHostAddress
if ([string]::IsNullOrEmpty($BaseIP)) {
Write-Error “Unable to retrieve IP address for existing printer $ExistingPrinterName”
exit 1
}
Write-Host “Existing printer IP address: $BaseIP” -ForegroundColor Cyan
# Find an available IP port for the new printer
Write-Host “Finding an available IP port for the new printer” -ForegroundColor Cyan
$NewIPAddress = Find-AvailableIPPort -BaseIP $BaseIP
if ($NewIPAddress) {
Write-Host “Available IP port found: $NewIPAddress” -ForegroundColor Green
} else {
throw “No available IP address found.”
}
# Create a new port with the new IP address
$NewPortName = $NewIPAddress
Add-PrinterPort -Name $NewPortName -PrinterHostAddress $NewIPAddress
# Restore the modified backup as a new printer
Write-Host “Restoring modified backup as new printer: $NewPrinterName” -ForegroundColor Cyan
$restoreResult = Restore-SinglePrinter -BackupFile $backupFile -NewPrinterName $NewPrinterName -NewPortName $NewPortName
if ($restoreResult) {
Write-Host “Printer ‘$ExistingPrinterName’ successfully copied to ‘$NewPrinterName’ with IP $NewIPAddress.” -ForegroundColor Green
# Create a backup summary
$summaryFile = Join-Path $computerBackupFolder “BackupSummary.txt”
$summaryContent = @”
Backup performed on: $(Get-Date)
Original Printer: $ExistingPrinterName
New Printer: $NewPrinterName
New IP Address: $NewIPAddress
“@
Add-Content -Path $summaryFile -Value $summaryContent
} else {
throw “Failed to restore the new printer.”
}
}
catch {
Write-Error “An error occurred during the printer copying process: $_”
# Clean up the new printer if it was created
if (Get-Printer -Name $NewPrinterName -ErrorAction SilentlyContinue) {
Remove-Printer -Name $NewPrinterName -ErrorAction SilentlyContinue
}
# Clean up the new port if it was created
if ($NewPortName -and (Get-PrinterPort -Name $NewPortName -ErrorAction SilentlyContinue)) {
Remove-PrinterPort -Name $NewPortName -ErrorAction SilentlyContinue
}
}
# Script Version: 3.9 Backup-SinglePrinter.psm1 function Backup-SinglePrinter {
param (
[Parameter(Mandatory=$true)]
[string]$PrinterName,
[Parameter(Mandatory=$true)]
[string]$BackupFile
)
# Import settings
$settingsPath = Join-Path $PSScriptRoot “settings.ps1”
if (Test-Path $settingsPath) {
. $settingsPath
} else {
Write-Error “Settings file not found at $settingsPath”
return $false
}
# Import printer properties
$propertiesModulePath = Join-Path $BaseFolder “Get-PrinterExtendedConfig.psm1”
if (Test-Path $propertiesModulePath) {
Import-Module $propertiesModulePath -Force
} else {
Write-Error “Get-PrinterExtendedConfig module not found at $propertiesModulePath”
return $false
}
$computerName = $env:COMPUTERNAME
$computerBackupFolder = Join-Path $BackupsFolder $computerName
$driversFolder = Join-Path $computerBackupFolder “Drivers”
if (-not (Test-Path $computerBackupFolder)) {
New-Item -ItemType Directory -Path $computerBackupFolder -Force | Out-Null
}
if (-not (Test-Path $driversFolder)) {
New-Item -ItemType Directory -Path $driversFolder -Force | Out-Null
}
try {
$printer = Get-Printer -Name $PrinterName -Full
$printerConfig = Get-PrintConfiguration -PrinterName $PrinterName
$printerProperties = Get-PrinterProperty -PrinterName $PrinterName
$backupObject = @{
Printer = $printer
Configuration = $printerConfig
Properties = $printerProperties
IsShared = $printer.Shared
ShareName = $printer.ShareName
}
$backupObject | Export-Clixml -Path $BackupFile -Depth 10
# Backup driver files
$driverName = $printer.DriverName
$driverInfo = Get-PrinterDriver -Name $driverName
$driverPath = $driverInfo.InfPath
if ($driverPath) {
Copy-Item -Path $driverPath -Destination $driversFolder -Force
}
Write-Host “Printer ‘$PrinterName’ backed up successfully to $BackupFile”
return $true
}
catch {
Write-Error “Printer backup process failed: $_”
return $false
}
}
Export-ModuleMember -Function Backup-SinglePrinter Restore-SinglePrinter.psm1 function Restore-SinglePrinter {
param (
[Parameter(Mandatory=$true)]
[string]$BackupFile,
[Parameter(Mandatory=$true)]
[string]$NewPrinterName,
[Parameter(Mandatory=$false)]
[string]$NewPortName
)
try {
$backupObject = Import-Clixml -Path $BackupFile
$printer = $backupObject.Printer
$printerConfig = $backupObject.Configuration
$printerProperties = $backupObject.Properties
# Import printer properties module
$propertiesModulePath = Join-Path $PSScriptRoot “Get-PrinterExtendedConfig.psm1”
if (Test-Path $propertiesModulePath) {
Import-Module $propertiesModulePath -Force
} else {
Write-Error “Get-PrinterExtendedConfig module not found at $propertiesModulePath”
return $false
}
$printerExtendedConfig = Get-PrinterExtendedConfig
# If NewPortName is not provided, use the original port
if (-not $NewPortName) {
$NewPortName = $printer.PortName
}
# Create or update the printer
if (Get-Printer -Name $NewPrinterName -ErrorAction SilentlyContinue) {
Set-Printer -Name $NewPrinterName -DriverName $printer.DriverName -PortName $NewPortName
} else {
Add-Printer -Name $NewPrinterName -DriverName $printer.DriverName -PortName $NewPortName
}
# Restore printer settings
$validPrinterParams = $printerExtendedConfig.PrinterProperties
$printerParams = @{}
foreach ($param in $validPrinterParams) {
if ($null -ne $printer.$param) {
$printerParams[$param] = $printer.$param
}
}
if ($printerParams.Count -gt 0) {
Set-Printer -Name $NewPrinterName @printerParams
}
# Restore configuration
$validConfigParams = $printerExtendedConfig.PrinterConfiguration
$configParams = @{}
foreach ($param in $validConfigParams) {
if ($null -ne $printerConfig.$param -and $printerConfig.$param -isnot [System.Management.Automation.PSMethod]) {
$configParams[$param] = $printerConfig.$param
}
}
if ($configParams.Count -gt 0) {
Set-PrintConfiguration -PrinterName $NewPrinterName @configParams
}
# Restore properties
foreach ($prop in $printerProperties) {
if (-not [string]::IsNullOrWhiteSpace($prop.Name) -and $null -ne $prop.Value) {
try {
Set-PrinterProperty -PrinterName $NewPrinterName -PropertyName $prop.Name -Value $prop.Value -ErrorAction Stop
} catch {
Write-Warning “Unable to set printer property $($prop.Name): $_”
}
}
}
# Restore sharing settings
if ($printer.Shared) {
Set-Printer -Name $NewPrinterName -Shared $true -ShareName $NewPrinterName
}
Write-Host “Printer ‘$NewPrinterName’ restored successfully from $BackupFile”
return $true
}
catch {
Write-Error “Printer restoration process failed: $_”
return $false
}
}
Export-ModuleMember -Function Restore-SinglePrinter Settings.ps1 # settings.ps1
$BaseFolder = “\testserverdeveloperprinterBackup”
$BackupsFolder = Join-Path $BaseFolder “Backups” Get-PrinterExtendedConfig.psm1 I hoped would be a single place to list all settings to capture. Maybe that is not needed. function Get-PrinterExtendedConfig {
return @{
PrinterProperties = @(
‘Comment’,
‘Location’,
‘Shared’,
‘Published’
)
PrinterConfiguration = @(
‘Collate’,
‘Color’,
‘DuplexingMode’,
‘PaperSize’,
‘Orientation’
)
}
}
Export-ModuleMember -Function Get-PrinterExtendedConfig Find-AvailablePort.psm1 # Find-AvailableIPPort.psm1
function Find-AvailableIPPort {
param (
[string]$BaseIP
)
$existingPorts = Get-PrinterPort | Where-Object { $_.Name -like “$BaseIP*” } | Select-Object -ExpandProperty Name
# If the base IP is not in use, return it
if ($BaseIP -notin $existingPorts) {
return $BaseIP
}
# Check for available ports with suffixes
for ($i = 1; $i -lt 100; $i++) {
$newIP = “${BaseIP}_$i”
if ($newIP -notin $existingPorts) {
return $newIP
}
}
# If no available port found, create a new one with the next available suffix
$maxSuffix = $existingPorts |
Where-Object { $_ -match “${BaseIP}_(d+)” } |
ForEach-Object { [int]($Matches[1]) } |
Measure-Object -Maximum |
Select-Object -ExpandProperty Maximum
return “${BaseIP}_$($maxSuffix + 1)”
}
Export-ModuleMember -Function Find-AvailableIPPort Read More
New Blog | Now available: Modernize your SAP environment with Microsoft Entra ID
Building on our joint announcement with SAP earlier this year, we have now released guidance to help customers modernize their SAP environment and move their identity management scenarios from SAP Identity Management (SAP IDM) to Entra ID. With this documentation, SAP IDM customers can migrate seamlessly to the cloud-based IAM and identify the right partners that can assist.
In February, SAP announced that the on-premises tool for managing identity would reach end-of-maintenance by 2030. We are honored that SAP has recommended Microsoft Entra ID, our cloud-based identity and access management solution, to facilitate a seamless migration and ongoing enterprise-wide identity and access management.
Read the full post here: Now available: Modernize your SAP environment with Microsoft Entra ID
By Melanie Maynes
Building on our joint announcement with SAP earlier this year, we have now released guidance to help customers modernize their SAP environment and move their identity management scenarios from SAP Identity Management (SAP IDM) to Entra ID. With this documentation, SAP IDM customers can migrate seamlessly to the cloud-based IAM and identify the right partners that can assist.
In February, SAP announced that the on-premises tool for managing identity would reach end-of-maintenance by 2030. We are honored that SAP has recommended Microsoft Entra ID, our cloud-based identity and access management solution, to facilitate a seamless migration and ongoing enterprise-wide identity and access management.
Read the full post here: Now available: Modernize your SAP environment with Microsoft Entra ID Read More
What is QuickBookꜱ Error 15106 and How to Fix it?
Upon accessing the client’s system remotely, I noted that the error 15106 was indeed preventing QuickBookꜱ from updating to the latest version. The error message indicated a problem with the update program, suggesting that the update couldn’t be initialized due to either a permissions issue or an interference from a third-party application
Upon accessing the client’s system remotely, I noted that the error 15106 was indeed preventing QuickBookꜱ from updating to the latest version. The error message indicated a problem with the update program, suggesting that the update couldn’t be initialized due to either a permissions issue or an interference from a third-party application Read More