MSGROUPS.NET | Post Question | Search | About | Groups | Contact | Register | Login



microsoft public excel misc (5725)

microsoft public outlook general (4851)

microsoft public excel programming (4223)

microsoft public word docmanagement (3538)

microsoft public excel worksheet functions (3208)

microsoft public access (3169)

microsoft public windowsxp general (2045)

microsoft public windows vista mail (1630)

microsoft public office misc (1576)

microsoft public windows vista general (1511)

microsoft public windows live mail desktop (1366)

microsoft public access queries (1331)

microsoft public powerpoint (1277)

microsoft public access formscoding (1213)

microsoft public mac office entourage (1204)

microsoft public dotnet languages csharp (1183)

microsoft public access forms (1167)

microsoft public internetexplorer general (1133)

microsoft public access modulesdaovba (1076)

microsoft public windows server sbs (1064)

microsoft public greatplains (1055)

microsoft public mac office word (1026)

microsoft public outlook calendaring (965)

microsoft public excel (936)

microsoft public sqlserver programming (906)

microsoft public project server (884)

microsoft public windowsupdate (825)

microsoft public windowsxp help and support (801)

microsoft public windowsmedia player (785)

microsoft public project (782)

microsoft public access reports (767)

microsoft public mac office excel (765)

microsoft public exchange admin (754)

microsoft public dotnet framework aspnet (743)

microsoft public sqlserver server (703)

microsoft public outlook (701)

microsoft public outlook contacts (681)

microsoft public dataprotectionmanager (665)

microsoft public word vba general (641)

microsoft public windows server general (632)

microsoft public windows server active directory (587)

microsoft public outlook installation (585)

microsoft public word newusers (563)

microsoft public publisher (518)

microsoft public excel newusers (509)

microsoft public excel charting (503)

microsoft public word pagelayout (498)

microsoft public dotnet languages vb (469)

microsoft public vb general discussion (461)

microsoft public development device drivers (446)

microsoft public word application errors (435)

microsoft public office setup (430)

microsoft public sharepoint general (427)

microsoft public access gettingstarted (411)

microsoft public windowsce platbuilder (410)

microsoft public windows powershell (407)

microsoft public onenote (396)

microsoft public frontpage client (393)

microsoft public sqlserver reportingsvcs (388)

microsoft public outlookexpress general (369)

microsoft public access tablesdbdesign (353)

microsoft public pos (353)

microsoft public vc mfc (347)

microsoft public outlook program vba (341)

microsoft public windows live messenger (325)

microsoft public money (310)

microsoft public windowsxp hardware (300)

microsoft public windows 64bit general (296)

microsoft public scripting vbscript (290)

microsoft public windowsxp basics (240)

microsoft public windows mediacenter (230)

microsoft public dotnet general (226)

microsoft public mac office (198)

microsoft public nntp test (195)

microsoft public windows inetexplorer ie6 outlookexpress (192)

microsoft public windows vista music pictures video (154)

microsoft public win98 gen discussion (154)

microsoft public sharepoint setup and administration (142)

microsoft public windows vista hardware devices (130)

microsoft public dotnet framework (105)

microsoft public windows vista performance maintenance (97)

microsoft public visio (89)

microsoft public access 3rdpartyusrgrp (73)

microsoft public dotnet xml (59)

microsoft public access conversion (56)

microsoft public pt windowsxp (36)

microsoft public windows live photogallery (32)

microsoft public access developers toolkitode (32)

microsoft public dotnet faqs (15)

microsoft public dotnet framework aspnet datagridcontrol (10)


microsoft.public.windows.powershell Post New
Items(406) /5 Next >> Last >|
Subject Posted Replies From
Setup cannot proceed

I am wondering if anyone has run into this before while installing Powershell 2 on Windows Server 2003 Install begins extracting what looks like .Net framework libraries, then stops with a dialog box named Windows Management Framework Core Setup Error. The dialog box contains the following statement: Setup cannot proceed. Windows Management Framework Core is already installed on your system. With only and OK button. I have looked for an install of powershell 2 that does not contain the Management Framework Core to no avail. Is there a way to suppress the installation o

3/11/2010 6:46:08 PM 2 =?Utf-8?B?U2Vub3IuR2Vlaw==?= <SenorG...@discussions.microsoft.com>



WMI Error Terminating Script

Hello, I cannot seem to figure this one out. I am trying to create a script that retrieves the SMS site code from a list of computers. The problem I'm running into is that when the WMI call encounters an error the script terminates. I've tried setting the ErrorActionPreference to "SilentlyContinue" and have even tried to create try/catch blocks but the script still terminates. I'm hoping that the try/catch block is still an option and that I was only unsuccessful because I don't fully understand what exception is being raised. Here's what I have so far. --------------------

3/11/2010 5:08:01 PM 1 =?Utf-8?B?Sk1pbm5pY2s=?= <JMinn...@discussions.microsoft.com>
MSScriptControl.ScriptControl help

Her is my powershell code: $vbsCode = Get-Content "c:\scripts\CreateMailbox.vbs" $vbs = New-Object -ComObject MSScriptControl.ScriptControl $vbs.language = "VBScript" $vbs.addCode([string]::Join("'n",$vbsCode)) #$vbs | Get-Member $vbs.CreateMailbox() Here is my vbscript code: Function CreateMailbox(Server,User) Dim oExchsrv Dim sDispName oExchsrv = Server sDispName = User Set oUser = GetObject ("LDAP://cn=" & sDispName & ",ou=New Accounts,dc=stormontvail,dc=org") WScript.Echo sSamAcct & " mailbox created on: " & oExchsrv oUser.CreateMailBox "LDAP://CN=Mailbox Store (

3/11/2010 3:56:11 PM 0 =?Utf-8?B?SmFjb2IgU2FtcHNvbg==?= <JacobSamp...@discussions.microsoft.com>
Tee-Object just over writes the file

Hi, Tee-Object over writes the content of the file, if i need to append is there any best way to do that? I need output on both screen and log file Regards, Harsha

3/11/2010 12:25:01 PM 1 =?Utf-8?B?QGx3YXlz?= <lw...@discussions.microsoft.com>
Capture Error, Warning and Info in a single file.

Hi, I need to capture all the errors by external commands, write-error, write-host, write-warning in a single file. I tried using 2>&1, 9>&1,... nothing worked. It will be nice to have error displayed with the pre-fix ERROR:, warning with WARN: ,.... Is there any cmdlets / snapins to do that Thx, Harsha

3/11/2010 12:24:01 PM 1 =?Utf-8?B?QGx3YXlz?= <lw...@discussions.microsoft.com>
Clustering question - import-module powershell failoverclusters.

Hi, I have a four node cluster built on windows server 2008 R2. The cluster itself is fine and I can manage it through the GUI no problem. Hi, However I recently discovered that I can manage it from powershell on he R2 box itself. all I have to do is import the library "FAILOVERCLUSTERS " first. so he first statement in my powershell scrip is always import-module powershell FAILOVERCLUSTERS however, it would be really cool if I could use this functionality from my client machine (win xp sp3) I have loaded powershell 2.0 on it, however, running the statement import-mo

3/11/2010 9:18:52 AM 1 "Martin" <martin_remove_and_no_s...@martin_remove_.co.nz>
lastlogon (time format)

