Backup before overwriting
Hi! I'm trying to create a script that copies files to a file system, but before overwriting any file, it first should save it in a backup folder. I started trying with "Compare-Object", but found...
View Articlefind Joe's 2004 2005 2006 2007 income tax file
find Joe's 2004 2005 2006 2007 income tax file
View ArticleDynamically populate powershell switch statement
Hi,I need help dynamically creating switch statement selections.I can do this OK.$ar = "RED","GREEN"$ANS = (Read-Host "Choose from these $ar") Choose from options RED GREEN: RED $ANS RED switch...
View ArticleHow to compare int32 values (ranges) for overlaps
Wonder it someone could answer this for me. How I can compare all results in ConvertTo-DecimalIP (note there will be 000's to see if any of the int32 values would be in each of the ranges. Note each...
View Articleset two variables from single prompt
I am trying to write a script which will provide a single prompt and as a result provide multiple variables. For example I would like to prompt the user to enter their email address and from that input...
View ArticleHelp with string functions
I'm trying to figure out how to change how the table insert works. Right now, it's just populating 2 columns. I would like to break up the first column into several columns using substring or...
View ArticleDesired State Configuration Custom Resources
After reading this article http://blogs.msdn.com/b/powershell/archive/2014/01/03/10469575.aspx I downloaded the attachment and created my first custom...
View Articleneed to export OD and its Sub-OU info in excel format
Hi,I m using win2008R2 in my organization,we have multipli OU's in AD and inside that OU we have multiple sub-OU's, i want to export all the information of those OU's (for eg:- how many users and...
View ArticleGetting detailed user account status in Active Directory
Hi,I have a script which I use to get the status of an account in Active Directory. This value is collected as follows:$status = Get-ADUser -Filter 'samaccountname -like $username'...
View ArticlePowershell Overview
Hi all,Iam new to windows powershell.I need to learn basic commands using powershell.Please suggest some important urls.Regards,Praveen
View ArticlePowerShell Studio
Is there any other product like Powershell studio in the market?Please suggestAbraham ----------------------------- Knowledge is Power
View ArticlePsSession and empty pipe element
I am wondering if this is by design or not.Writing a script to format disks remotely by using a PsSession. Of course, I first try the script locally without a PsSession: Get-Disk | Where...
View Article30 day inactive AD user account & computer report using Powershell
Hello all, I am a newbie to Powershell and would greatly appreciate it if someone can tell me how to run a report listing all user accounts & computers that's been inactive for the last 30 days.
View ArticleSearch through group members one at a time?
I currently have a script that searches through group memberships using "get-adgroupmember" to see if a group contains a user object, and if so, the script performs an action. However,...
View ArticleInvoking Powershell modules on remote clients via package/command line
Hello Everyone - I have two modules(functions) that i've written and tested successfully locally in my environment that give me Uninstall and Repair functionality on whatever the string contains. Both...
View ArticlePowershell to keep track of process
Hi All,How can we use pwoershell to track of process for example(explorer.exe)if process(explorer.exe) is not present it should wait till the process appears and then sleeps for a minute and then exits...
View ArticleFastest way to search through root domain for user objects present in groups?
Hello all. New to PowerShell here, and wanting to be sure my script below is optimized as far as efficiency and speed. I've been searching around the Internet to teach myself various PS components, and...
View ArticleIssues with Powershell WMI - CIM_DataFile
When running VBscript and accessing the AccessMask propert I get a value of 2032127 consistently. When I run powershell script using WMI CIM_DataFile, the first run I get the value of 2032127, but on...
View ArticleHelp with for loop and remove-item command
Hi all here is the code so far$a = Get-Content C:\Users\cody-horton\Desktop\test.txt for($i=0;$i -lt $a.Length;$i++){ #$temp = [int32]::Parse($a[$i]) Remove-Item '\\ceit2551202x0'$a[$i]'\C$\Program...
View ArticleGenerate a hidden password
Hi,I need to create a script that creates a zip file and creates a password on the zip file. Because each zip file needs a different password I need a reliable way to create the password but a way to...
View Article