[datetime]::ParseExact questions
So, i'm working with importing a csv file and the format of the one of the columns is 08/15/2013 11:00 So, I am just trying a few things with no success.. Format of column is 8/15/2013 8:38First, I...
View ArticleHow to exclude an OU during a search?
I have this code that works to move old computer accounts to an inactive OU. $Inactive_computer_OU = 'OU=InactiveComputers,DC=Acme,DC=com'$sourceOU =...
View ArticleMake `n to create a new line for redirected output
HelloI have a string as below:$String = "Test1`nTest2"While printing to screen, I have 2 lines. But on redirection I get one line.Code: $String >> Log.logOutput for Log.log: Test1Test2How can I...
View ArticleSystem.Object[] as value in CSV
Hi all, i have this:Invoke-Command -ComputerName $i.computer -ScriptBlock { Get-Eventlog -LogName system | Where-Object {$_.EventID -eq "6008"} } if i write it out...
View ArticleConnect PowerShell to Oracle 7.3
I need to connect from PowerShell V2 or V3 to an old Oracle DB V7.3.Can I do this and what do I need?Thank You!!--Goo
View ArticleRun a PowerShell Command as a different user not the script
I am building a GUI to get-GPResulantSetOfPolicyI want to open the GUI as myself but run the following command as a User Account that is in the Domain Admins group. Here is my cmd for getting the...
View ArticleCompare Properties of an MP3
HelloI'm new to powershell, and I'm looking for an way to automate the following.I have 2 folders with mp3s (Folder1: "C:\MP3WithComments") and (Folder2:"C:\MP3WithoutComments"). As you can probably...
View Articleview remote and locatin 32bit performance counter
i have third party 32 application installed win 2008 R2 64bit.. when I run below command to see counters I get an error saying cann't find any performance counter sets..Get-Counter -ListSet es1* |...
View ArticleError "Split-Path : Cannot bind argument to parameter 'Path' because it is...
Hello,In C:\Users\Powershell folder, I a a script as ZZZ_Test. This script writes script's directory as below:$MyDirectory = (Split-Path $script:MyInvocation.MyCommand.Path) + "\""---> " +...
View ArticleReplace output csv from commas to zero
I have a script that outputs csv with number of user per app122,22,3,4,6Then it imported into sql table which works If the output csv contains commas instead of a number if fails because the sql table...
View ArticleGet IE Settings?
On a Windows 7 workstation if you go into Control Panel there is of course the Internet Options Icon. If you double click on this icon you see all sorts of Internet Explorer information. Using...
View ArticleParam cmdletbinding() full parameters list
Hi,Can anyone please give me the list of parameters in param, After we specify cmdletbinding(). As of now, I know only 4 parameters. please have a look at the below example.[CmdletBinding()]Param(...
View ArticleExecuting (calling) powershell commands through Control-M
Hello,I am new to usage of powershell. I am trying to execute (call) a powershell script through the BMC Control-M batch processing program via a Command Line.The command I am using is: powershell...
View Articlecheck for service installed & get status, output report, almost there I think?
Howdy,I have been trying to get a script working to check for a single service and I'm getting stuck. I have the script below which does get all services and I'm not far off, but I'm not sure how to...
View Articlereplacing file path
Hi, I am new to PowerShell.I have a .confi (XML) file in UTF-16 unicode with over 100 lines. I need to find replace the some tags where file path is incorrect. I am able to find the file path store it...
View ArticleLogging user/machine and session information
Hi all,Firstly, I just wanted to say I'm an absolute Powershell newbie, and secondly that this site is a great repository of knowledge by those way smarter than me! Anyway, I am a Network Admin at a...
View Articlepowershell - Invoke-WebRequest - sourceforge urls/redirection/dynamic conten
Hallo,I try to use Invoke-WebRequest CmdLet in Powershell for downloading OpenOffie...
View ArticleVerifying .NET usage
As part of a security audit, we need to:1. Identify versions of .NET installd.2. Document any application which is using .NETThe guidelines provided to us for (1.) is to get the version of...
View ArticleHow to enumerate folders
I need to find out how many folders and files are on shared drive. What I'd like is the same information you get when you "right click" a folder and pick Properties. There you see this...
View ArticleChange Local Password
I've Googled this and I've gotten tons of good hits. But here is what our environment looks like. We have many Windows 2003 x86 & x86 servers. We have many Windows 2008 R2 x64 servers.We have a...
View Article