$computer_lastlogon = get-qadcomputer -identity $computer$ -includedproperties lastLogon | foreach {$_.lastlogon} The results as follows: 3/10/2009 HH:MM:SS How can i format it such that results appear as 3rd Oct 2009 (without the hh:mm:ss) ?

3/11/2010 9:14:07 AM 1 "IT STAFF" <jkk...@hotmail.com>
Outlook auto letter

Hi, I'm looking for a powershell / VB script to get a user mailbox size, item count, deleted item size and e-mail it to the user. Next step. How to run this for all users ? Is it also possible to write a text like (message text): "Your mailbox size is : xx " "Your mailbox item count is : xx" "Your deleted item size is : xx" Will it also be possible to make a custom text if mailbox size is larger than eg. 2Gb and another if it is 4Gb ? TIA MJ

3/11/2010 8:46:11 AM 0 "Mike Johnson" <So...@guys.com>
pipelines supported by PowerShell cmdlets

From: http://technet.microsoft.com/en-us/library/dd315282.aspx <# Description The Write-Output cmdlet sends the specified object down the pipeline to the next command. If the command is the last command in the pipeline, the object is displayed in the console. Write-Output sends objects down the primary pipeline, also known as the"output stream" or the "success pipeline." To send error objects down the error pipeline, use Write-Error." #> This mentions two pipelines supported by PowerShell cmdlets 1) primary pipeline, aka "output stream" or the "success pipe

3/10/2010 11:14:59 PM 0 Larry__Weiss <...@airmail.net>
How can I surface function/script parameter aliases to Get-Help?

I am starting to use the new Comment-Based Help feature for functions and scripts, but I do not see a way to surface aliases for parameter names to Get-Help. Example: Script file named Test-Me1: --begin file-- Param( [Alias('osn')] [string]$OptionSetName ) <# ..PARAMETER OptionSetName The name of an entry in the OptionSet XML file. #> --end file-- At a PowerShell prompt, I type: Get-Help -Full ./Test-Me1 Output: NAME C:\Temp\Test-Me1.ps1 SYNOPSIS SYNTAX C:\Temp\Test-Me1.ps1 [[-OptionSetName] <String>] [<CommonParameters>] DESCRIPTION

3/10/2010 8:00:21 PM 0 Chuck Heatherly <chuck.heathe...@community.nospam>
New-PSsession failing, but winrs commands work fine.

I'm successfully able to run winrs -r:http://localhost:5985, but when I try to create a new-pssession I get the following error: [localhost] Connecting to remote server failed with the following error message : The configuration XML is not valid. T he provider "Microsoft.PowerShell" supports the =E5=8D=97=E6=85=8D=E5=81=AE= =E7=95=AC=E6=A5=A7=E5=89=AE=E6=B1=A5=E6=85=A5=E6=95=B3=E6=A1=93=E6=B1=A5=E4= =8D=AC=E6=B9=AF=E6=95=B4=E7=91=B8 method but it could not be loaded. Verify that the prov ider exports the =E5=8D=97=E6=85=8D=E5=81=AE=E7=95=AC=E6=A5=A7=E5=89=AE=E6= =B1=A5=E6=85=A5=E6=9

3/10/2010 5:39:39 PM 0 "techjoh...@gmail.com" <techjoh...@gmail.com>
WinRM Failing

Hi All, Not sure if this is the correct place to be posting this question but I'm having problems with a server where WinRM is configured. I used enable-psremoting to do this. However when I try to remote connect to this server I get the following Enter-PSSession : Connecting to remote server failed with the following error message : <f:WSManFault xmlns:f="http://s chemas.microsoft.com/wbem/wsman/1/wsmanfault" Code="2147749890" Machine="xxxxxxxxxxx"><f:Message></f:Message></f:WSManFault> For more information, see the about_Remote_Troubleshooting Help topic. Any help much

3/10/2010 4:57:01 PM 6 =?Utf-8?B?Sm9ubnlH?= <Jon...@discussions.microsoft.com>
How to list the available COM applications

Hi all, While surfing for a specific problem, I saw some PoSH examples which use COM to call applications. One example is here : http://blogs.msdn.com/virtual_pc_guy/archive/2006/06/13/630165.aspx Here, the "Virtual PC Guy" uses PoSH to call VirtualServer through its COM API. My question is pretty simple, is there a way to get all the COM objects available on my computer? Thanks.

3/10/2010 2:54:01 PM 2 =?Utf-8?B?Um9tdWFsZA==?= <Romu...@discussions.microsoft.com>
execute $variable LATER

$a = "$computer `t $computer_lastlogon `t $computer_pwdlastset" | out-file -filepath c:\results1.txt -append =================================== I wish to store the above statement in a variable, and to EXECUTE LATER. How do i prevent $a from execution until i decided to put in somewhere in my script as $a ?

3/10/2010 6:54:24 AM 7 "IT Staff" <jkk...@hotmail.com>
unable to remove or clear variable ?

$dn_list = Get-QADObject -Type OrganizationalUnit | where {$_.dn -match 'Desktops'} | foreach {$_.dn} | sort next i did a remove-variable $dn_list or clear-variable $dn_list Error i got : Remove-Variable : Cannot find a variable with name 'OU=Desktops,dc=com' but i am still able to list out $dn_list. Why ?

3/10/2010 6:21:41 AM 1 "IT Staff" <jkk...@hotmail.com>
Quest - getting their properties to input for CSVDE ?

does csvde has limitied attributes to export ? For quest cmdlets, i can use more properties/attributes, but i wish to pipe to csvde for export. Can it be done ?

3/10/2010 2:47:39 AM 1 "IT Staff" <jkk...@hotmail.com>
Server Core

What is the benefit of having Powershell v2 on my 2008R2 server core domain controller. From an AD perspective how does this help me?

3/9/2010 9:13:29 PM 2 "Clot" <C...@live.com>
Another question concerning powershell and exchange 2003

i am really strugling with this process. I see examples on the net for doing this but they all do a lot more than I want so there is a ton of code to sift through. Basicly I will query AD for a user account. I want to be able to create the mailbox for that account. Do you have a simple example of what i need to do to get access to CDOEXM and what parameters it is wanting. I assume that is where my trouble is.

3/9/2010 8:24:01 PM 0 =?Utf-8?B?SmFjb2IgU2FtcHNvbg==?= <JacobSamp...@discussions.microsoft.com>
date format questions.

Hi, I am new at this PS scripts. I want to create a file name with a date component to make the name specific. I want to use the date and time to achive that. How can I get the date and time from a typical date format into a string like: 20100309120754 Thanks.

3/9/2010 7:09:02 PM 4 kingram <king...@aspenmas.com>
Powershell and log4net to SQL Database

Has anyone successfully used log4net to log to an SQL database? I am able to use log4net successfully when logging to console, files, eventlog, etc, however when attempting to log to the ADONetAppender, it cannot load my configuration file. Here are the Powershell commands used to get setup: $log4netDLL = "C:\Path\log4net.dll" $log4netConfig = "C:\Path\log4net.config" [Void][Reflection.Assembly]::LoadFile($log4netDLL) [Log4Net.LogManager]::ResetConfiguration() [Log4Net.Config.XmlConfigurator]::ConfigureAndWatch($log4netConfig) Here is the ADONetAppender section of my config file:

3/9/2010 6:08:37 PM 4 nicad49
Why is powershell eating memory and not releasing it ?

