Convert JPEG to PDF
Can anyone provide a sample of the easiest way to convert a JPEG to PDF?
View ArticleRobocopy Only Output Copied Files
I have the following Robocopy command. Currently it outputs all directories it is traversing during the mirror but I only want it to output what actually got synced from source to destination. I'm not...
View ArticleSuppressing VERBOSE for Import-Module
I'm importing Carbon into my PowerShell script; however when running my script with -Verbose, Carbon also outputs a lot of VERBOSE statements.Is it possible to Import-Module silently such that I can...
View ArticlePowershell - Find the next Friday
Hoping this won't be too difficult but I am writing a script that queries user information from the domain and exports to CSV.The script is run by our administrative staff and all they need to input...
View ArticleInvoke-Command with -credentials
I want to invoke a command on a remote server, I do not want to have to put in the password to run the script. I've tried encrypting the password and storing it in a txt file. $username =...
View ArticleDelete empty rows in multiple csv files by using Powershell [duplicate]
To delete empty rows in multiple CSV files by using Powershell. This is the code I am trying to use for each loop. But it is writing empty files. The resulting file should open in Excel and Notepad++...
View ArticleWhy do weekly tasks created via PowerShell using a different user fail with...
We have some scripts that create scheduled jobs using PowerShell as part of our application. When testing them recently, I noticed that some of them always failed immediately, and no output is ever...
View ArticleHow to set Low I/O ("background") priority in Powershell
There's this powershell script which can set processes' priorities from "Idle" to "Realtime" but some tools offer another priority level which drops a process's priority even below:How to set that in...
View ArticlePowerShell Script to Change Printer Drivers on Several Printers
I'm trying to make a PowerShell script that will change all the drivers for a specific set of printers.I have about 200 printers whose name begins with the letter Z.I also have a handful of printers...
View ArticleRemove last already printed to console line in Powershell
I am calling a command like this:Write-Host 'Calling myScript... ' -NoNewlineInvoke-Expression '& .\myScript.bat arg1 arg2 arg3'If ($LASTEXITCODE -eq 0) { Write-Host 'done' }Else { Write-Host...
View ArticleHow to append the data into HTML file or HTML table using PowerShell
I am working on a health check PowerShell script that is generating an HTML file. Now, I want to update the solution where If I run the same script again (as a post check) it should create maybe...
View ArticleI need a script for SCCM detection key to Match Value Data
/* I need a script SCCM detection key for match "Value Data" in "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" Without using "ValueName" Match "ValueData".*/How to resolve this...
View ArticleHow to execute a CMD file in remote computer
I am looking to execute a command in remote machine using invoke but the .cmd file will call for additional .vbs script. So i guess i may have to mention CScript if so how do i mention both cmd/c and...
View ArticleHow to delete all lines AFTER and INCLUDING a certain string?
I have a need to delete all lines in a csv AFTER and INCLUDING a certain string. The string is as follows :S_Channel_Alt_ViewThe file should then look like thisI've tried to set something up using...
View ArticleConfiguring "Do not forcefully unload the users registry at user logoff" in...
I need to write a PowerShell script that should configure the below settings of Group policy in all the machines.Gpedit.msc → Computer Configuration → Administrative Templates → System → User Profiles...
View ArticlePowershell Net.HttpWebRequest returns "Getresponse with 0 arguments"
I have a small script that retrieves a website's SSL's expiring date.here's the code:[Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}$timeoutMilliseconds = 10000$req = $null$req...
View ArticlePowershell GUI to capture Date & Time to Variable
This code open GUI to Input Time & Date:Add-Type -AssemblyName System.Windows.Forms# Main Form$mainForm = New-Object System.Windows.Forms.Form$font = New-Object System.Drawing.Font(“Consolas”,...
View ArticleCan't Activate Document in Pipeline (unix script)
I'm trying to run the program bayes-seg with: cat data/books/clinical/050.ref | ./segment config/dp.config using Powershell. I understand that the command cat outputs the file and pipe will use the...
View ArticlePowershell script to see currently logged in users (domain and machine) +...
I am searching for a simple command to see logged on users on server.I know this one :Get-WmiObject -Class win32_computersystembut this will not provide me the info I need.It returns...
View ArticleGenerating Powershell scripts by working in Windows GUI
My understanding is that virtually all "real work" done by the various GUI components in Windows Server 2012 (for example, in Disk Management) is performed by invoking Powershell. (That is, there's...
View Article