Back to Blog
Lansweeper powershell6/2/2023 Scanning is done using Powershell cmdlets and. PSLansweeper - PowerShell Module PSLansweeper is small module (about 80 lines of code) that interacts with Lansweeper SQL Database. I'm open to suggestions if you know a better way to do this. Lansweeper is a great IT assets management tool This new feature was introduced in version 7.1. New-Item -Path "C:\Temp" -Name "Print-Completed.txt" -ItemType "file" -Value "The command was a success." ![]() PowerShell scripts use this Microsoft Authentication Library (MSAL). Dell Command PowerShell provider is built for PowerShell 3. Remove-Printer -Name "\\APP01\Safecom_Color" These tools will make your life easier: Lansweeper, Micke, Remote Support tool. Remove-Printer -Name "\\APP01\Safecom_Black" and synchronizes Lansweeper-discovered assets into your ServiceNow CMDB. (New-Object -ComObject WScript.Network).RemovePrinterConnection("\\APP01\Safecom_Color") Net Script -> This will execute a powershell code (which retrieves the newly. (New-Object -ComObject WScript.Network).RemovePrinterConnection("\\APP01\Safecom_Black") in the report's asset list you can deploy the package to the assets. Note: The GetPendingReboot PowerShell script was modified to fit the needs of this configuration item, its suggested to use the provided CI instead of creating a new one. (New-Object -ComObject WScript.Network).SetDefaultPrinter('\\APP01\SafeQ-BW') You could use 'deploy package' in Lansweeper web console: create a deploy package with the configuration you need and then a report filtering the right assets. We created a new Configuration Item that will use a PowerShell script for the compliance check. ![]() Powershell.exe -executionpolicy bypass -file "\NO.SCR\Add-And-Remove-Printers.ps1"Īdd-printer -ConnectionName "\\APP01\SafeQ-Color"Īdd-printer -ConnectionName "\\APP01\SafeQ-BW" I hope someone can help me with this one. All my other PS scripts works, so maybe there is something that I have overlooked? I want to delete some of the printers that the users have, and add some new setting it as default. It works perfectly when I run it locally on my machine, but when I deploy it, it does not work. Hi! I have some issues when deploying my PowerShell script.
0 Comments
Read More
Leave a Reply. |