Quantcast
Channel: PowerShell.org » All Posts
Browsing all 13067 articles
Browse latest View live

Reply To: Help with SQL

The fact that the query is pulling from multiple databases doesn’t matter. It’s a single query, returning a single result set. If you already have code that can connect to a database, then that same...

View Article


Reply To: Calling msdeploy.exe from powershell with variables that contain...

Oh, and I get that you want to use variables, so you can work around that, sort of. $command = “& `$msdeploy -% -verb:sync -source:contentPath=”"‘$src’”" -dest:contentPath=”"‘$dest’”"” $sb =...

View Article


Reply To: Calling msdeploy.exe from powershell with variables that contain...

@Poshoholic I had to adjust the -% to be –% and I had to remove the single quotes completely because they were being included. And then…it…worked! Thanks so much! One last question please. What is the...

View Article

Image may be NSFW.
Clik here to view.

Reply To: Calling msdeploy.exe from powershell with variables that contain...

Excellent, thanks for letting me know!

View Article

Reply To: Invoke-Command with ; in script

Also, here’s an example that I was able to get to parse properly: $sb_string4 = ‘DTEXEC.EXE /SQL “\Example\test” /SERVER “Server-SSIS” /CONNECTION “SQL.BI;Data Source=PL-SQL;Initial...

View Article


Reply To: I need help (Remote connecting)

Arh, Thanks, i’ll look it through. One thing though. I dont know if you’ve seen it but, on that “jumpstart to powershell ” or something like that, It’s a series of training videos to learn Powershell....

View Article

Reply To: Array vs Hash table efficiency

I realize this is an ancient post, but I figured I’d point out why you’re seeing strange results. $array -contains and $hash.Keys -contains are both array searches ($hash.Keys returns an array)....

View Article

Reply To: I need help (Remote connecting)

Slackerony wrote: Arh, Thanks, i’ll look it through. One thing though. I dont know if you’ve seen it but, on that “jumpstart to powershell ” or something like that, It’s a series of training videos to...

View Article


Reply To: serialnumber of machine

Agree with Matt on this one. What goal are you trying to accomplish if your getting serial number? Mostly likely want the warrnty information? While its not powershell. Free as in beer, there is a...

View Article


Reply To: Unable to run PS script as Scheduled Task

Hi, I am experiencing what Jeff described above.. I have simple PS script that collects information and writes a file and I want to run this as a scheduled task. Script is running on a Win2008 SP2...

View Article

Reply To: Invoke-Command with ; in script

well what ever magic is in that line made it work (Ie run.. got a whole back of kerberos things to deal with now!) thank you the help, its very much appreciated! S

View Article

Import-CSV Header not first line

Hi, I am having a CSV having 2 lines of description and whatever and 3 line is my header. How can I tell the Import-CSV command to use the 3 line instead of line 1 for header? Thank you for help...

View Article

Newbie Stuck – LWPS3inMoL Parenthetical CMDs

**If this post is not appropriate for this forum, kindly direct me to other forums.** I do not know a single programming language and struggle with with DOS batch files. So I must sincerely state that...

View Article


Reply To: Import-CSV Header not first line

Technically, that’s not a valid CSV file. However, you should be able to get around this by using Get-Content, Select-Object with the -Skip parameter, and ConvertFrom-Csv instead of Import-Csv:...

View Article

Reply To: Newbie Stuck – LWPS3inMoL Parenthetical CMDs

That’s odd. There’s nothing wrong with the syntax or the use of parentheses there. If the ISE is simply highlighting the parentheses (not putting red squiggly lines underneath them), that’s a normal...

View Article


Reply To: Newbie Stuck – LWPS3inMoL Parenthetical CMDs

Dave’s right. PowerShell ISE and other editors highlight matching brackets to give you a visual cue so that you can match brackets more easily. It’s a very helpful feature when using multiple sets of...

View Article

Reply To: Newbie Stuck – LWPS3inMoL Parenthetical CMDs

I agree that it looks like it can’t read the file. My 2 guesses as to why that is are: You created and renamed a new text document but have the extension hidden so you have ended up with a file called...

View Article


Reply To: Newbie Stuck – LWPS3inMoL Parenthetical CMDs

Thanks for the quick response from all. I -knew- PS was trying to tell me something with the highlighted parens. The commments regarding my computers.txt file caused me to delete and recreate the file...

View Article

Custom Object with Nested Properties – best way?

So I am writing an eventual function to connect to one or many of our servers and retrieve various information using WMI: - Computer Name, Manufacturer, Model, Service Tag (serial number), OS,...

View Article

Reply To: Custom Object with Nested Properties – best way?

You’re constructing the object properly, but PowerShell’s built-in formatting system can’t handle object hierarchies in a “table in a table.” If you pipe your output to Format-Custom, you’ll see that...

View Article
Browsing all 13067 articles
Browse latest View live


Latest Images