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

Reply To: Access is Denied error

So this is working now? Just making sure based on the above response.

View Article


Reply To: How to NOT Have Redundancy

Hey Don! I went with your advice and used some code I found online to create a function that creates an input GUI instead of using a computerlist.txt and userlist.txt. I still use the computerlist.txt...

View Article


HTML report for File Share info – against several servers?

Hello, I continue learning a great deal on here, I am trying to create a report I thought would be easier. But I’m getting stuck trying to figure out how to write a report that would: A. Gather the...

View Article

Functions – how to run "correctly"?

Hello – I keep getting stuck on functions. I have a few that I want to run and they aren’t in my profile. I’ve tried the “dot sourcing method” and it just fails everytime, and it’s probably something...

View Article

Reply To: Functions – how to run "correctly"?

You have to understand that a function is meant to be run *by something else.* With that in mind, it’s probably easiest to save your functions into a script module. That’s just saving them into a file...

View Article


Reply To: HTML report for File Share info – against several servers?

Have you considered looking at powershell.org/wp/ebooks, where we have a free book on creating HTML reports? I don’t believe Excel is a good reporting tool, personally, but HTML can work well. Excel...

View Article

Reply To: How to NOT Have Redundancy

I’d have you “GUI function” simply output computer names to the pipeline, so that they could be piped to another command without the interim text files, but that’s your decision. You’re welcome to...

View Article

Reply To: HTML report for File Share info – against several servers?

Thanks Don! I have that Ebook and I’m trying to get this working. I also bought your last book series and dvds but it’s trying to learn while working as I’ve never been a programmer/scripter. of...

View Article


Reply To: HTML report for File Share info – against several servers?

In pseudo code, assuming $computers contained one or more computer names, I’d so something like this: foreach ($computer in $computers) { # make up a filename based on the computer name # retrieve...

View Article


Reply To: Access is Denied error

No, it’s still not working, but I think I may have done something wrong on my end with the share it’s connecting to. Everything else including making directories seems to work over this Session.

View Article

Image may be NSFW.
Clik here to view.

Reply To: C# code to powershell

hi Dave, Hot-Dog, you don’t beat about in the bush do you A strike of brilliance above you usual genius stuff Thank you, I really appreciate this. Let me give it a run and see if I can use those...

View Article

Reply To: Access is Denied error

You can create directories on the remote system or locally while in the pssession? Just getting clarification. PSsessions work differently than RDP sessions. You will not be able to access anything...

View Article

Search files on specific depth level

How can I search for a file in a specific subfolder that constantly changes name. Max depth should be at -1. My current script is: $FilePathStat = “C:\NG_auto_project\nextgene_to_import” $FileNameStat...

View Article


Reply To: Search files on specific depth level

I’m not sure I fully understand the question. However, there’s a neat trick with PowerShell and Get-ChildItem that allows you to search at a specific depth using wildcards: Get-ChildItem -Path...

View Article

Reply To: Search files on specific depth level

Sorry then if I was not clear. All the files I need to search for are 1 level deeper than C:\NG_auto_project\nextgene_to_import. I guess I only need to put C:\NG_auto_project\nextgene_to_import\*\*\ ....

View Article


Image may be NSFW.
Clik here to view.

Reply To: C# code to powershell

Thanks I’ve spent some more time on this, and have it working with methods that contain optional parameters (parameters with default values). I’ve separated the worker functions out into a psm1 module...

View Article

Reply To: Facing error in Powershell Remote Session

From what I’m reading, TrustedHosts is your issue. Hopefully this will provide some pointers for you. http://technet.microsoft.com/en-us/magazine/ff700227.aspx

View Article


Reply To: C# code to powershell

Fixed the problem I was having with Generic types as arguments. I never did figure out ‘why’ it was happening, but I worked around it by writing a small C# helper to convert the PSObject instances...

View Article

Dealing only with Current Child Nodes

Please see attached script and XML. This was originally built to handle a JEHEADER ->JELINE structure with one JEHEADER per file. Got a new file for testing today, and it had multiple instances of...

View Article

Getting Fromat of Hashtable a cmdlet supports

Hi All, Recently I came to know that we can even use FormatString as hashtable key to format data as below. Get-Process | ft Name,ID,@{name=’VM’; exp={$_.VM/1MB};formatstring=’N2′} The thing is I...

View Article
Browsing all 13067 articles
Browse latest View live