select-string extremely slow
HiI have a working script which I want to speed up a little.In this script I build two arrays of files. The first array contains invoices in xml format while the second array contains a list of the...
View ArticleTest-Connection slow response
This is probably pretty simple but I don't understand why test-connection has this behaviorIf I use the command:Test-connection -computername 192.168.10.254 (my nas)There is about a 3 second delay...
View Articlevariable not interpreting when running via Task Scheduler?
Hi.here's a snippet of my code: $a=Get-MailboxDatabase -Identity 'mailbox mbx' -status | select mountedonserver $a=$a.mountedonserver $body = 'It was on ' + $a + '. Moving now.'When I run this via a...
View ArticleWant to Stop Execution when timeout is found
Hi, quick question:I need to use the tracert function but want to stop its execution when it gets 'Request timed out', to not wait for the 30 hops maximum. I do not want to lower the maximum hops. In...
View ArticleCreate string array efficiently?
Hello, I'm trying to create a string array using a string that will be part of the new string in string array.My code works fine but is there a better or an efficient way to handle this? $Project =...
View ArticleAdd Custom Function to Runspace
Hi guys,I should use a Function inside a runspace, I'm trying in every way to insert it and even looking in google I haven't found a clear example, could you tell me what am I wrong?CLS Function...
View ArticleUsing Out-File to Build a CSV File
I am trying to create a CSV file using the values of several variables, but it won't open correctly in Excel. Here's an example of what I am doing in my script:# Specifies the output csv file. $Outfile...
View ArticleAD attribute query - Need some help
First let me say that I have almost no experience with powershell. I know how to dump some code in to a .ps1 file to be run like a batch file. Here is what I'm trying to figure out.We're going to be...
View Articlepowershell test-connection
i have a group of PCi want check and list : if online? list name, IP offline? list name,"offline"here what i have now Get-Content C:\Users\taxu\Documents\2003.csv |...
View Articlebulk update proxy address, they are in one line
HI Experts,Proxy address of all my AD users are blank, so I want to add proxy address in bulki have a csv like...
View Articleset Youtube playback speed from IE within a PS script
Hello,My PS script starts IE and I pass it a Youtube video URL with the StartProcess command.Is it possible to also set the playback speed at the same time? If so, how is this done?Thanks for the help,--
View ArticleRemoving duplicate audio files with different UTC timestamps in filenames,...
I have a drive with many thousands of sound effects. The files have been stored on different operating systems and NAS devices over time and there are now duplicates of many files, but the filenames...
View ArticleGet the ReleaseID on a remote system
HelloI am trying to find a way to get the windows releaseid from a remote computer, but am having a hard time finding a way to do it.I'm trying to use:(Get-ItemProperty -Path...
View Articlesend powershell output to sql server table
Function CleanUp-PSDrive { Get-PSDrive -PSProvider FileSystem | Where { $_.Name -in (69..90 | ForEach-Object { [char]$_ })} | Remove-PSDrive } $Csv = Import-Csv "path" $Csv.Name | ForEach-Object -Begin...
View ArticleSimple question data import in AD
Hi) I'm a beginner of PowerShell and I love microsoft products. Pls help me.I'm trying to set business position from a csv file to Active Directory base. My csv file has the following view : Position...
View ArticleExchange PowerShell
Hi All, We want to search e-mail in our all mailboxes then export e-mails by a specific from e-mail address and receiptent e-mail address I mean, we want to find all e-mails from x@sender.com and...
View ArticleRun Macro with dynamic parameter
I'm trying to execute some macros though my powershell in a dynamic way. I receive a dictionary with macro names and parameters and try to call the macros and execute it. It is giving me the following...
View ArticleEnable MFA in O365 through AD group membership?
Total Newbie here. Trying to create a security group in AD where a powershell script will enable MFA in O365 based on this group membership? Can anyone point me in the right direction? Thanks in advance.
View ArticleUnable to run SETSPN command remotely using INVOKE-COMMAND
Hi All, I came across interesting issue where I have a requirement to run SETSPN command remotely using INVOKE-COMMAND Or PSSESSION. When I run the below command directly on my desktop, it runs fine...
View ArticleUnable to catch SMTP errors while sending mail using Send-MailMessage
I have got a list of report in which few users are not in the organization, in such cases when the script tries to send email to those invalid addresses i should be able to catch errors, which is not...
View Article