Accessing the location of where the powershell SBL-event logs are stored?
Hi, I am trying to determine where the sblevent logs are installed by the ScriptBlockLoggingAnalyzer module. I am able to see the logs in get-sblevent but when it comes to location the exact location...
View ArticleInvoke-Sqlcmd sql script result to a variable
hi,if i open TestSqlCmd.sql in SSMS and run it i get (78477413 rows affected)(41643 rows affected)(0 rows affected)(0 rows affected)(487545414 rows affected)(0 rows affected) Completion time:...
View Articleconvert .eml to .msg
I have 500000 .eml files that needs to be converted to .msg file and save in local folder.I want to know if we have any powershell command to do so?Or any other efficient method to achieve...
View ArticleERROR in REMOTEHOST @ Cannot convert value value" to type "System.Int32"....
Hi Getting error while trying to download file on remot host from powershell , using below code...
View ArticleSend-MailMessage is not working when email addresses are passed as parameters
Hi, I have below code in a power shell script and i am calling the script with parameters like below, but it is not sending email. .\mail.ps1 -MailFrom "andand@cmd.com" -MailToList"andand@cmd.com,...
View ArticleRemove extra information from Powershell Scripts
Hi All.I have some Ps script which runs Ps commands remotely on other systems using WinRM.For some reason the output of the code keeps coming with the following extras, is there a way for me to remove...
View ArticlePrinting the output in Powershell into a single logfile.
Hi there,I'd like to know how it would be possible, that I could print the whole PowerShell output into a single logifle, as long as one simple script is running. The following happens:I run one simple...
View ArticlePowershell command to replace or remove Watermark in Microsoft Word
Hi Fellows, I have a huge list of Word documents (multi-page) with text based watermark enabled such as "confidential" or "Internal" Is there a PowerShell way to bulk remove or modify the text...
View ArticleStruggling -ExpandProperty to Export-csv
All,I'm learning PS and struggle on formatting when using -expandproperty. I need assistance or guidance please. I am trying to Export-Csv below information. If you noticed the Hostname1 and Hostname2...
View ArticleHow to stop an infinite loop in a GUI, which is running without a console,...
Hi All,This is my first participation in this forum so I hope I'll make it right :-)I have a PS script running in a GUI application which is started through a shortcut...
View ArticleHow to select objects that match a certain pattern
Hi, So for an excel csv file, I'm trying to get rid of all duplicate change request numbers that have a empty cell in the Assignment Group column when at least one of the change request numbers has a...
View ArticlePowershell Newbie - Need help working with a CSV
I've got a command i run to check the MFA device registration status for individual users...Get-MsolUser -UserPrincipalName username@company.com |Where-Object {$_.StrongAuthenticationMethods -like"*"}...
View ArticleUse PS to export/import FSRM file group
Hello I am regularly updating a File Server Resource Manager file group. I need to copy this group to other servers. At present, I manually input file masks then use the filescrn command from the...
View ArticleHelp with Install-Module dotnetversionlister
Hello Guys,So i have installed PS6, along with the below moduleInstall-Module dotnetversionlister$creds = get-credentials Install-Module dotnetversionlister Get-content c:\machines.txt | foreach...
View Articlehow to powershell gui start-job to update form controls
Hello,I've created a powershell gui to do a perpetual ping check against a host, and updates a text box with the results. The problem is that when i have the ping loop executing, the whole becomes...
View ArticleSearch and replace text with &
Hi all,I'm new to PowerShell and I'm trying to do a simple search and replace in a text file. My scenario is I have a text file, generated daily, that doesn't handle accented characters etc very well....
View ArticleHow to add multiple objects to an SCCM collection where the first collection...
I have a collection with almost 5000 computer objects in it, but I need to create 5 collections as stated in the title. I can get all of the objects from this collection using the following...
View ArticleHow to run power shell script in HTML
Hi Team Need Expert guidance here.I am developing a self service portal in html where i have to call several power shell scripts ,so i am looking for someone who will support me to run or host the...
View ArticleUse powershell to compare columns in excel
I have an excel workbook with two sheets. I want to compare two columns in different sheets using powershell.Say column C in Sheet 1 needs to be compared to column D in Sheet2. Column C has say 100...
View ArticleImport-csv file for robocopy
I am using a powershell script which imports a csv file to copy directories. Since the folders which I need to copy contain spaces I use double quotes in the csv file.Although I don't get the right...
View Article