Powershell 2.0 on XP sp3. I am NOT running a script, but i ran the commands interactively which export some items to a external file. I repeat each time and memory is not released when each time the commands run in less than one minute. How can i look "purge memory" on the fly ? Eg get-qadcomputer -searchroot 'OU=abc,DC=mc,DC=com' -sizelimit -includedproperties use rAccountControl | where {$_.useraccountcontrol -ne 4098} | foreach {$_.name} | out-file -filepath c:\results.txt -append I changed the OU each time and run the commands interactively , but memory usage in

3/9/2010 3:08:36 AM 4 "IT Staff" <jkk...@hotmail.com>
How to edit NoteProperty names containing space created by IMPORT-

I use Powershell a lot to process bulk data exported from SAP and other systems. The export interfaces create CSVs with headings which contain spaces. This works fine but it limits the ability to reference the objects. A exported field might be called "Employee Number". IMPORT-CSV creates an object with a NoteProperty called "Employee Name" Now $obj."Employee Name" is not valid $obj.EmployeeName would work nicely Is there a way to modify NoteProperty -name after IMPORT-CSV or Is there a way to make IMPORT-CSV remove spaces from names? Thanks

3/9/2010 12:51:01 AM 1 =?Utf-8?B?WmFyZG9zNDI=?= <Zardo...@discussions.microsoft.com>
What is teh easiest way to create mailbox on exchange 2003 without

This process seems to be pretty complicated. I have not been able to find anything to allow me to create an exchange mailbox for 2003. i don't want to use any 3rd tools for this process but .net and wmi or anything else built in is fine. A pointer in the correct direction would be helpfull. Thanks

3/8/2010 10:28:01 PM 8 =?Utf-8?B?SmFjb2IgU2FtcHNvbg==?= <JacobSamp...@discussions.microsoft.com>
Word document not printing

$FN = $emp.FirstName $LID = $emp.LoginID $PWD = $emp.Password $WordDocument = $Word.Documents.Open("\\stormontvail.org\is\documentation\orientationrosters\NewEmployeeWelcomeTemplate.docx") $Bookmark = $WordDocument.Bookmarks.Item("FirstName").Range $Bookmark.Text = "$FN" $WordDocument.Bookmarks.add("FirstName",$Bookmark) $Bookmark = $WordDocument.Bookmarks.Item("LoginID").Range $Bookmark.Text = "$LID" $WordDocument.Bookmarks.add("LoginID",$Bookmark) $Bookmark = $WordDocument.Bookmarks.Item("Password").Range $Bookmark.Text = "$PWD" $WordDocument.Bookmarks.a

3/8/2010 7:49:01 PM 4 =?Utf-8?B?SmFjb2IgU2FtcHNvbg==?= <JacobSamp...@discussions.microsoft.com>
Pause a running script

Hi, A while back I wrote a pretty trivial script ( -ok all my scripts are trivial, alright! ). All it did was take strings from one place, modify them and send them someplace else. Mundane stuff. The users love it though as it saves them so much time. One of the users has now asked me how to "pause" it. Hhhmmm.. It's just iterating through an array of strings, and using wscript.shell sendkeys to send the text into another application. How can I add functionality so that if the spacebar, for example, is tapped the script pauses till the same key is pressed again? I mean, i

3/8/2010 3:11:54 PM 8 Kryten <kryte...@googlemail.com>
How can I remotely list Cluster groups/owners

I would like to be able to list the cluster groups/owners for a remote cluster. Can anybody help? Many Thanks, =Adrian=

3/8/2010 12:06:01 PM 5 =?Utf-8?B?QWRyaWFu?= <Adr...@discussions.microsoft.com>
Managing Outlook Windows Powershell

dear scripting guys i am new to windows powershell, and i need your help in creating a windows powershell script that moves all mails from folder A ( and all it's subfolders) to Inbox then delete the folder A thank you in advance

3/8/2010 10:53:17 AM 0 Sweet Choco <ahmed.haf...@gmail.com>
dump computer objects from sub-ou

I am using quest cmdlets. My AD structure as follows: City A - laptops - users City B - laptops - users etc etc ...All OU follow the above for different cities. I wish to export ONLY laptops DURING AD search ...what is the filter to apply ?

3/8/2010 8:16:48 AM 3 "IT Staff" <jkk...@hotmail.com>
Background job hanging when openning SQL Connection

I have a script that runs background jobs which execute commands on an MS SQL 2008 Express server. The background jobs are all hanging when they try to open an SQL connection to the server. The following is a simplified command which hangs on my system: start-job { "START" > .\connect.txt; $conn = New-Object System.Data.SqlClient.SqlConnection("Data Source=rcev21lp\SQLEXPRESS; Initial Catalog=hardware_audit; Integrated Security=SSPI"); "OPEN" >> .\connect.txt; $conn.open(); "CLOSE" >> .\connect.txt; $conn.close(); } If I run that command, connect.txt contains the following:

3/6/2010 5:51:03 AM 6 =?Utf-8?B?RGF2ZQ==?= <D...@discussions.microsoft.com>
Remove Share and Delete Directories

I have been using a VBscript to systematically remove specified shares on a server and then delete the corresponding directory. Can someone assist in doing this via Powershell instead and provide an explanation? Thanks

3/5/2010 6:33:01 PM 1 =?Utf-8?B?bWl0MDQwOA==?= <mit0...@discussions.microsoft.com>
Trouble modifying Folder rights

I am working on a script to create new users in our domain. One of the steps is to create a home directory. What I want to accomplish is create the folder. Turn off inheritance from the parent object, and add the the individual rules that are necessary. So far I can create the folder and get the current acl but it does not seem to be getting modified. here is my code so far. New-Item "\\***********\test2" -type directory $strFolder = "\\***********\test2" $ACL = Get-Acl $strFolder $identity = "Domain\admjsampson" $rights = "modify" #$Inheritance = @("ObjectInherit", "Co

3/5/2010 5:10:01 PM 1 =?Utf-8?B?SmFjb2IgU2FtcHNvbg==?= <JacobSamp...@discussions.microsoft.com>
powershell_ise always echos output

Hi, I am using powershell_ise if I write the following simple script $a = Get-Date -Format "yyyyMMdd" Write-Host "Filename $a" the output is PS C:\WINDOWS\system32\windowspowershell\v1.0> $a = Get-Date -Format "yyyyMMdd" Write-Host "Filename $a" Filename 20100305 when I would expect simply Filename 20100305 can anybody please tell me why every line is echoed to screen and if I can stop this behaviour please. I would like the editor to act more line the commandline powershell. thanks in advance. cheers martin.

3/5/2010 9:13:30 AM 1 "Martin" <martin_remove_and_no_s...@martinz_remove_.co.nz>
Can't Create a New Object in PowerShell

I'm trying to create a new object in powershell and I get the follow error: "New-Object : Cannot find type [Reflection2.Session]: make sure the assembly containing this type is loaded." Here is the power shell code that I'm running that is returning the error: $confObj = New-Object "Reflection2.Session" $confObj.Visible = $true The following code DOES work when I create a vbs script: Set confObj = CreateObject("Reflection2.Session") confObj.Visible = True If a assembly needs to be loaded, how do I find out which file to load? Thanks in advance!!

3/4/2010 5:16:27 PM 5 CCENT <kali...@gmail.com>
CPU performance monitoring via powershell

Is there a command in powershell where I can monitor the cpu performance of the server. The server has 8 cpu's and I want to know if i monitor the cpu performance. Is there a wmi class I can use. Will it be able to show cpu performance on the last 1 day or so.

3/4/2010 4:10:21 PM 1 "guv" <...@>
Pass argument for a command waiting for user input

Hi All, I am using perforce, in one scenario after execution of the command it keeps waiting for the user input on the command prompt. Once i give it displays some data and exits. I need to pass the argument after execution of the command in my automation script. Please let me know how that can be done. Also i need to capture the data. Thanks in advance. Harsha Check this http://openadda.com

3/4/2010 1:17:01 PM 0 =?Utf-8?B?QGx3YXlz?= <lw...@discussions.microsoft.com>
Get-ChildItem Issue.

Hi Guys. I have the following scripts, that have to delete files older than 31 days. The script is broken down into 2 sections. 1st scripts deletes files older than 2 days. 2nd script deletes empty folders after the 1st srcipt is complete. So far the 1st script seems to be working, but it deletes folders as well and it's not meant to. The 2nd scripts delete folders even if i specifiy on empty folders. 1st script delete files. $Date=get-date $Date=$Date.AddDays(-31) $Datefn=Get-Date -format M.d.yyyy #Set The File Name for the log file $DelFileName = $Datefn #Set T

3/4/2010 7:50:01 AM 1 =?Utf-8?B?dmFud3lrbQ==?= <vanw...@discussions.microsoft.com>
Accessing Google SDK from Powershell.

So, far, I have managed to load the DLL libraries. I have even managed to connect to picasaweb as a service. Has anyone out there done anything with Google SDK in powershell? Is Zend a requirement for .NET? Thanks in advance!!! Chris http://www.powershellblog.com

3/4/2010 5:06:29 AM 4 "ch...@powershellblog.com" <df2...@gmail.com>
using PowerShell to modify the priority of a process

How can I use PowerShell to modify the priority of a process? Specifically I want to assign the priority of "High" to explorer.exe - Larry

3/4/2010 2:50:40 AM 2 Larry__Weiss <...@airmail.net>
Excel

Hi! :) Is there any good web-pages or other sources of information about Excel and PowerShell around? One specific question I have is: How do I select/activate a certain tab/sheet in a workbook? Thanks a million!! :) /Sofia powershell newbe

