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 ArticleReply 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 ArticleReply 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 ArticleReply To: Calling msdeploy.exe from powershell with variables that contain...
Excellent, thanks for letting me know!
View ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleImport-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 ArticleNewbie 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleReply 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 ArticleCustom 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 ArticleReply 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