|
Powershell for moving exchange mailboxes in bulk
I found a beautiful script http://www.exchangeninjas.com/MoveMBsToTargetMD
to move mailboxes in an Exchange 2007 organization using a .csv file for
input. I would like to do the same thing, but move these mailboxes from one
Exchange organization (2003) to another Exchange organization (2007). The
regular command to do this from a command line looks like this:
move-mailbox -TargetDatab...
|
10 |
29.06.2007 00:36:07 |
|
Newbie Question - Uses for PowerShell
Hello,
I'm a complete newbie to PowerShell, but have an occasional need for
scripting. I have 2 questions:
(1) Today one of the developers that I work with told me it was going to
replace VB and Perl. Is there any truth to this?
(2) I have a folder containing about 30 XML files. Occasionally I need to
run some kind of a global find and replace where specific text is found and
re...
|
12 |
29.06.2007 00:20:15 |
|
Vista Ultimate Powershell Installation Problems
Hello;
I tried to install Windows Powershell and, when trying to run the installer,
was prompted with the error "This update does not apply to your system."
I'm using Windows Vista Ultimate and do no understand why this error would
pop up during installation. Also, I tried to download and install the dot
net framework but was told, by Windows, that it is already a part of my
system.
...
|
2 |
28.06.2007 21:31:35 |
|
create a class in a PowerShell script
can you create a class with properties in a powershell script?
i want to create a class in a ps1 file, and have some of my functions have
their output be that class.
Can't find any reference to such a thing anywhere....
|
6 |
28.06.2007 18:36:18 |
|
Powershell for test scripts2
Sorry for the re-post, i accidentally hit solved on the last one.
Set w1 = Sys.Process("Iexplore").Window("IEFrame",
"*").Window("TabWindowClass", "*").Window("Shell DocObject
View").Window("Internet Explorer_Server")
Call w1.toURL etc. etc.
Is something like this possible in Powershell?...
|
5 |
28.06.2007 18:30:19 |
|
PATHEXT environment variable and PS1 scripts
Hello:
The PATHEXT environment variable in PowerShell does not include .PS1 in the
list, yet you can still run PowerShell scripts without typing the .PS1
extension on script files. I assume PowerShell ignores PATHEXT?
Is there a way to force the user to enter the full name of a PowerShell
script, including the extension, when running a script?
The benefit is that the user will know...
|
9 |
28.06.2007 18:03:03 |
|
Escape comma in dos command from PS script
I'm trying to execute a sql BCP call from within a Powershell script
and am running into a problem.
The line of code looks like:
bcp "SELECT * FROM Clinton08..Customer" queryout "D:\SQL Data\Exports
\Data.csv" -c -t, -k -T
The problem lies in the -t, which sets the field terminator as a
comma. Powershell treats this as if it was an array separator and not
a comma. Any thoughts on how ...
|
3 |
28.06.2007 15:37:16 |
|
PowerShell Community Extensions 1.1.1 Released
PSCX 1.1.1 addresses many of the issues that 1.1 users have submitted since
its release. There are about 30 defect fixes in 1.1.1 along with a handful
of new features including a -PageSize parameter for the Get-ADObject cmdlet.
There is also a new elevate function (alias su) that allows you to easily
execute an app or command with elevated privilege on Vista. You can read
more about 1.1...
|
3 |
28.06.2007 15:22:52 |
|
Multi-line text becomes a one-liner
Hi,
I want to update some lines in a text file. I can 'cat' the file but when I
pass the contents of the file to a function the multi-line content suddenly
becomes a one-liner. How can I prevent the removal of all newline characters?
<code>
function update_text ( [string]$MYNFC ) {
$MYNFC
}
# Get contents of a multiline file
$NFC = cat c:\temp\test.txt
"Original contents ...
|
2 |
28.06.2007 14:29:02 |
|
PowerTab request to Microsoft
Suggestion: Microsoft should just buy PowerTab from /\/\o\/\/ to compensate
him for all his development time. It's just too good of a feature to not
have installed by default. He also adds a lot to the community besides
PowerTab, so I hope Microsoft buys it from him instead of developing it
in-house. If Microsoft wanted to put him on retainer or pay him hourly to
do updates afterwards...
|
4 |
28.06.2007 14:13:17 |
|
PowerShell for Log Parsing (stupid newby Q)
I'd like to create a .ps1 script to remotely (against a server) get
all System Log events that meet a specifc criteria, and dump them in
a .csv or .txt, or .log file. I understand somehow I'm going to need
to use this nebulous
get-wmiobject
command to do this, but the learning curve seems more difficult than
I'm up to. What's all this "class" and "namespace", etc parameters?
How do I ...
|
3 |
28.06.2007 13:30:58 |
|
Confused about Microsoft.PowerShell_ profile.ps1
This is a multi-part message in MIME format.
------=_NextPart_000_0021_01C7B88C.F8F5F7B0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
I'm not a power user of PowerShell but just discovered something =
happening on startup that surprises me.
When PowerShell starts it first runs profile.ps1 which (on XP) is in =
MyDocuments/WindowsPowerShe...
|
4 |
28.06.2007 11:00:40 |
|
Problem creating private functions
I have a problem with private helper functions I did make within an other
function (in TabExpansion function)
I need to retrieve the available functions in the TabExpansion function, but
the helper functions declared in the TabExpansion function are also listed
becouse they where loaded when the function did run, as the helper functions
are gone again after the function exits, they are ...
|
6 |
28.06.2007 08:44:04 |
|
Simple doubt
I want to open http://servername:2381 using powershell.
$servername=$args
#$colon=':'
#$port=2381
$fullpath=$servername+$colon+$port
$oIE=new-object -com internetexplorer.application
$oIE.navigate2("https://$fullpath")
$oIE.Visible=$true
But this doesn't work, it takes spaces...Need simple advice to achieve
it.
Thank you for your kind advice.
Preetam
...
|
4 |
28.06.2007 08:18:47 |
|
How to access GPO with PowerShell?
Anyway to modify GPO settings with PS?
...
|
7 |
28.06.2007 02:40:18 |
|
Using SecureString objects
I'd like to use the SecureString feature of read-host to be able to
treat passwords entered on the command-line with more umm, respect.
However, I'm running into a problem using the created object
(SecureString class) and passing the value as input to a COM object.
I _think_ this is by design, and I see references perhaps to how to
enable this in MSDN, but the C# etc. stuff is over my head. ...
|
6 |
28.06.2007 01:59:28 |
|
New-Item and suppressing output
I have a script that does the following:
if ($HostBUDir -eq '') {
$HostBUDir = $HostDir + "\" + $BackupDir
if (-not (Test-Path $HostBUDir) ) {
"Creating directory $BackupDir ..."
New-Item -Path "$HostBUDir" -Type directory
}
}
.... more stuff
When I run the script I get output that is a directory listing for the
directory I just created. Can I suppress this?
...
|
3 |
27.06.2007 21:08:02 |
|
Powershell for test scripts
Hi I am new to powershell, and I am new to vbscript. I would like to know
how easy it is to convert some vbscript into a script writen in powershell
for a test script. Also, where I could find more information on the matter....
|
5 |
27.06.2007 20:56:03 |
|
Last logon user
How can you tell (with WMI) who the last logged on user was?
I cant find it listed.
Thanks...
|
3 |
27.06.2007 16:16:01 |
|
Email Notification Script
Folks:
I am looking for a script that would ALARM (make a distinct audio noise like
the ringing of a telephone) either when new emails arrive from a certain
source or maybe when new emails are found in a specific filtered folder. As
a backup, it would be good if the script can also send out popup screens in
addition to the audio. I am using Microsoft Outlook Express as my email
platform....
|
14 |
27.06.2007 13:26:22 |
|
Collecting a list of Services
What I am trying to do is create a list of services that are set to
automatic and are stopped. I have collected several scripts to lists the
services but can not find the way to get the Startup Type and then filter it
in the script.
I have the following...
Stopped Services
get-service | where-object {$_.Status -eq "Stopped"} | sort DisplayName
Running Services
Get-Service | Where-Ob...
|
3 |
27.06.2007 12:29:55 |
|
windows mobile provider idea
I thought it would be a great idea for someone (with actual skill to
do this, unlike me) to create a Windows Mobile provider for
Powershell. For those that don't have a WinMo PDA or phone, let me
give you a little background.
Right now, there is only one way to access the files on your PDA and
that's through a special Mobile Device object exposed in Explorer
under My Computer. You can do...
|
17 |
27.06.2007 12:00:51 |
|
verb selection again
Ok, I have to know which of these documents is correct:
http://www.microsoft.com/technet/scriptcenter/topics/winpsh/cmdline_std.mspx#EWHAC
http://msdn2.microsoft.com/en-us/library/ms714428.aspx
I'm writing some functions now where the action is to connect or login
to a remote server object. The first document says that "connect" is
obsoleted, but the second seems to recommend it. (Tec...
|
6 |
27.06.2007 11:59:13 |
|
how to know who is using a file
Is it possible to know who is using a specific file at the moment the
script is running with powershell ?
by example :
> WhoIsUsingThisFile \\server1\directoryname\file
--> it is the user named domain\toto
>
bye
Nico
...
|
2 |
27.06.2007 11:49:19 |
|
win32reg_addremoveprograms invalid class error
On page 422 of Bruce Payette's book "Windows PowerShell in Action"
Bruce says the following script will list the software installed on a
computer system.
get-wmiobject -class "Win32reg_addremoveprograms" `
- namespace "root\cimv2" | select-object -property Displayname,
Installdate
However, this script produces an invalid class error. Other users of
the Manning forum for Bruce's book h...
|
8 |
27.06.2007 09:58:02 |