3/3/2010 9:33:20 PM 9 "Sofia Engvall" <@>
GroupPolicy Backup

Does anyone know of a powershell script that will preform the same backup function as in the GPO Manager ? I want to preform a regularly scheduled backup of the GPO's, but have the GPO Manager be able to manage them if need be. Thanks in advance

3/3/2010 8:18:14 PM 2 Chris <cisak...@mail.nysed.gov>
Getting File Version Info - Errors

I am trying to use the following command to get the version info of an specific file in Powershell: PS C:\> gc Servers.txt | foreach { [system.diagnostics.fileversioninfo]::GetVersionInfo \\$_\C$\windows\system32\drivers\storport.sys } However, I'm getting the following error: Unexpected token '\\$_\C$\windows\system32\drivers\storport.sys' in expression or statement. At line:1 char:126 + gc Servers.txt | foreach { [system.diagnostics.fileversioninfo]::GetVersionInfo \\$_\C$\windows\system32\drivers\storport.sys <<<< } + CategoryInfo : ParserError: (\\

3/3/2010 5:29:29 PM 3 =?iso-8859-1?Q?Carlos_Felipe_Fran=E7a_da_Fonseca?= <carlosfelipefra...@gmail.com>
filter eventlog faster

I'm trying to check for specific events on 6 servers. I've written the following script but it's taking a long time to run. It seems like it has to check the date on every event. I'm hoping there is a filter that I can apply to only show events from the previous 2 days. I'm running from XP and the servers are 2k3 so I can't use Get-WinEvent $d2 = (Get-Date).adddays(-2) $s = "s1","s2","s3","s4","s5","s6" foreach ($server in $s) {$server; get-Eventlog -logname system -source PlugPlayManager,Disk -computername $server -after $d2} I was hoping I could filter on the eventid bu

3/3/2010 4:25:54 PM 4 "Matt Williamson" <iH8S...@spamsux.org>
PS 2.0 still asks confirmation to run my script

Hi all, My company test system is made of several virtual machines which run the same PS script. This script is hosted on the host computer, each VM is intalled with PS 2.0 and all VMs are their ExecutionPolicy to "Unrestricted". At startup, the VMs connect a shared drive from the host computer and execute the script stored in this share. But, despite the "Unrestricted" policy, PS still asks confirmation to run the script. For me it's a blocking issue as my test system is intended to run without any human action. This process worked well with PS 1.0, how can I make it wor

3/2/2010 4:03:02 PM 11 =?Utf-8?B?Um9tdWFsZA==?= <Romu...@discussions.microsoft.com>
Changing local admin password on domain computers

I have written the below powershell script to change the local administrator account on some servers that I have listed in the servers.txt file. $name="administrator" get-content c:\servers.txt | foreach-object { [adsi]$admin="WinNT://$_/$name,user" $admin.SetPassword("password2") $admin.setinfo() } When I run the script i get the following error : Exception retrieving member "setpassword". The network path was not found $admin.setpassword <<<< ("password2") categoryinfo : Notspecified: (:) [], ExtendedTypeSystemException. Any ideas why the above script fails. If I use

3/2/2010 3:17:24 PM 1 "guv" <...@>
Windows 2008 - Cluster Commands via Powershell

Hello, I want send Clustercommands, set Ressources Online/Offline, against a Cluster. We are using a Windows 2008 x64 SP2 Server. Unfortunately I didn't find any links in the web to help me for this question. Can anyone help me? * witch Power shell version do I need for this tasks * can you give me some Examples Thaks for your help Franz-Josef

3/2/2010 8:32:01 AM 2 =?Utf-8?B?RnJhbnotSm9zZWY=?= <Franz-Jo...@discussions.microsoft.com>
Working with DirectoryInfo

I'm working on a function that removes files related to a virus. The files are called x[1], x[2], x[3], etc, and are found in "Local Settings\Temporary Internet Files\Content.IE5\<CacheFolder>". The script fails to detect and remove the files because the variable $CacheFolder (seems to return a string instead of a folder object (although the type is reported as DirectoryInfo). The Get-ChildItem cmdlet is trying to the cache folders in my home directory instead of the correct paths. How can I adjust this function to correctly search the cache folders? function Remove-Virut ($Compu

3/1/2010 5:19:41 PM 2 David Trimboli <trimb...@cshl.edu>
Get-WinEvent Message NoteProperty - Message = null

When using Get-WinEvent to retrieve data from Event Logs the Message property is one of the default returned, however it does not display any information. I notice that it is a NoteProperty and it's definition is set to: Message = null The question is how to I retrieve the Message data or is this cmdlet not designed to do that?

3/1/2010 1:32:02 PM 4 =?Utf-8?B?am1lZGQ=?= <jm...@discussions.microsoft.com>
Problem accessing SQL server 2008 job history

