|
New events in event viwer
Hi to u all,
I try to find way to process new events which arriving to the
application log in event viewer.
there is a script which search all the time for new events (in
powerShell) ?
Thanks
Didi
...
|
4 |
29.05.2007 17:08:48 |
|
Issue with get-content
When I use get-content with the binary flag like
$bytes=get-content $path -encoding byte
Some of the JPEGS I am trying to open cause PowerShell to start eating memory
I am opening a 1.5MB image and in the Task Manager it shows PowerShell going
from about 10,000k to almost 1.5GB memory usage. I have seen this with
multiple JPEGS. It can take a minute or 2 to open one of these files in...
|
3 |
29.05.2007 15:08:05 |
|
Extract data from web page
We have internal web pages that query databases & produce tables based
upon certain selections, and then gives an option to view a comma
delimited text file with the data that's just been created. I'd like
to be able to extract that text file (as it's displayed in the web
browser), but the net.webclient can't generate it (because you can't
make it go through the gyrations of choosing the fie...
|
9 |
29.05.2007 14:24:00 |
|
Export-CSV and foreach
Hi All,
I have an input file with a bunch of servers and I have the output I want to
the screen but I'd really like to get it into a CSV format. However,
export-csv seems to require an object as input and I can't figure out how to
get around that. Here's the script:
$colServers = gc "serversin.txt"
foreach ($server in $colServers) {
gwmi -computer $server "win32_networkadapterconfi...
|
7 |
29.05.2007 11:16:00 |
|
Windows 2003 SP2
Hello
PowerShell is ready to be installed on Windows Server 2003 SP1.
Is PowerShell working on Windows Server 2003 SP2? any issues?
Thanks,
Jerome ...
|
2 |
29.05.2007 08:47:00 |
|
Compiling PS1 script to .com or .exe..
Is this possible?...
|
12 |
29.05.2007 03:58:48 |
|
blank line in txt file problem
ok, I'm using Add-Content to fill txt file, and that works great.
However, I'm faceing the next problem: last line can't be blank line (swf
file (SWIFT standard)). So, I need exeption for the last Add-Content command.
Help please....
|
6 |
28.05.2007 19:50:00 |
|
Book: Professional Windows PowerShell Programming: Snapins, Cmdlets, Hosts and Providers (Paperback) by Wrox
Bummer...
amazon.com was saying the release date was Sept 2007, now it is showing
Dec 2007...
At least I know what I'll ask Santa for now... ;-)
Marco...
|
2 |
28.05.2007 19:32:01 |
|
Local $varible scope?
When running a script you might create a couple of object with the New-Object
Cmdlet but if those objects are not used once the script has finnished
running will they remain defined or will they be removed from the global
scope automatically....
|
2 |
28.05.2007 16:21:00 |
|
Spelling mistake in PowerShell 1.0
If you bring up the -detailed help for the new-item Cmdlet EXAMPLE 2 is -type
argument is misspelled "-lype" and not -type as implied by the description of
EXAMPLE 2.
----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the b...
|
1 |
28.05.2007 15:44:00 |
|
Team System cmdlets
FYI
http://powergadgets.com/csPg/blogs/powergadgets/archive/2007/05/25/Connecting-gadgets-to-Team-System.aspx...
|
1 |
28.05.2007 12:47:33 |
|
Access COM enumerations .. How ?
example:
SQLDMO.SQLDMO_WEEKDAY_TYPE.SQLDMOWeek_EveryDay
How do I use that in a Powershell script ?
[SQLDMO]::SQLDMO_WEEKDAY_TYPE.SQLDMOWeek_EveryDay
It doesn't like this.
Any suggestions ?...
|
2 |
28.05.2007 10:58:14 |
|
Variable arguments and argument types
I want to write a script which will process a variable number and
variable types of arguments - so I want to be able to call my
script/function like:
foo "some argument" "another argument" $a 6 $b "arg string"
....and be able to pull off the individual arguments (easy with $args)
but also get their type, so in the above example I'd want to know that
the argument types were:
String
St...
|
9 |
28.05.2007 08:43:52 |
|
Trouble with ADSI and PSBASE - commitchanges() - very strange
Hello,
I'm tyring to use a Powershell script to disable computer accounts in Active
Directory, by changing the useraccount control bitwise operator from 4096 to
4098. I'm using the following code:
param ([string]$machine)
$searcher = new-object System.DirectoryServices.DirectorySearcher
$searcher.filter ="(&(CN=$machine))"
$computer = $searcher.Findone()
$adcomputerpath = $com...
|
6 |
27.05.2007 14:19:00 |
|
Pick-File
I often find that I need a quick way of browsing directory contents
and picking a single file from the list, but without all the typing.
This function works somewhat, but I was wondering if I was missing a
better way of doing it:
function Pick-File ($file, $index) {
$file = get-childitem $file
if ($index -ne $null) {return $file[$index]}
else {$file | %{$i=0}{write $_; $i++} |
...
|
6 |
27.05.2007 09:41:04 |
|
PowerShell's Default Start Directory
How do I change the directory that PowerShell starts in? it shows my
"Documents and Settings\username" for a path after the prompt, but I
just want to see "PS C:\"
...
|
4 |
26.05.2007 18:12:48 |
|
PowerShell Guide
After an enforced break for preparing and delivering a bunch of PowerShell
presentations I've managed to get back to the PowerShell Guide we started
earlier in the year. I've completed a first pass at the ADSI and AD sections
which can be reviewed here
http://www.codeplex.com/PsObject/Wiki/View.aspx?title=PSH%20Community%20Guide
Comments as before please
--
Richard Siddaway
Please...
|
1 |
26.05.2007 13:34:01 |
|
Unable to Install
I am unable to install powershell. I had previous version installed, which i
have uninstalled. Still i am unable to install. Here is the log file during
installation
0.171:
================================================================================
0.171: 2007/05/24 20:02:36.213 (local)
0.171: c:\d3cfe92858361f88155469eb\update\update.exe (version 6.2.29.0)
0.171: Hotfix started ...
|
4 |
26.05.2007 12:13:01 |
|
MIIS provisioning Active Directory with powershell script MA
Can it be done? How? and can you point me to the resources?
Alexander Larkin
Senior Enterprise Consultant
MCSE,MCSA,CCEA....
|
1 |
26.05.2007 00:16:01 |
|
returning values to original script
Hi,
I have a script called menu.ps1 which calls another PS script,
getvalues.ps1. In getvalues.ps1, I do some console interaction with the
user. Depending on the interaction, I need to return a value back to the
original menu.ps1 script. I tried to do a return "$value" but that didn't
work. What did work was to define a global variable via: $global:testvar.
Is that the best way t...
|
2 |
25.05.2007 21:53:49 |
|
test for file existence
Hi,
What is the best way to test for file or directory existence?
ls file.txt | out-null 2>&1
if ($? -eq "True"){
....
}
...
|
2 |
25.05.2007 20:03:40 |
|
number of elements in array
Hi,
Is there a variable that tells me how many elements there are in an array?
thanks,
...
|
3 |
25.05.2007 13:21:19 |
|
www.powergui.org
Did anyone use this tool? What do you think?...
|
4 |
25.05.2007 08:12:00 |
|
Instantiating COM objects
First of all I know next to nothing about COM, fiddling in Powershell is
my first experience with it. Apologies if this is obvious but I can't
for the life of me find the answers. I've created the following C#
program based on the iTunes SDK examples, which works fine
Code:
--------------------
using System;
using System.Collections.Generic;
using System.Text;
using iTunesLib;
using...
|
11 |
25.05.2007 01:47:13 |
|
powershell terminal sometimes need a C/R for output
Hi,
Sometimes when running a PS script which has output, it hangs until I hit an
enter key. There is no requirement for input but it just waits. Then when I
hit enter, all output comes out. Has anyone experienced this? The script
simplies just does a mbsacli to a server to query security patches.
Thanks in advance,
...
|
2 |
24.05.2007 17:43:57 |