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

Reply To: Secrets of PowerShell Remoting eBook Problem

I deleted the file and downloaded it again via Dave Wyatt’s link. This time it opens fine in Word. Odd, the link I was using was the following:...

View Article


Reply To: What tools do you use for creating GUI?

It depends on your choice of GUI: WPF or WinForms. PowerShell studio will work great with WinForms while using Visual Studio, you can take the XAML code that is generated and placing it in the...

View Article


Reply To: Change DHCP IP to STATIC IP

Hello Eric. Richard below is the script i tried for changing DHCP ip to static. but it is not working. [cmdletbinding()] Param (...

View Article

Reply To: Scripting gathering and inventorying info

Hi David, Scenario 1 Formatting is possible, but think of it separately from the actual data. Part of the reason for that is we sometimes want to process the data after it’s collected or even saved to...

View Article

Reply To: securely storing passwords for reuse w/o exposing them

I’d forgotten about that -RunAsCredential parameter for remoting endpoints. That’s certainly easier to implement than a REST API on a web server, but be careful to properly hide all the commands you...

View Article


Reply To: Scripting gathering and inventorying info

Thank you for extensive info and post. I will play around with this. It will be a good opportunity for me to hone my skill

View Article

Reply To: Replace (Or Edit) CSV Header Row

Hi David, you can using Import-Csv as well. Here is example => gsv b* | select Name,DisplayName,Status | export-csv C:\my.csv -NoTypeInformation => Import-Csv C:\my.csv | select @{Name =...

View Article

Reply To: Functions from Module Scoping Question

Thank you Dave!

View Article


Logging in PowerShell script like as MSBuild format

Hi All, I am new here, My questions is How can I do logging in my PowerShell script which will look like a MSBuild logging. MSBuild error message are like, C:\dir1\foo.resx(2) : error BC30188:...

View Article


Reply To: Logging in PowerShell script like as MSBuild format

Each CMDLET has the common variables which contain. . . -Verbose -Debug -WarningAction -WarningVariable -ErrorAction -ErrorVariable -OutVariable -OutBuffer You can specify Out Variable and then output...

View Article

Reply To: Logging in PowerShell script like as MSBuild format

But I need the script output in MSBuild output format

View Article

Reply To: Change DHCP IP to STATIC IP

All your script is doing is collecting data on the network adapter configuration. I can’t see any where that you are setting IP addresses. You have to use the methods on the WMI class to perform the...

View Article

Redirect Input (and output) on an external process.

A project I have been working on calls an external executable that I have little control over. It uses StandardOutput and StandardError which I can capture just fine from other similar things I’ve...

View Article


Reply To: Redirect Input (and output) on an external process.

If it supports StdIn for input, you can try piping the path to it (e.g., “path” > executable.exe). Otherwise, PowerShell wouldn’t really have a way to respond. Keep in mind that, when your external...

View Article

Reply To: Logging in PowerShell script like as MSBuild format

Ah I am not a developer so I have no idea what you are saying when you say MSBuild. It looks a lot like XML so you may be able to play with the ConvertTo-Xml or Export-Clixml CMDLETs to make it work....

View Article


Reply To: WriteOutput help

Don Jones wrote: You’re writing directly to the console. It isn’t intended to be redirected. Use Write-Output instead. That writes to the pipeline and can be redirected. Or, if you only want to write...

View Article

Image may be NSFW.
Clik here to view.

Reply To: WriteOutput help

Don Jones wrote: You’re writing directly to the console. It isn’t intended to be redirected. Use Write-Output instead. That writes to the pipeline and can be redirected. Or, if you only want to write...

View Article


Reply To: WriteOutput help

I was able to get it to work by adding the -append switch. Thanks Don Jones! $searchOption =[IO.SearchOption]::AllDirectories $fileEntries = [IO.Directory]::GetFiles("\\cd1001-c100\public\isantillan",...

View Article

How to remove Drive Letter in PowerShell way

Add-Type @” using System; using System.Runtime.InteropServices; public class MountPoint { [DllImport("kernel32.dll", CharSet=CharSet.Auto, SetLastError=true)] public static extern bool...

View Article

Reply To: What tools do you use for creating GUI?

I am also using Powershell Studio and I am very pleased with it! Powershell Studio 2014 appeared some weeks ago as far as I know. I am still using 2012.

View Article
Browsing all 13067 articles
Browse latest View live