I've been using code along the lines of... [System.Reflection.Assembly]::LoadWithPartialName('Microsoft.SqlServer.SMO') | Out-Null $sqlServer = New-Object ('Microsoft.SqlServer.Management.Smo.Server') $instance $jobHistoryFilter = New-Object ('Microsoft.SqlServer.Management.Smo.Agent.JobHistoryFilter') $jobHistoryFilter.OutComeTypes = 'Failed' $sqlServer.JobServer.EnumJobHistory($jobHistoryFilter) ....To access SQL server job history. Which until now has worked OK. We have just had a SQL server 2008 instance setup. When I try the same on this instance I get the

3/1/2010 11:41:01 AM 2 =?Utf-8?B?QWRyaWFu?= <Adr...@discussions.microsoft.com>
Populating XML data

Hi Guys, I'm fairly new to Powershell (and XML) and have come across a stumbling block that I can't resolve. I'm trying to write some code to poulate an XML file with data about sites within our organisation. This issue is with the nested nodes (I think they're called nodes?) The XML which I hand wrote looks like this: <?xml version="1.0" encoding="ISO-8859-1"?> <Organisation> <Site> <Code>MEL</Code> <Name>Melbourne</Name> <MailServer>MAILSRV1</MailServer> <State>VIC</State> <SecurityGroups> <group>SecGroup1</group> <group>SecGroup2</group> </SecurityGroups> </Site> <

2/28/2010 9:37:22 PM 2 Pete1981 <gu...@unknown-email.com>
AD Sites & Subnets

Earlier i had a Macro written in Word which when opened used to collect all the AD Sites and Subnets into pre created Tables in the word document. Can you tell me how i can achieve that using powershell.

2/27/2010 6:19:59 PM 2 "Kerry" <Ke...@live.com>
Get-WMIObject Win32_NetworkAdapterConfiguration

I have the following code I use to try to change the settings on our servers from dhcp to static. It gets "hung" up on the enablestatic() peice, I know its because after it changes the ip it looses the connection but how do I get Powershell to either fork off this command or time out earler. BTW it makes the changes it just stays hung for a long time before moving onto other machines. Any help appreciated (there are a few extral lines in there that I was playing around with to see if I could get it to work) # Connect-VIServer server function set-ip { # param ( # [Parameter(M

2/27/2010 7:44:22 AM 2 adrianallan <gu...@unknown-email.com>
pagefile.sys in task manager goes up, never come down

os : xp sp3 powershell : 2.0 use quest cmlets machine mem = 1 gb As i do a search and detect OS via the Active Directory, i looked at the task manager and the PF Usage keeps increasing until powershell fails to run after looping for a certain number of machines. Is there a way for powershell to release the PF usage for each sucessful run when i scan "each" machine, rather than hold it forever ?

2/27/2010 4:13:15 AM 5 "IT Staff" <jkk...@hotmail.com>
lock files

is there a way to know what application has lock a file in powershell.... actually I use processExplorer from sysinternal but it will be nice if we can do this in Powershell. -- Michael Soza Estudiante Ingenier�a Civil Inform�tica Universidad de Concepci�n

2/26/2010 10:36:20 PM 1 "Michael Soza" <voodoo...@hotmail.com>
start powershell in the same window with start-process -verb runas

How can I start powershell with admin rights in the same window? when I do: start-process powershell -verb runas it opens in another window..... I try with -nonewwindow parameter but then I go trough msdn to read more about and found that it has a different meaning.... the process run but I can not see it, with get-process I realize that is actually running -- Michael Soza Estudiante Ingenier�a Civil Inform�tica Universidad de Concepci�n

2/26/2010 10:20:04 PM 1 "Michael Soza" <voodoo...@hotmail.com>
Additional Mailbox

i have the following code which will let me "use" the default mailbox in my outlook client $olFolderInbox = 6 $outlook = new-object -com outlook.application; $ns = $outlook.GetNameSpace("MAPI"); $inbox = $ns.GetDefaultFolder($olFolderInbox) after this it reads through each email and if the subject matches a criteria and unRead=True then it writes out to screen my problem is I have another shared/group mailbox that we call "Notices" and the script needs to go through the "Notices" mailbox instead, i have spent this afternoon trying to find a solution to my problem but im stu

2/26/2010 4:34:01 PM 2 =?Utf-8?B?TWlnaHR5IER1Y2s=?= <Mighty D...@discussions.microsoft.com>
How to catch binary output in Powershell (1)

This is a multi-part message in MIME format. ------=_NextPart_000_000F_01CAB743.86FD00A0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Guys, I got an issue in my work. I want to know if you have ever met similar = scenario and how do you manage to resolve it? SCENARIO I need to call a binary in Powershell. So I used below code $myBinary =3D "c:\myPath\abc.exe" $myArgs =3D "-p para1 -m para2 -t para3" & $myBinary $myArgs 2>&1>test.txt But I later found that some msg(exception and other things) could be = seen on screen while

2/26/2010 4:23:59 PM 3 "Robert.Zhang" <he...@microsoft.com>
XML file misformatted

Hi everybody. I have PS enumerating multiple XML files. Unfortunately, some of the XML files are malformatted, eg. one of them contains an illegal first character on line one, like this "z": z<?xml version="1.0" encoding="utf-8"?> So, I need error handling to detect such an error. For this, I've created: [xml]$myXMLFileContents = get-content c:\errorProneXMLfile.xml - ErrorVariable errXML -ErrorAction SilentlyContinue Unfortunately, PS halts on this error - it seems the "SilentlyContinue" is ignored :-( Maybe because the -ErrorAction only refers to the Get-Content... How do I

2/26/2010 3:27:20 PM 1 Thomas Makro <thomasma...@gmail.com>
Windows PowerShell Documentation Review

Regarding this blogpost: Windows PowerShell Documentation Review https://msmvps.com/blogs/jeffloucks/archive/2010/02/25/windows-powershell-documentation-review.aspx from that blogpost: "As a member, you'll get to read and comment on the Help docs before they're published, and work with the writers, editors, and the product team to make sure every word is really helpful." Does anyone here have any information about this project? Is there repository for these contributed comments separate from https://connect.microsoft.com/powershell ? - Larry

2/25/2010 4:41:07 PM 5 Larry__Weiss <...@airmail.net>
comprehensive PowerShell Language Reference

The recent blogposts by Bob Apthorpe like http://stackoverflow.com/questions/2331829/is-there-a-language-reference-manual-for-powershell http://overscope.cynistar.net/authors/1-Bob-Apthorpe http://overscope.cynistar.net/archives/298-Windows-PowerShell,-Radioactive-Sludge,-and-Documentation-Failure.html have once again reminded me that I do not possess a comprehensive PowerShell Language Reference. Is there any initiative ongoing to create one? - Larry

2/25/2010 4:16:34 PM 4 Larry__Weiss <...@airmail.net>
WMI PowerShell Provider

The comment section of the post linked to below mentions the possibility of a WMI PowerShell Provider but doesn't link to such an implementation. http://blogs.msdn.com/powershell/archive/2007/08/01/get-wmichildnamespace.aspx Is there an existing implementation of a WMI PowerShell Provider ? - Larry

2/25/2010 3:28:39 PM 7 Larry__Weiss <...@airmail.net>
How can I get details of Scheduled Tasks on remote computers?

I'd like to be able to check if Windows scheduled taks are running successfully on remote computers. How can this be done in powershell? Many Thanks, =Adrian=

2/25/2010 10:01:01 AM 5 =?Utf-8?B?QWRyaWFu?= <Adr...@discussions.microsoft.com>
Invoke PowerShell Script from Batch File

