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

Reply To: Question for Don Jones about PowerShell book

(So, please use the PowerShell Q&A forum – gets more attention; this forum is intended for site feedback) All parameters take the form: -ParameterName <ValueType> Except switch parameters,...

View Article


Reply To: Question for Don Jones about PowerShell book

Thanks for replying! Makes sense. You are correct in the part that was confusing me. I was defining (in my mind) that a parameter was JUST the name. Not the name + the value.

View Article


Reply To: Replace text in TSM option file

Another upate, I realised that if I ran the script more than once I would loose the backuo copy I created. This isnt great beacuse I have to go back and put it all right again if anything fails, so...

View Article

Reply To: Replace text in TSM option file

Hi Joe, You shouldn’t need that extra “old” file. Here’s your script with a minor tweak to remove the “middle-man”: $servers = get-content c:\joe\tsmlist.txt $Date = (Get-Date -format...

View Article

serialnumber of machine

Hi Everybody, First all I want to say hello to everybody. I am new here and I hope learn a lot of things with your experience and help. I am learning a little powershell because in my company we use...

View Article


Image may be NSFW.
Clik here to view.

Invoke-Command with ; in script

Hi all, im trying to run a SSIS package from Powershell using the Invoke-Command all the examples i find to do this are calling files, were are we use packages stored in MSDB. I have found the...

View Article

I need help (Remote connecting)

I just began reading and learning Powershell, but i have this issue which has been nagging me for 2 days now – I need to connect to my server. Server: A simple Windows 2012 server This server is up...

View Article

I need help (Remote connecting)

I just began reading and learning Powershell, but i have this issue which has been nagging me for 2 days now – I need to connect to my server. Server: A simple Windows 2012 server This server is up...

View Article


Reply To: Exchange SMTP Splitting at the "@"

It’s probably not necessary in this case, since Exchange should always be giving you well-formatted email addresses, but if you were accepting some string input that needs validation (and separation),...

View Article


Reply To: Invoke-Command with ; in script

You’re not escaping your double-quotes properly. To escape double quotes, either use a pair of double-quotes or use the backtick character. For example: “”"Hello”"” # Outputs: “Hello” “`"Hello`”" #...

View Article

Reply To: I need help (Remote connecting)

It sounds as if you are having difficulty remoting into the server. A great resource to read through for remoting is a free ebook written by Don Jones that you can download from...

View Article

Reply To: I need help (Remote connecting)

Before answering this, I thought it would be worth pointing out that there are two free guides for PowerShell Remoting. One is here: http://powershell.org/wp/newsletter/ (see the Free eBooks section...

View Article

Reply To: serialnumber of machine

I don’t think you’ll have a nice clean “one way” to do this if you don’t have access to the non-domain computers. Without some sort of access you can’t do the required WMI queries to extract the...

View Article


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

You should be able to make this work using PowerShell. Here’s what I would do: 1. Work out the command if you were to enter everything on one line without variables. 2. Take your equivalent command...

View Article

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

Oh, and without seeing the results, since I can see what that command looks like with the variables expanded, my guess would be that you don’t want to use single-quotes inside of your double-quotes...

View Article


Reply To: Invoke-Command with ; in script

Hi thanks for the reply, Im not trying to use the backslashes for anything, This is how the code looks to run a SSIS package from the command line. From what the link said i thought the idea of...

View Article

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

@Poshoholic I can get it to work if I hard code it with literal values. I’ve tried all sorts of variations (including your suggestions) and could only get it to work by putting the command in a batch...

View Article


Reply To: Invoke-Command with ; in script

The problem is that you cannot create a script block from a string that defines the script if that script cannot be parsed in PowerShell. Your quotation marks in your string used to create the script...

View Article

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

Ok, have you tried Don’s suggestion, using -%? For example: & $msdeploy -% -verb… The -% tells PowerShell to stop processing the remaining arguments like they are PowerShell parameters and instead...

View Article

Reply To: unexpected Remove-Mailboxpermission warning

ErrorAction (SilentlyContinue) does not affect Warnings; it only affects errors. So that’s why you’re not suppressing the warning. You can suppress warnings using the $WarningPreference variable if...

View Article
Browsing all 13067 articles
Browse latest View live