Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Simple go through a folder and for every item (Inlcuding other subfolders)...

Hello all! I have a folder and inside this folder are files (.atf ext) and other folders that contain the same type of files (.atf ext). I want to go through and first check to see if a path exists for...

View Article


how can I check the existence of the window with a specified window title (or...

Hi, I use invoke-expression to call a command to extract a big file, which will take about 30 seconds to complete. When the extraction completed, a window will pop up, and I need to click the OK button...

View Article


Simple Convert Powershell 3.0 statement to Powershell 2.0

Hello All! Yesterday Don gave me this statment: dir *.atf -recurse and it worked well on PS 3.0. Now when I try on PS 2.0 it does not work. So I have tried this: get-childItem C:\path -include *.atf...

View Article

WorkFlows

Jeffery, I am doing my first test on workflows. I as expecting to run faster than a normal serialized process  , because it uses parallel concepts ritgh ? This is my code. I dont know if I am doing...

View Article

modify user objects across trusted domains

we get a report from HR that makes changes to managers etc.   there are 2 domains in our company with a trust between them.  of course if the user is in the domain that the script is not run from then...

View Article


handling errors a level deeper

Hello, is there easier way to distinguish between exceptions that are passed in another exceptions? How do you Experts handle this? Acording to the option used in my example below a...

View Article

Escaping "\" when naming a file as "ParentDirectory\FileName"

Hello! I have this script: Function StripATF{ if(test-path -Path "$FolderWhereATFare\Extracted ATF Blocks"){remove-item -Path "$FolderWhereATFare\Extracted ATF Blocks" -recurse}$source_folder =...

View Article

xml parse from multiple columns

Hi, I did not find a way how to get data from multiple column in one xml file. $x.XMLOUT.Check[0].Detail.UpdateData | where {$_.IsInstalled.startsWith("false")} | foreach {"Title =" + $_.Title + "URL=...

View Article


using excell with powershell

$code = { $excel = New-Object -ComObject Excel.Application $excel.Visible = $true $workbook1 = $excel.Workbooks.Add$$ # write into cell B5 $column 2, line 5$: $workbook1.ActiveSheet.Cells.Item$5,2$= "I...

View Article


How to issue Windows commands from powershell

Hi -- I'm curious: How would I tell powershell to run the old Windows copy command instead of the copy-item powershell command?

View Article

How to Map IIS Drive of remote server

I was trying to map the IIS drive of remote server but was unable to do so. I tried following. new-psdrive -Name remoteIIS -PSProvider webadministration -Root \\servername   Getting following error...

View Article

Stuck trying to Multithread Power Shell Script.

Hey Guys, I am stuck on my script while trying to get it to multi thread. As we have many servers we want to make sure that we can process our log files in a timely manner. The script works perfectly...

View Article

Adding multiple SMTP addresses through Powershell to Distribution Groups

I thought I would share this with the community because I googled and googled and googled some more no one has wrote a simple few lines to accomplish this so this is my way of trying to help others...

View Article


SSL and download-file

Boy I sure hope you can help. I love the following for simple file download: $client = new-object System.Net.WebClient  $client.DownloadFile($url, $path)  But I have the server set up to use SSL client...

View Article

Need help with smart entrapment of errors

Hey again! I am now working on silently installing a suite of programs, and I've been looking a lot at Chocolatey. It seems great, it seems perfect, but it is not good at waiting for one required...

View Article


I need a script to change a serial port from COMX to COMY

I support an application that communicates to devices through a PC's serial port. Due to limitations in the particular version of the application I am working with, I need to make it as easy as...

View Article

Very simple question from a NOOB

Hello--I'm trying to run a PS script, and simply want it to echo to the screen the WRITE-HOST lines, and wait for a key press to continue, so I can do some debugging.  Following is the beginning of the...

View Article


PowerShell Plus - Source Control Integration

Hi,   I am using PowerShell Plus.  Also, we are using TFS 2008/2010 as source code repository. I would like to connect to TFS, but cannot get it to work since all buttons are disabled. Is there any...

View Article

possible double hop issue

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4 Hi What I am trying to do is create a process that initiates from computer1 that will check other computers  for software...

View Article

How to debug Authorization errors

Hey, I have a bunch of scripts that work, or at least worked. But now I'm repeatedly getting this error: Exception calling "OpenRemoteBaseKey" with "2" argument(s): "Attempted to perform an...

View Article
Browsing all 10624 articles
Browse latest View live