Richard just helped me write a PowerShell script to enable/disable a net adapter. Now I want to run the script from a batch file. I tried this: PowerShell -file EnableAdapter.ps1 with no luck. EnableAdapter.ps1 is in my path. It works if I run it from a PS prompt: & EnableAdapter.ps1. It also works if I use the noexit option: PowerShell -noexit -file EnableAdapter.ps1 Is it timing out or something? How can I get the first one to work? Fred

2/25/2010 1:45:41 AM 8 "Frederick R. Hutchings" <frederi...@cox.net>
Why can I do this in VBScript...?

Hi, I'm currently making heavy use of an application that provides an ActiveX scripting/automation interface via VBScript. In those scripts a special object is made available which represent the application's various properties and methods. Works great. However it's not Powershell, so it's not perfect. My question is that if I can run VBScript against this object, why can't I simply instatiate this object in Powershell and use that. Thing is, search as I have amongst all the dark corners of new-object -com

2/24/2010 2:45:46 PM 2 Kryten <kryte...@googlemail.com>
will powershell have a su cmdlet

it's quite cumbersome when some functions only work in elevated process and ps don't have a su to switch it

2/24/2010 12:49:58 AM 6 ryan <r...@gmail.com>
using PowerShell to toggle the "Snap To" Mouse property

I have been trying to toggle the "Snap To" Mouse property in XP using these PowerShell commands: PS C:> Set-ItemProperty -path 'HKCU:\Control Panel\Mouse' -name SnapToDefaultButton -value 0 PS C:> Set-ItemProperty -path 'HKCU:\Control Panel\Mouse' -name SnapToDefaultButton -value 1 They do indeed toggle the values of that registry value that the Control Panel/Mouse GUI Pointer Options "Snap To" checkbox toggles, but the app level (even a refreshed Control Panel itself) does not honor the new value. What am I missing? - Larry

2/23/2010 9:04:49 PM 0 Larry__Weiss <...@airmail.net>
Select WMI objects and import into SQL

I have been trying to figure out how to import information collected from WMI objects from multiple servers and import directly into SQL table, not via csv's or anything. Does anyone have an example or instructions? -- PoShNoob

2/23/2010 8:41:02 PM 4 =?Utf-8?B?UG9TaE5vb2I=?= <PoShN...@discussions.microsoft.com>
Excel reference

Does anyone know a good reference for the excel functions/methods in powershell. doing the more advance stuff in excel through powershell. Setting print areas, centering columns etc...

2/23/2010 7:50:06 PM 0 Chris <cisak...@mail.nysed.gov>
invoke command

For some rason, I can not get this to exicute. It works on a cmd prompt, but not as invoke in PS. $command = "C:\scripts\SysInternals\psexec.EXE \\remotemachine MsiExec.exe /norestart /q/x{0EFC6259-3AD8-4CD2-BC57-D4937AF5CC0E} REMOVE=ALL" Invoke-Command -scriptblock {$command} Anyone have any ideas?

2/23/2010 7:46:47 PM 9 Jsimpson <jsimpson2...@hotmail.com>
win32_mappedlogicaldisk returns null on Vista

When I do "get-wmiobject win32_mappedlogicaldisk" on my XP system it works fine, and returns the expected information about my network drives. However, when I do the same thing on my Vista system, I get null. In both cases I'm running Powershell 2.0, and have mapped network drives. Any ideas? I'm a rank beginner in Powershell, so it's probably something simple I'm doing wrong... TIA, dl

2/23/2010 6:30:55 PM 5 "daveL" <dlawles...@gmail.com>
Enable Net Adapter

XP SP3 Workgroup I found these scripts to enable/disable a network adapter at http://forums.techarena.in/software-development/1118216.htm. I have not been able to get them to work. When I run it from the Powershell command-line, I get the error: You cannot call a method on a null-valued expression. At line:1 char:68 + $shell = New-Object -comObject Shell.Application((($shell.NameSpace <<<< (0x31) | where {$_.Title -eq "Network Connec tions"}).Items() | where {$_.Name -like "Local*"}).Verbs() | where {$_.Name -eq "En&able"}).DoIt() + CategoryInfo : InvalidOperat

2/23/2010 4:19:23 PM 5 "Frederick R. Hutchings" <frederi...@cox.net>
enumerating empty groups

Can anyone tell me how I can list all empty AD groups? I've tried several variations on: get-adgroup -filter * -properties canonicalname,cn,members | where {$_.members -eq "{}"} | fl with no success. Thanks -- Mark Salter National Museum of Wales

2/23/2010 10:37:01 AM 4 =?Utf-8?B?U2FsdHk=?= <Sa...@discussions.microsoft.com>
catch array from pipe

hello, i have a script to sign file. but it will only sign the last file passed down. (ls *.ps1 | sign) ps didn't show any syntax error. could you help point it out? function global:sign { param( [Parameter(mandatory=$true,ValueFromPipeline=$true)][System.io.fileinfo[]]$fileList ); foreach ( $file in $fileList ) { set-authenticodesignature -filepath $file -certificate ( ls cert:\CurrentUser\my -codesigning ); } }

2/23/2010 8:51:22 AM 2 ryan <r...@hotmail.com>
Is it possible to format a PSObject with a .ps1xml file?

This might be a totally ridiculous question...but here goes anyway: I have a couple of filters in modules that write PSObjects to output using code like: $x = New-Object PSObject -Property @{ one = "one" two = "two" } Write-Output $x There's just way more properties. How does one specify 'default' formatting styles for a System.Management.Automation.PSCustomObject like you can with other types using .ps1xml files? That may not even be the right question to ask. What I'd like would be a way to define the default formatting for format-table, format-list, etc for t

2/23/2010 4:17:00 AM 3 Clint Bergman <clintberg...@gmail.com>
Creating an array

Hello, I am new to the forums. I have been learning Powershell in my spare time and it has been challenging to say the least. I have hit a small snag. I have written a script that will search a directory and all sub-directories contained within for .txt files. Once the .txt files have been found the script looks at the contents of the .txt files for a certain string. If the string is found within the .txt file it is copied to another directory. What I would like to do is create an array which contains all of the copied .txt files. I would like the contents of the array to b

2/21/2010 9:53:47 PM 5 toddh <gu...@unknown-email.com>
error loading xml file

hello, the $xml loaded the xml file and it did store the xml as a property, but it won't display on screen. i need some help navigate out of the dark many thanks PSH �� $xml = new xml PSH �� $xml.load("h:\windowspowershell\template.xml") PSH �� $xml format-default : Object reference not set to an instance of an object. + CategoryInfo : NotSpecified: (:) [format-default], NullReferenceException + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.FormatDefaultCommand

2/21/2010 12:28:35 PM 5 ryan <ryanl...@hotmail.com>
marvendas@gmail.com Kit completo de Solenoides ( solenoid ) + chicote Para Cambio automatico 01M hidramatico Audi A3 Vw Golf gti turbo 69293

Contato: marvendas@gmail.com marvendas @ gmail.com marvendas no gmail.com Kit completo de solenoides para Volkswagem e Audi. O kit contem: 5 solenoides 2 Epc ( solenoides de pressao ) 1 Chicote Serve para qualquer modelo VW ou Audi fabricados de 1995 ate hoje com o cambio automatico de 4 marchas � 01M Pre�o: R$ 1900.00 Temos outras tipos de solenoides e artigos importados, nao deixe de fazer uma consulta antes de comprar! Audi a3 automatico Audi a3 1.8 t automatico Audi a3 1.8 turbo automatico VW Golf gti automatico VW Golf 2.0 automatico VW Golf 1.8 turbo auto

