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

Reply To: script get cpu use & ram every x hours, write to file

You do either have to dot source or make the script into a module. One or the other. If you want to just run it as a script, remove the function keyword, function name, and opening and closing curly...

View Article


Image may be NSFW.
Clik here to view.

MAX_Path and Powershell

Hi everyone, As entries for event 3 are opened, it shouldn’t be a secret anymore, how you fulfilled MAX_PATH requirement. I personally used an old trick for creating folder symbolic link and linking...

View Article


Reply To: Twitter Module?

Yes I have, it is unfortunately outdate. It uses the 1.0 API’s which were discontinued a couple months ago. It also does not have oAuth support.

View Article

Reply To: Override locale settings for date output

Hi All, Thanks for the replies, much appreciated. @Dave Wyatt: That post seemed unnecessarily complex (I just use the Get-Culture cmdlet), but gave me some good ideas. I don’t know if I need the...

View Article

Reply To: MAX_Path and Powershell

We use icacls and robocopy to handle paths that exceed MAX_PATH limit – team Schnipersons

View Article


Reply To: script get cpu use & ram every x hours, write to file

One word “PAL” PAL is also PowerShell underneath but using perfmon to accomplish a very human readable and comprehensive report. http://msdn.microsoft.com/en-us/library/cc296652(v=bts.10).aspx

View Article

Reply To: Schedule rolling reboots with service check & email?

Do the services on the 1st server listen on a specific TCP port? You could have the second server do an while loop or do until those ports are back up and listening from the first server being...

View Article

Reply To: Twitter Module?

I would post your feedback on there maybe the authors will make an updated version using the new REST API.

View Article


Reply To: MAX_Path and Powershell

That’s basically what I’d do in a production script as well. The Win32 API (and many of the old command-line executables) support long paths, but the .NET Framework and PowerShell do not, by default....

View Article


Reply To: MAX_Path and Powershell

Hmm, I didn’t know that icacls supports long paths. I think it doesn’t work good enough for taking ownership, so in my production environment we had to use takeown and that’s why we had to use...

View Article

Need help with ValidatePattern

I am trying to validate user input using ValidatePattern param ( [Parameter(Position=0,mandatory=$true)] # Parameter is mandatory [ValidatePattern("^\d{4}$")] [int]$UserIp ) $GtVer =...

View Article

Reply To: Need help with ValidatePattern

Out of curiosity, have you added [CmdletBinding()] just above the param() block?

View Article

Reply To: Need help with ValidatePattern

Hi Don Jones Thank you for helping me, I tried that as well but no avail.

View Article


Reply To: Need help with ValidatePattern

I got it right when i used single quote instead of double quotes, However it works in both ways with PS 3.0 ! [ValidatePattern('^\d{4}$')] Thank you

View Article

Reply To: Need help with ValidatePattern

Looks like that trailing $ causes problems in PowerShell v2, even though it doesn’t actually cause any expansion to take place. It worked when I put a backtick before the $ (in a double-quoted...

View Article


Help with Exchange Mailbox Permissions Script

I’m trying to get a script working that will go through certain mailboxes and find the permissions for each folder and output it as a file (Not fussy about csv/txt really) and it seems to work fine...

View Article

Reply To: Need help with ValidatePattern

Ah, beat me to it. Ya, dug out a v2 VM and observed the same thing. Strikes me as a bug, which is obviously fixed, but a search in Connect didn’t turn anything up. Likely the team noticed it and fixed...

View Article


Reply To: Need help with ValidatePattern

Thank you so much Don and Dave for the inputs, I am very new to powershell.org and it was my first post here. Feel so special and blessed to be a part of this. Good day Nithun

View Article

Reply To: "Inventory Intervention" – Processor inventory script

Hi Mike, Thank you very much!! I’m going to try it right now, I tried a couple others, but have read your version is the only one that really works on the 2003 servers that aren’t patched! Really...

View Article

Image may be NSFW.
Clik here to view.

Reply To: MAX_Path and Powershell

actually almost every winapi app can support these paths if it not use static buffers and special constraints on paths. and I don’t know why MS decided to not support it in .NET at all instead of...

View Article
Browsing all 13067 articles
Browse latest View live