|
web site deployment issue
Hello everyone,
I am deploying an ASP.Net web site, and there are related configurations,
pages and binaries. There is also a related application pool related to this
web site.
My question is, what is the graceful way to upgrade to an existing such type
of web site? Drop the previous web site and install a new one? Any documetns
or samples to make reference about how to write scripts...
|
3 |
12/17/2008 1:46:04 PM |
|
Automating IE with WASP or AutoIT
Hi,
I'm keen to use Powershell to automate IE, probably with either WASP
or AutoIT.
So far, with WASP I can enumerate the windows and their controls, get
their handles,classes etc.
But now I'm stuck, I can activate the relevant window but how do I
activate the appropriate control on that window in order to use send-
keys? Eg if I activate IE at www.google.com and see the following
cont...
|
2 |
12/17/2008 1:25:12 PM |
|
Get-Service in Powershell
Hi,
New to Powershell - I have a VBScript that does goes out to our 3000 list of
servers and checks for a specific service to get back the ANem, state
(running, stopped etc) anf status (automatic, disabled etc).
i have tried to do it in Powershell but am constantly getting stuck - can
someone please assist. I have a bit of the main code below:
get-service | where-object {$_.status ...
|
5 |
12/17/2008 9:05:01 AM |
|
Help with a PS Script
Hi guys/girls ,
I am getting bit desperate because i don´t know how to do this part
of my script.
Any help will be very appreciate ,
I want to compare two *.txt files . the txt files are very simple ,
they have a name in each line .
For example : file1.txt has PETER and OSCAR ( using two lines )
file2.txt has PETER and MARIA (using two lines)
What I want t...
|
10 |
12/17/2008 7:06:19 AM |
|
Automating IE with WASP or AutoIT
Hi,
I'd really appreciate some help with automating IE with either WASP or
AutoIT (as a com object).
With WASP I can ( so far ):-
[1] Reliably retrieve the IE Window handle and activate it.
[2] Enumerate the controls Eg for Google.com :-
Handle Title
------ -----
2622466
3802162
2688236
5113172 Navigation Bar
1180754 Google - Windows I.
3278158 ITBarHost
Now, I ...
|
1 |
12/16/2008 11:36:55 PM |
|
Get unique field from Active Directory.
Hi!
I am working on a PowerShell script that will read different fields from our
Active Directory. So far I have managed to get everything I want, except for
one thing, a unique identifier.
I thought I would use the GUID as a unique identifier in the system I will
import the data to. Problem is the system I will import to have a limit of 25
characters for it's unique identifier.
O...
|
4 |
12/16/2008 5:06:07 PM |
|
Inherent *problem* in AD / qet-qadcomputer
Just want to share my findings.
Create a few computer objects in your AD and name it as follows:
pc00
pc002
pc003
pc004
Do a dsa.msc search for pc00 and it will list pc002,003,004 as well. I then
apply get-qadcomputer pc00 and get the same results lists.
$computername = "pc00"
I panic when i do a get-qadcomputer $computername | set-qadobject <etc etc>
and it changes all t...
|
2 |
12/16/2008 12:46:50 PM |
|
Need data only - no Object header
Hi, I'm trying to generate a txt file (EmptyG1.txt) with selective mailbox
accounts only.
This works well so far but the output format isn't as I need it.
---------------------
$G1Path = "E:\Temp\SEC\EmptyG1.txt"
$FileExist = test-path $G1Path
if ($FileExist -eq $True) {Remove-item $G1Path} ## File checking and
overwrite if exist ##
$AllTargetMBX = get-Mailbox g1secg* | select-objec...
|
2 |
12/16/2008 12:07:54 PM |
|
repadmin /replsingleobject doesn't work from Powershell
Hi all-
I'm using repadmin to replicate (push) a single AD object across my
domain. The command I'm using is:
repadmin.exe /replsingleobj destDCname b51c7e53-cfba-4d26-
bed5-85c3eaffd03b
dc=serverName,dc=my.domain.com,CN=MicrosoftDNS,CN=System,dc=my,dc=domain,dc=com
The Guid is the guid of my source DC. The command runs fine from a dos
prompt and syncs as expected.
When I run it from...
|
5 |
12/16/2008 5:46:13 AM |
|
Big PowerScripting Podcast show this Thursday
Coming up on the PowerScripting Live show this Thursday will be Jeffrey Snover,
the architect for PowerShell as I’m sure you all know, and he’ll be accompanied
by none other than Bruce Payette, author of PowerShell in Action and a core
developer on the PowerShell team.
We’re excited and we hope you can make it this Thursday at 9pm EST!
The live stream address is http://www.ustream.tv/c...
|
1 |
12/15/2008 7:16:41 PM |
|
Prompt - [WP]
The following script keeps prompting for confirmation. Anyone know how to
remove the confirmation when the script runs?
The script reconnects a mailbox in bulk:
$group = Get-Group 'exchange'
$groupmembers = $group.get_members()
$mailusers = Get-CASMailbox | Get-User
Compare-Object $mailusers $groupmembers -PassThru:$True | foreach {
Get-MailboxStatistics | Where {$_.DisconnectDate ...
|
14 |
12/15/2008 6:13:01 PM |
|
Disable and Enable Devices
How can I get a list of my local computer devices?
How can I enable or disable them?
Thanks!!
--
Aerofan...
|
5 |
12/15/2008 12:16:54 AM |
|
Help with syntax
I am using IZarc. It is like Winrar or Winzip. I am using the command
line executable to help me unzip (extract) files on my server.
In powershell, using the command prompt, this works, assuming I have
navigated to the root of IZarc (c:\program files\izarc).
.\IZARCE -d 'c:\Documents and Settings\Me\My
Documents\Downloads\TestFile.zip' -o
If I want to be able to unzip to a target directo...
|
5 |
12/14/2008 2:23:17 AM |
|
Read a line from a text file, without loading the entire file in memory
I'm currently updating a function to generate password
function create-password {
$leet = @{e=3;o=0;l=1;a=4;i='!';t=7}
$paddingchars = "abcdefghijklmnopqrstuvwxyz01234567890".ToCharArray
()
$spec = "!@#*-+$%^".ToCharArray()
$rand = new-object System.Random
if ($args[0]) { $word = $args[0] } else { $words = import-csv
dic2.csv
$word = ($words[$rand.Next(0,$words.Count)]).Word...
|
9 |
12/13/2008 4:55:09 PM |
|
Using old tool from the PowerShell prompt
I would like to setup a Windows2003R2 cluster using PowerShell.
In order to do this I would like to execute the command below, however I
can't seem to find a syntax that is both compatible with PowerShell and
Cluster.exe:
Cluster.exe resource "Quorum Disk" /create /group:"Cluster Group"
/Type:"Physical Disk" /priv Drive="Q:":String
Any suggestions?
Regards,
Jakob Bindslet, Denmark...
|
3 |
12/13/2008 10:11:16 AM |
|
Accessing powershell cmdlet via rsh
Hi All,
I am facing a problem while accessing the powershell command from rsh.
e.g from my server if I type the command 'rsh <servername> dir '
I am getting the ouput on the console
But when i try , rsh <servername> powershell get-executionpolicy'
Then it seems that the control is hanging.
Surprisingly when i press Ctrl+c , then the control comes out and also
displays the outpu...
|
3 |
12/13/2008 3:27:43 AM |
|
Automation of the Windows Home Server?
Mmm perhaps getting a
Windows Home Server soon?
Perhaps one doesn't even know what it is?
Introducing Windows Home Server
http://www.microsoft.com/windows/products/winfamily/windowshomeserver/default.mspx
Home Server Checklist
http://blogs.technet.com/homeserver/archive/2008/12/08/home-server-checklist.aspx
How many hard drives do you have in your home server?
http://blogs.techne...
|
1 |
12/12/2008 9:31:58 PM |
|
After Exchange Rollup 5 install I get this error.
When trying to run Powershell with the Exchange snapin inside managed
code, I get the following where it ran fine before the "upgrade".
"The type initializer for
'Microsoft.Exchange.Management.RecipientTasks.GetMailbox' threw an
exception."
"source is System.Management.Automation"
"pipeline error = System.Management.Automation.Internal.ObjectReader"
"Pipeline Base Exception = System.Ty...
|
5 |
12/12/2008 8:44:54 PM |
|
Need to get tricky with textfiles - banging my head repeatedly
I’m pretty excited about PowerShell, but I’m finding text file work
kind of tough.
It seems this would end up a pretty compact script but I could really
use some help –
Anybody have any thoughts?
I start out with one-to-many source files - SplitMe1.txt,
SplitMe2.txt ....
that look like this:
VLSHP5NMSH73E38H20605420081127A01386882 SS TEAKETTLE
2098448 VLSHP5NMSG73D88H21314120081127A01...
|
7 |
12/12/2008 8:35:55 PM |
|
Debug into PowerShell code
Are the symbols available for v1.0 of PowerShell to allow stepping into the
PowerShell code? I'm having a problem where the pipeline is transitioning to
stopped in the middle of a call to WriteError or ThrowTerminatingException
and I don't know why. If I could step into PowerShell I could figure out why
this is happening.
Thanks,
David...
|
7 |
12/11/2008 11:15:11 PM |
|
Remote registry key recurse in powershell
Hi,
I am trying to recurse through a remote registry key path and search
through it for a value name and get the value data .Hence i need to give
it atleast a subkey to start from so as to avoid searching time delay
through many nodes.
$regpath = \\"HKLM:\System\CurrentControlSet\\"
$keys= @(*Get-Item*$regpath--ErrorAction-SilentlyContinue) *`*
+ @(*Get-ChildItem*--recurse-$regpath--ErrorAction-S...
|
3 |
12/11/2008 11:14:42 PM |
|
Finding a global catalog
I'm relatively new to digging into MSDN and figuring out from there how
to do something in PowerShell (I got the basics down I think), but what
I need to do is find an Active Directory global catalog server. I've
found System.DirectoryServices.ActiveDirectory in MSDN and I've figured
out how to find a domain controller:
[System.DirectoryServices.ActiveDirectory.Domain]::getcurrentdoma...
|
5 |
12/11/2008 8:19:04 PM |
|
Domain DFS query
For some reason I cannot remotely query domain dfs with the command
gwmi win32_dfsnode -computer <name>
Locally on the Domain Controller this command works.
Anyone any ideas on how to make this work remotely?
Any help will be appreciated.
Thanks.
...
|
3 |
12/11/2008 7:31:00 PM |
|
A bug is fixed, how do I find out what changed
I got a notice that a bug I reported has changed status.
It's title is:
Object type info doesn't work with '-is' operator
Status is now Closed and Resolution is Fixed.
There are several ways they could have resolved this.
Is there any place I can look that gives a description of what changed?...
|
2 |
12/11/2008 6:15:56 PM |
|
how to with regex split into tokens
Hi,
If I have a string in which I want to split into tokens, what is the best
method or regex to split this into 3 variables:
"test, stringtest","domain\test","test , test2"
In essence, I wish to split into tokens in between the quotes which are
separated by commas but within the tokens may contain commas.
$one = "test, stringtest"
$two = "domain\test"
$thre = "test , test2"
T...
|
4 |
12/11/2008 5:10:38 PM |