2/20/2010 3:31:48 AM 0 kit solenoites audi solenoid.chicote<kit.solenoites.a...@solenoid.chicote.com>
Convertto-HTML appending more information

Hi Guys, Struggling to figure this one out, and it has been bugging me for a while. I have written a script which checks services, logs, event viewer entries, queues, etc and then writes the necessary results to screen. Works perfectly. I want to change this so it's written to a HTML file, but because I am not using just one command to perform this action and I want to add comments inbetween, such as server names I am having no joy in terms of formatting. Or I lose the comments, etc So doing one command in a loop and outputing the contents to HTML is no problem. Eg: foreach

2/19/2010 6:09:17 PM 2 djmulls <djmu...@gmail.com>
Copying files from the DMZ to Internal Domain

Hello, I am trying to write a script that saves a password as a secure string in a text file and calls the text file to pass the credentials to copy files. So far I ran the following command Read-Host -AsSecureString | ConvertFrom-SecureString | Out-File C: \PowerShell\MyPassword.txt However, from my readings, it seems like powershell does not let you pass credentials into the copy-item command. So I figured the only way to do this would be to pass variables into the net use command for both paths. So I created two text files with two encrypted passwords and wrote the following

2/19/2010 3:36:21 PM 1 "kjime...@gmail.com" <kjime...@gmail.com>
DESCARGAS - ANTIVIRUS GRATIS 7983

Muchos problemas de rendimiento y seguridad de tu computador son causados por virus maliciosos, la mejor forma de combatir esto es tener instalado un Antivirus reconocido y actualizado en tu computador Descarga gratis Antivirus en: http://antivirus-gratis-descarga.blogspot.com/ Links de contenido del sitio web: http://antivirus-gratis-descarga.blogspot.com/ http://antivirus-gratis-descarga.blogspot.com/2009/08/que-es-un-antivirus.html http://antivirus-gratis-descarga.blogspot.com/2009/08/descarga-gratuita-de-antivirus.html http://antivirus-gratis-descarga.blogspot.com/2009/0

2/18/2010 10:23:02 PM 0 =?Utf-8?B?YW50aXZpcnVzIGdyYXRpcw==?= <antivirusgra...@discussions.microsoft.com>
Problem with # followed by TAB

Is this documented anywhere? I don't remember seeing it. I am using Powershell 2 Type # at the powershell prompt and then press the TAB key a few times. You will see that as you press TAB the command line cycles backwards through the command history. I first noticed this when copying and pasting some lines from a script in notepad into the command line. Some of the line were commented out with a # but were also followed by TABs. The same effect resulted. The pasted lines ended up with the tabs being replaced by a command from the command history - which was very confusing

2/18/2010 12:34:39 PM 5 Whisperer <gu...@unknown-email.com>
Creating & comparing separate variables with contents of separate text files...

Hi everyone, I got my script to work with help I received from this group, thank you! :) Now I would like to streamline it a bit and would greatly appreciate some pointers. 1. My script looks for specific (text-) files in a folder, stores a backup copy in the folder above and then compares these "pairs" after a second script potentially altered the original file. I have tried to figure this out, but: if I did not want to store an actual file, but rather put the contents into a variable, how is this possible using the "foreach" construction? I played around with "foreach { $_ set-

2/18/2010 12:09:23 PM 2 Seb <canthandle...@spam.com>
How to find out to which computers is the user logged on to

How can i find out (using powershell) to which computers is one certain user logged on to?

2/18/2010 7:01:01 AM 0 =?Utf-8?B?RWVybyBK?= <Ee...@discussions.microsoft.com>
Need help to run a script from a web site

Hello Gurus I have this PS1 file, which takes 4 paramters and does couple of functions like telnet to a device and run some commands on that device The PS1 file takes, device IP as one of its paramter and credentials I want to pass these paraemters from a asp.net page but I CAN NOT find any example on how to do it, I have been binging and googling but most of the stuff is exchnage related could some one help on how to call a PS1 from C# code with n parameters Note: I have NO programming experience and just started to learn this stuff Thx a lot

2/18/2010 5:45:32 AM 5 masala <hassa...@gmail.com>
Jeffrey Snover and Bruce Payette - why aren't you here in microsoft.public.windows.powershell ?

Jeffrey Snover and Bruce Payette - why aren't you here in microsoft.public.windows.powershell ? - Larry

2/17/2010 5:22:42 PM 3 Larry__Weiss <...@airmail.net>
variable not working within exchange 2010 powershell

