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

Reply To: Convert Cisco "Show Interfaces" output to PowerShell objects

Please test if below code works for you. $PortFil = 'C:\data\ScriptLAB\SwitchType_C2960G_8port.txt' $CSVports = Import-Csv -Path $PortFil -Delimiter ' '

View Article


Reply To: Installing an exe with Powershell DSC Package resource gets return...

Betting this is permissions. Keep in mind that the LCM runs as SYSTEM, so it wouldn’t have access to non-local resources. When your package is non-local, you’re probably going to need to include a...

View Article


Reply To: Installing an exe with Powershell DSC Package resource gets return...

While I can’t offer a suggestion as to what the problem might be, I wasn’t aware that the Package resource could be used to install .exe’s. I assumed it required a .msi file. Given that a ProductId...

View Article

Reply To: Installing an exe with Powershell DSC Package resource gets return...

It’s supposed to be able to do EXEs, although at present it’s a bit undefined. I think the long-term vision is to have it work mainly through OneGet, meaning you’d have a local or remote repo...

View Article

Reply To: Minimum workstation requirements

You don’t “publish” to the Pull Server. If you have created a Configuration and generated the .MOF file, you need to copy that .MOF file to the Pull server, and then create a Checksum file for that...

View Article


Reply To: Installing an exe with Powershell DSC Package resource gets return...

Did you check the Desired State Configuration – Operational log? Are you trying to run this locally or executing the Configuration through a Pull Server?

View Article

Image may be NSFW.
Clik here to view.

Reply To: host vs remote invoke-command

Hi Peter, Thank you for your input. I was able to run Start-Process C:\Folder\SomeProgram.exe -ArgumentList /s -Wait directly without any prompts and everything installs just as I expected. My issue...

View Article

Reply To: Installing an exe with Powershell DSC Package resource gets return...

I believe it will work if you add the computer account of your Perforce server or all “Domain Computers” to have read access on your NAS share. Alternatives: - Copy the installation files locally onto...

View Article


Correct usage of [Validatenotnullorempty]

Hi I have this function that accepts a directory fullname as inpu and just returns that and i would like it to throw an exception if a null or empty value is passed or when no value is passed at all....

View Article


Reply To: Correct usage of [Validatenotnullorempty]

Yes. You’re using the pipeline which is good but your command “dir c:\ -Filter Idontexist” does not return any objects into the pipeline. Therefore your “test” function does not get invoked at all. If...

View Article

Reply To: Correct usage of [Validatenotnullorempty]

The behaviour is expected. Try this £> test cmdlet test at command pipeline position 1 Supply values for the following parameters: Path: test : Cannot validate argument on parameter ‘Path’. The...

View Article

Image may be NSFW.
Clik here to view.

Reply To: Correct usage of [Validatenotnullorempty]

@Daniel – thanks for the reply @Richard – thanks for the detailed explanation. certainly clears things up

View Article

Reply To: Correct usage of [Validatenotnullorempty]

You could also use ValidateScript to verify the path does exist instead of just validating it isn’t null or empty. Although you’ll run into the same issue with the scenario you’ve described (as...

View Article


Reply To: Slides Available from Summit North America 2014?

Here’s the link to Jason’s post: NA 2014 PowerShell Summit wrap-up and speaker slides

View Article

Optimze-Volume Schedule.(storage Mangement)

ok, I have been in the Social Forums with this question, and they tell me it cant be done. If I had my servers in Core mode, versus the GUI, how would I change this schedule from weekly to daily? (see...

View Article


Reply To: Optimze-Volume Schedule.(storage Mangement)

So does this schedule live in Scheduled Tasks or entirely in SCOM? The Social link included a post from “Anna” about scheduling the command in Scheduled Tasks. Windows 8 and Windows Server 2012...

View Article

Help – Combining Commands

I am brand new to using PowerShell and am having a bit of trouble attempting to pull some data. What I’m trying to do is grab some basic information from mailboxes and the license names associated...

View Article


Reply To: Optimze-Volume Schedule.(storage Mangement)

Ok, this lives inside Scheduled Tasks, under task scheduler library ->Windows -> Defrag. I guess I figured it was running the PowerShell command and not %windir%\system32\defrag.exe -c -h -o -$...

View Article

Reply To: Minimum workstation requirements

Honestly, I can’t remember what in the heck I was doing yesterday I could swear I was following someone’s “how=to”, and there was a command to publish your mof/checksum files to a pull server. But now...

View Article

Reply To: Minimum workstation requirements

Thanks for the example Daniel. Sure would be nice if MS would stop changing the names of their Features/services/etc.

View Article
Browsing all 13067 articles
Browse latest View live