Web shop check with powershell
I have been asked by some guys at work if it is possible to log in to a web shop that one of our customers runs. Then purchase something for a very small amount check for success and then exit. Is...
View ArticleReply To: Querying Inner Text with Multiple Attributes
hi, I have a stupid question. Why not use something like this (XML dot notation): $PY.LOAD_PAYABLE_005.DATAAREA.LOAD_PAYABLE.PAYLINE $PY.LOAD_PAYABLE_005.DATAAREA.LOAD_PAYABLE.PAYHEADER.ORIGREF Cheers...
View ArticleReply To: PowerShell Web Access – Connectivity Issues
Ahhhh.. Hadn’t noticed that. I have now acquired and will be looking into it. Thanks!
View ArticleReply To: Web shop check with powershell
It depends on what you want to test. If you want to test that the HTTP POST requests are handled correctly you could just use the Invoke-WebRequest cmdlet (or WebClient or HttpWebRequest classes, if...
View ArticleReply To: Rename-Computer error
Is the name of the remote computer actually “computer”, have you replaced it before posting or have you provided the wrong computer name to the Cmdlet?
View ArticleReply To: Rename-Computer error
You need admin level access to rename the computer. Do your credentials supply the correct level of access. Can you post the code you are using?
View ArticleReply To: Rename-Computer error
I’m using the command Rename-Computer -ComputerName ret-hurt -NewName retline-3 -DomainCredential domain\admin I’m using domain admin credentials Thanks for your help!
View Articleparse result of disk space
how can i go over each row in the result and get the drive name and the “FreeSpace(GB)”? Get-WmiObject Win32_LogicalDisk -filter "DriveType=3" -computer (Get-Content .\Servers.txt) | Select...
View ArticleReply To: parse result of disk space
AS it stands your code outputs: Drive Letter (Deviceid) Disk Size in GB Free Space in GB for each hard disk on each machine in your servers.txt file. If you only want free space then remove the...
View ArticleAttach and send HTML file
Hi Guys, I am trying to get an HTML file attached and e-mailed to myself. I run a weekly script that gets and e-mails the Replication status and FSMO Roles of the Domain Controllers on the network....
View ArticleReply To: Attach and send HTML file
Looks like you’ve redefined your $FSMORoles variable several times in the code. At first, it contains a file path suitable to be passed to the -Attachments parameter of Send-MailMessage, but later on,...
View ArticleReply To: parse result of disk space
One of the best things about PowerShell is that you almost never have to “parse” anything. Get-WmiObject gives you rich objects with strongly-typed data. Select-Object and Out-GridView (in your code)...
View ArticleReply To: DSC Observations
Not yet, unless it was already included in the MSDN ISOs I downloaded (which seems unlikely, since it’s not a Service Pack.) Is there something in the rollup that’s specific to DSC?
View ArticleReply To: DSC Observations
Yeah. It’s what allows it to find the MOF file ;). They changed the folder structure for GA. The MSDN builds need the hotfix.
View ArticleReply To: Rename-Computer error
According to you initial post you can connect to the remote computer using Get-WmiObject – that means you have a DCOM connection When you ping the remote machine – is it by IP address or name?
View ArticleReply To: parse result of disk space
If you are working with remote machines across the network – filter as soon as you can – preferably on the remote machine to minimise your network traffic. Only two machines to work with – you won’t...
View ArticleReply To: DSC Observations
Cool, I’ll try installing the patch later today and see how it affects the behavior on both servers. Edit: BTW, do you know if there’s an equivalent patch for WMF 4.0 on computers running an OS older...
View ArticleReply To: Attach and send HTML file
Thanks a mill, The issue has been resolved, The variable should have been: $FSMORoles=netdom query FSMO > E:\Software\ReplicationScripts\FSMORoles.txt Instead of: $FSMORoles=netdom query FSMORoles...
View Article