Problem with WinHttpRequestOption_SslErrorIgnoreFlags of COM Object...
Hi, I have problems writing a powershell script that will validate a https website. To make the script use the object WinHttp.WinHttpRequest.5.1. I need to define the...
View ArticleDetect get-adcomputer returns no results
I have a script that uses get-adcomputer to search AD for computer accounts and i'd like to be able to detect when it doesnt return any accounts. Right now even if it doesnt find any thing it still...
View ArticleWhere does powershell saves the set-executionpolicy setting?
I'm building some servers and need to run some powershell scripts on them. However, I need to run the command Set-ExecutionPolicy -ExecutionPolicy remotesigned -Force manually on every server. Because...
View ArticleInvoke-Command -ComputerName
Hey, Together with the issue in this post: http://powershell.com/cs/forums/t/10792.aspx,I try to remotely flush and register DNS like the following since my script changes DNS settings;...
View ArticleDifferences between v2 and v3
Hi, I'm brand new to PowerShell and I've just purchased the Month of Lunches for v2 (timing!), and I'm also considering the CBT Nuggets PowerShell 3 Foundations course. Would I be better off doing...
View ArticleHow to do a -like comparison with multiple things on the right side?
Am I forced to have a "x -like y1" -or "x -like y2" (and so on for all y's) or can I have a "smarter" "-x -like (y1 -or y2 -or ...)"? What I'm trying to do is use Get-WMIObject -Class...
View ArticleFrom (C#)ExpandoObject/ HashTable to PSObject
I wrote a C# DLL that I've imported into PowerShell via assembly. I'm working with dynamic objects inside my DLL and eventually return these in a PowerShell environment.The problem with these...
View ArticleInvoke-WmiMethod call weird behaviour
Hey again^^ In relation to my latest project/venture, I'm trying to update DNSs, DNSSuffixSearchOrders, set DNSDomain and such remotely. I'm struggling with two things, the other one I'll put in...
View ArticleI have bitten off more than I can chew and can't see the forest for the...
I have written the following script but each fix I do breaks 2 other things. For instance I am loading variable data to an .xlsx and it errored that the object was not a string. So I added .ToString...
View Articletrying to add a tab to a string line for an Out-file
Hello again guys! I have a hash table and are trying to put a tab space for all my lines for formatting with out-file. I tried putting the `t but it does not work. Here is the script for just the lines...
View Articlepsremoting with windows 7 home premium
Hello, I try to make a New-Pssession between 2 computer with Windows 7 Home Premium but it doesn't work. Is the feature blocked for the home version? PS WSMan:\localhost\Client> winrm.cmd...
View Articledelete a specific files from the harddisk
hi everyone I'm new to powershell and network administrator in our company we have a virus that is spreading in our computers and no antivirus can stop it I usually delete the file using powershell but...
View ArticleSpeeding up searching for eventlog entries
Hello. My application log contains more than 50000 entries, and searching for once defined source, if there aren't entries from that source, takes about 60 seconds. I'm using PS for monitoring...
View ArticleCleaning up corrupted profiles in Windows 2008 R2
I am building a script for us to run on a monthly basis that will search the ProfileList key in the Registry for .Bak at the end of the users SID, and when found, then delete the key. There are a few...
View ArticleCreating a MAPI profile with powershell?
Hi all Is it possible to create a MAPI profile with powershell - what I basically need to do is programmatically connect to a mailbox to remove some hidden messages stored within it? I am pretty sure...
View ArticleHaving Trouble with Remote WMI and Win32_PrintJob no errors and also no info...
I am trying to use WMI to get the print jobs from a remote computer using WMI. Both computers are running Windows 7. If I pause a printer on the local system and then send some print jobs to one of...
View ArticleAdding users to a group based on custom attributes
Team, Have an intresting script i am trying to develop and need guidance. I am trying to automate distribution group membership using custom attributes. Currently i am able to add users to a group...
View ArticleSetting power plan after import with PowerShell
I am in the process of writing a script to configure a number of settings on Conference Room PC's. Using powercfg.exe I am able to import the correct power scheme. The problem I am having it with...
View ArticleHow To Stop Windows Services Using Result From XML File
Hi, I'm trying to parse xml files in a directory with the following script. For example, in the xml i have data that looks like the following called service.xml displayName="blahblahblah"...
View ArticleStill waiting for my limited edition (handsigned) copy of powershell V3 lunches
Don, sorry to bother you with this but maybe you have some answers? On august 1st I ordered and paypalled for the "PowerShell in a Month of Lunches" Limited Edition 2 Book Lunch SetItem# LUNCHPAK,...
View Article