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

Reply To: Check list of servers for service & status – create report

Jake,Might I add that Get-Service is a PowerShell cmdlet. Get-WMIObject is not a PowerShell cmdlet. By running Get-WMIObject you’re utilizing another technology. My personal preference is...

View Article


Reply To: Check list of servers for service & status – create report

Might I add that Get-Service is a PowerShell cmdlet. Get-WMIObject is not a PowerShell cmdlet.I get what you were saying there, but the wording is a bit inaccurate. Get-WmiObject and Get-Service are...

View Article


PowerCLI front end tool

Hi There,I am in the process of building a tool which captures information of VMware infrastructure to a web dashboard. This involves SQL DB in the backened which will store the data, a web front end...

View Article

Reply To: PowerCLI front end tool

Here’s how I would approach it:1. Create a module with one PowerShell command for each task you need to accomplish using PowerShell (e.g. Get-VMwareActiveSnapshot). Create these so that they can be run...

View Article

Reply To: PowerCLI front end tool

Hi Poshoholic,Thanks for your inputs, really appreciate it.I followed your solution until creating a module, but does that mean that every command will be a separate psm1 file, sorry I am very new to...

View Article


Reply To: PowerCLI front end tool

A module is a collection/library of PowerShell commands. You can use a bunch of separate scripts, or you can create a module which packages a bunch of scripts/commands up together. Typically I create...

View Article

Reply To: PowerCLI front end tool

Thanks brother, I am starting to understand a bit now.

View Article

Reply To: PowerCLI front end tool

Hi Poshoholic,Here is my first script:Although I intend to connect to vCenter using a master script. The master script will also connect to Database, retrieve vCenter login details (there can be...

View Article


Save the output of powershell script

Hi, i’m trying to store the output the powershell script into text file…we can do this way when executing the scriptpowershell test.ps1 > testlog.txtbut i would like to do it within the powershell...

View Article


Why "where" condition does not result correct?

Hi, I have a files lines of file names, like:file1.txt File2.txt FILE3.txt FILE4.TXTI run a commnad below:cat \\share\file.txt | where { $_.ToUpper().Split(“.”)[0] -ne $_.Split(“.”)[0] }But, it does...

View Article

Reply To: Why "where" condition does not result correct?

PowerShell is case-insensitive on string comparisons. Use -cne instead of -ne.

View Article

Reply To: Why "where" condition does not result correct?

Hi Don,Thank you so much, it works very nice.Regards

View Article

Reply To: Save the output of powershell script

There are a few different ways to output the data from your script, but the best way to see how to do so would require you to post your code so we can see what data you’re pulling.for general purposes,...

View Article


Reply To: Save the output of powershell script

Thanks Notarat for your valuable input….. Most of my script output is from write-output…please find the attached PS script and below is how the output looks like…Proceeding with the restore User logged...

View Article

Reply To: Save the output of powershell script

This is one of the first questions I asked when I started working with PowerShell a few months ago. There’s not really a perfect solution at the moment, but I have a couple of modules up on the Script...

View Article


Reply To: Save the output of powershell script

Please note that we can’t accept PS1 file attachments. Please rename your script file to TXT, or include it in a ZIP file, to attach it. You can also paste your script at PoshCode.org, and then provide...

View Article

Null-valued expression after starting RemoteRegistry service

So, I have a function that retrieves information from the registry about all of the installed software on a given machine. Because I’ve run into several machines with the RemoteRegistry service...

View Article


Pipeline and non-pipelined input?

Hi all, I’m new to powershell so maybe it’s easy.I have a parameter ComputerName which has the following parameter properties:# Computer Name oder mehrere Computer Namen [Parameter(Mandatory=$true,...

View Article

Reply To: Pipeline and non-pipelined input?

Correct. When input is piped in, $Computername will only contain one item at a time. If provided on the parameter, PROCESS executes once and $ComputerName contains all items.You don’t need to determine...

View Article

Reply To: Save the output of powershell script

Thanks Don. Please find the attached ps script…and Thanks a lot Dave for the links….could you also please take a look at my file and suggest me how to get the output in a single file with in the scrip...

View Article
Browsing all 13067 articles
Browse latest View live