Hello, I`ve already asked a similair question which was solved through a different approach. My setup is as following: Windows 2k8r2 with exchange 2k10 and PowerShellPlus 3.0 installed. When i through the "Exchange management shell" do: [PS] D:\PowerShell Scripts>$companyname = "FTC" [PS] D:\PowerShell Scripts>$dc = "domaincontroller.domain.local" [PS] D:\PowerShell Scripts>new-globaladdresslist -name "$CompanyName GAL" -recipientFilter {(alias -ne $null -and custom attribute1 -eq $CompanyName)} -domaincontroller $DC i get the following output: Name

2/17/2010 11:56:01 AM 0 =?Utf-8?B?SGFucyBkZSBKb25naA==?= <HansdeJo...@discussions.microsoft.com>
How do I get an SQL server job failure message?

I am using the SQL server SMO to check for failed jobs (where LastRunOutcome is "Failed"). How can I get the error message associated with the job failure? Many Thanks, =Adrian=

2/17/2010 11:27:01 AM 7 =?Utf-8?B?QWRyaWFu?= <Adr...@discussions.microsoft.com>
Command runs fine on commandline, but not from PS1 - why?

Hi everyone, I am having some trouble understanding why some scripts can run fine from the command prompt but fail when executed from a PS1. The following line works great when I just type it in as I go: $myvar1 = Compare-Object $(gc "cue1.cue") $(gc "..\cueequal.cue") - IncludeEqual It compares the contents of two .cue files (which are basically renamed text files) and dumps whatever is equal or different into the new variable 'myvar1'. Now, the same thing executed form a PS1 that lies in the same folder as "cue1.cue" just does not work at all, $myvar1 remains emp

2/17/2010 9:05:42 AM 2 Seb <canthandle...@spam.com>
Exchange Powershell cmdlets from VB.NET

Hi, I want to run New-Mailbox but I get this: "The term 'New-Mailbox' is not recognized as the name of a cmdlet" This is when running on a machine with exchange 32 bit management tools installed. Here is my code: Imports System.DirectoryServices Imports System.Data Imports Microsoft.PowerShell Imports System.Collections.ObjectModel Imports System.Management.Automation Imports System.Management.Automation.Runspaces Imports System.IO Imports System.Text If txtUsername.Text.Length > 1 Then If UserExists(txtUsername.Text) Then Message

2/16/2010 11:22:01 PM 4 =?Utf-8?B?ZGFuandhbGtlcg==?= <danjwal...@discussions.microsoft.com>
Handling foreach ($item in $null)

Hello list, Let's assume that I have an XML file that looks like this: $toys =3D [xml] @" <toys> <toy name=3D"Jigsaw"> <minage>6</minage> <price>19.50</price> <comments> <comment>A very nice gift for all kids!</comment> </comments> </toy> <toy name=3D"Meccano"> <minage>7</minage> <price>14.50</price> <comments> <comment>I bought it for my son, but I was the one playing the most often!</comment> <comment>My daughter liked it, but it is more suited for children aged 9+</comment> </comments> </toy> </toys> "@ I h

2/16/2010 9:30:25 PM 0 =?UTF-8?B?RnLDqWTDqXJpYw==?= Perrin <frederic.per...@resel.fr>
pcnetsecurity@gmail.com =?UTF-8?B?QXNzaXN0w6puY2lhIFTDqWM=?= =?UTF-8?B?bmljYSAgbWFudXRlbsOnw6M=?= =?UTF-8?B?byBkZSBjb21wdXRhZG9y?= =?UTF-8?B?ZXMgaW5mb3JtYXRpY2Eg?= =?UTF-8?B?Vml0w7NyaWEtZXMgNDMzNzk=?=

Contato: pcnetsecurity@gmail.com Contato: pcnetsecurity @ gmail.com Planos a partir de R$ 250,00 . Assist�ncia T�cnica Prestamos assist�ncia t�cnica nos computadores de sua empresa ou resid�ncia, e tamb�m possu�mos uma equipe qualificada para fazer a manuten��o no pr�prio local. - Contratos de Suporte e Manuten��o Reduza os custos de sua empresa com solicita��es de visitas t�cnicas para seus computadores, elaboramos um contrato de manuten��o integrado para sua empresa onde disponibilizamos: t�cnicos, equipamentos de suporte e substitui��o, e atendimento no hor�rio comercial ou

2/16/2010 5:23:09 PM 0 Assitencia manutencao remocao de virus computador pc<manutencao.assiten...@computador.pc.com>
Create renamed copy of file in same directory

Hi everyone, this is my first post here and yes, I'm a powershell newbie. I could not find a solution to my problem online, and I am not getting my little command to work - perhaps someone here is kind enough to offer some advice. :) The task: say I have 3 .jpg files and one tmp-file in my folder c:\test\jpgs\ File 1: house.jpg.test.jpg File 2: roof.jpg.test.jpg File 3: bird.jpg.test.jpg TmpFile: somefile.jpg.test.tmp (please note that I am aware of .jpg showing up twice in each of the actual image files, but ideally I would want this script to only find the file extensions .jp

2/16/2010 4:06:56 PM 3 Seb <canthandle...@spam.com>
Move mailboxes via Powershell and Log results

Hi all, I created a script to move mailboxes and log the results. The script reads the alias from a text file and moves the mailbox. When completed it logs the result to a CSV file. I would like to modify the script to move 5 mailboxes at a time and log the results. I cannot seem to get it to work. Below is the working script which allows one to move at a time. How can I modify it to move 5 at a time AND to log the results to the CSV file. ############################################## $TargetDatabase = “SERVER01\SG03\MBX03” $SourceFile = “x:\MAILMOVES.TXT” $UserList =

2/16/2010 1:00:01 PM 6 =?Utf-8?B?RG9uIFBlZHJv?= <DonPe...@discussions.microsoft.com>
Adprep

What are the features that can be leveraged by just upgrading the AD Schema to Windows Server 2008 (without actualling installing w2k8 DCs)? What are the features that can be leveraged by just upgrading the AD Schema to Windows Server 2008R2 (without actualling installing w2k8 R2 DCs)??

2/16/2010 4:24:47 AM 1 "Cruz" <C...@live.com>
Change BG color in Wordpad instance

Greetings all, I have a powershell script which generates rich text file (.rtf) reports that contain a lot of detailed data which needs to be examined carefully over long periods. This could be done in greater comfort if the background color of the WordPad instance in which the report is displayed could be changed to black (or whatever color I choose) from the default white. # This paragraph is optional reading; skip if low on time or patience... In seeking a solution, I happened upon the help file for the Add-Type command (I'm using Powershell V2 (CTP3)) and found example 5 parti

2/16/2010 4:11:03 AM 0 "Zee Sirius" <z...@ukonline.co.uk>
Change BG color in Wordpad instance

Greetings all, I have a powershell script which generates rich text file (.rtf) reports that contain a lot of detailed data which needs to be examined carefully over long periods. This could be done in greater comfort if the background color of the WordPad instance in which the report is displayed could be changed to black (or whatever color I choose) from the default white. # This paragraph is optional reading; skip if low on time or patience... In seeking a solution, I happened upon the help file for the Add-Type command (I'm using Powershell V2 (CTP3)) and found example 5

2/16/2010 4:07:06 AM 0 "Zee Sirius" <z...@ukonline.co.uk>
PS on Win Vista vs Win 2003

Hi Guys. If i run the following command on win Vista Get-ChildItem 'D:\FTP\public' -recurse | Where-Object {$_.PSIsContainer -eq $True} | Where-Object {$_.GetFiles().Count -eq 0} Everything works 100% and it list about 10 empty folders If i run the same command on windows 2003 it does not work, is there a difference? and it list every single folder. Why is that?

2/15/2010 9:03:01 AM 1 =?Utf-8?B?dmFud3lrbQ==?= <vanw...@discussions.microsoft.com>
Domain Controller Names Only

I want to output the list of domain controllers names ONLY to a word document, how can we achieve this? Get-ADDomainController cmdlet provides lot of information of which i am only intrested in name attribute, how i can limit what attributes needs to be included in the output?

2/15/2010 7:14:22 AM 1 "kate" <k...@live.com>
look up who is connected

hello i would like to check if any pc connects to my xp box which it shares a lot of dirs. can powershell do the job and how?

2/14/2010 9:53:55 AM 2 ryan <ryanl...@hotmail.com>
function more

Consider PS C:> gc function:more param([string[]]$paths) $OutputEncoding = [System.Console]::OutputEncoding if($paths) { foreach ($file in $paths) { Get-Content $file | more.com } } else { $input | more.com } From an idea I got from http://app.en25.com/e/es.aspx?s=1403&e=1136&elq=b63283fe0ae246f08e2ac6506cf151bf to avoid the dependence on more.com this could have been coded to use Out-Host -Paging instead of more.com - Larry

2/14/2010 1:53:55 AM 5 Larry__Weiss <...@airmail.net>
Reliably Detecint OS Version.

Hi folks. Need some help. I have a mixed environment of Windows 2003 and 2008 32 and 64 bit servers here. Trying to run actions based on Windows version and architecture. Bear with me here, as I am still novice in powershell. So far I managed to get the OS name and architecture, but how can I clean the name and match it? I used: $ServerList = @($input) | %{$_.Split(" ")} Foreach ($Server in $ServerList) { $os=Get-WMIObject win32_operatingsystem -ComputerName $Server $architecture=$os.OSArchitecture $name=$os.Name } Now I want to do something like this. If 200

2/13/2010 5:31:58 AM 5 No Spam <nos...@nospam.nospam>

Pages: 2 3 4 5











Newest Articles

Upgrade? or not to upgrade.
4 min. 12 sec. ago

Word Error
4 min. 12 sec. ago

Help needed on Accounting Problem!
8 min. 30 sec. ago

Multi-Column Report
9 min. 40 sec. ago

addressing mail
11 min. 14 sec. ago