Automatically decompress *.tar.gz files to *.tar within Windows 2008 R2...
Is it possible to have any and all *.tar.gz files that are dumped to a certain folder automatically decompressed/unzipped to *.tar in order to be processed by an sFTP job? Thanks for any help you may...
View ArticleTrim resolve-dnsname results
I am trying to write a script to validate that the forward and reverse lookup of a IP match. With multiple DNS zones I may have multiple periods in the FQDN so the code I have below does not work all...
View Articleget-process and UserName
Hi,I'm trying to list all/some process and need to include the username since the script has to run in a terminal server environment. It works using WMI (Get-WmiObjectWin32_Processand GetOwner()) but...
View Articlepoweshell quick help needed
earlier this job was running fine and all of sudden started failing on this step.this step was added to script out daily the jobs on my server and now after year successful run sudden started failing...
View ArticleAmend ALL user's SMTPs
Hello everyone, We're having a bit of trouble at the moment within our businessUsing the Exchange Management Shell, i want to write a script which takes all the SMTPs for a mailbox, and...
View ArticleUsing C# to run PowerShell command to create VirtualDirectory fails
I can run these commands with no problem directly in PowerShell. But trying to get C# to run them, I receive errors.md d:\ftproot\vdir\test20140317A; New-WebVirtualDirectory -Site "[site]/[a virt...
View ArticleHow do I create a report using shell scripting?
I am new to powershell scripting....I have a requirement to come up with a script that can create/generate a report, cause this will then be on a scheduled job. I currently have c# code that is used to...
View ArticleIf else checking existence of homeDirectory in AD
I have been banging my head on this one. $home = Get-ADUser -Identity <username> -Properties homeDirectory | select homeDirectoryif ($home){ Write-Host "HomeFolder does exist"}else{...
View Articletrouble moving AD User with Move-ADObject
When trying to move and AD User using the following command:move-adobject 'CN=John Doe,OU=_Users,OU=ABC,DC=xyz,DC=com' -targetpath 'OU=Disabled Accounts,OU=_Users,OU=ABC,DC=xyz,DC=com' -targetserver...
View ArticleRun commands in parallel
Hi, I have a script that runs an application "CALCAPP.exe" using values from passing parameters: \\PRCServer09\APPS$\CalcApp.exe -f \\PRCServer09\Data$\dlymkt.xml -r \\PRCServer09\Rules$\mktRules.xml...
View ArticleFind keyword in XML file from an array of keywords
Hi, I have an array of collection of keyword: $KeyWord = @("Fail","Exception","Terminated","Error") I want to check in a textfile sample.xml, if any or all keywords from the array $KeyWord exist. If...
View ArticleError trap on extraneous script parameters
I have a script that accepts named parameters at the command line, and I would like to error trap any extraneous parameters, rather than having a malformed shortcut cause an error. I tried just...
View ArticleSubstring(0,25) Fails when the string is less than 25 characters
@{Name="proxyAddress";Expression={$_.proxyAddresses.substring(0,38) -join "`n"}}This is part of a PS script that searches the AD for a user and returns certain values.Problem was the ProxyAddress field...
View ArticleIf Compar-object gets results then...
Hi colleagues. I am comparing 2 text files, one on a server and the other on different hosts.To accomplish this I use compar-object, and as output I get the hostname and below the differences between...
View ArticleIssue with Pasting to Command Line/PowerShell
Hi,We are unable to paste text from an application other than Command Prompt (CP) or Windows PowerShell (PS) to CP or PS.The issue is only occurring on one of several Windows Server 2008 VMs.The server...
View ArticleCompare list of specific users to AD via Powershell
i have a list of 70-80 some odd users that i need to check for on AD if they have accounts or not.one of my co workers suggested i make a PS script to make the process easier than just going in and...
View ArticleCan Powershell to format or select specific information from an dsfutil.exe...
I have a list of UNC path's and I'm trying to corresponding DFS path. I been playing with the dsfutil.exe tool and the following cmd:dfsutil.exe /root:\\dfsroot\data...
View ArticleValidate a user member of local groups
I need to check whether a user is a part of local groups and if not, then add the user to the group.$groups = "guests", administrators" $server = "localhost" $user = "koz0s" function Uservalidation {...
View ArticleLDAP query to fetch users from Two different OU
I am looking for an AD query to get AD enabled users from two different OU Stores & ServiceOffice under root domain. Using below syntax to fetch it simultaneously but not succeeding. Please help...
View ArticleAuto-Increment Number for Server Audit
All,We have built an audit to verify server configuration and builds that our other Engineers are performing. What we want to do is to be able to audit a farm of systems b y entering something as...
View Article