hash tables square brackets and convertto-json
Hi usually I find I can work things like this out, but this one has had me turning circles for days :(I am sure the answer is pretty easy and something I have missed , but I have tried all types of...
View ArticleTest-Path from a list
This should be fairly easy and i did similar with test connection. I have a list of home drives, that were established in AD.90% have this set but the folders do not exist. I used $Test = get-content...
View ArticleCheck for snapin
This should be an easy one for someone with more experience than me in this area. I am creating a process that requires some snapins:Add-PSSnapin SqlServerProviderSnapin100Add-PSSnapin...
View ArticleCreating a string from a get- command
I'm running this to get the primary SMTP address, I'm looping through a CSV that has a list of all the SamAccountNames that I'm modifying.$Primary=get-mailbox -Identity $_.SamAccountName |...
View ArticleNeed Help Passing Parameters
I have a script that accepts parameters, dynamically create and execute SQL commands to backup and restore Databases using a backup agent. My desire is to use this script file in conjunction withe the...
View ArticlePoSH, and WSDL\XML
Hi, been trying to figure out an actual question from a client, while learning at the same time, but am currently stuck. Â The basic premise is that they have XML source from which they need to retrieve...
View Articlecopy-item fails
$grab = get-childitem "C:\Temp" -recurse | where {$_.extension -eq ".txt"} | % { Write-Host $_.FullName }Â Â Â foreach ($item in $grab) {Copy-Item $item -destination "c:\Find"}Â When I run that above...
View Articlebacking up event logs, then send to a choice of two central servers, based on...
Hello, here goes. I need a PS script to backup event logs of windows 2008R2 servers and Win7 clients. Once backed up, based on which site the host is in, send to the central server in that site. If...
View ArticleRename multiple files based on their content
I am very much novice on powershell but I am trying to find(learn) a solution in powershell to rename several text files based on their content:For eg:I have a file with content in first line something...
View ArticleIf Statement to Return No User Logged in on Remote Computer
I've been struggling with this one and need some help. The Get-WmiObject command below returns the DOMAIN\Logged_In_User on a remote computer. I would like an "If Statement" to return "No Logged User"...
View ArticleExtracting Specific String that follows known text
I have a string of text in a file that looks like this (without the extra row...
View ArticleConneting to Exchange 2010 from win7(different domain)
Hello All,Client: Win 7 EnterpriseClient Domain:ds.swin.edu.auHost server: Windows 2008 R2 EnterpriseSever domain: ex.swin.edu.auExchange: 2010How do I connect to Exchange 2010 with powershell...
View ArticleHelp with automation of email address policy PS script
I have a need to pull information from a file and automate the process of adding Email Address PoliciesI am trying to run a script but I'm hitting dead endsThe first part of the script need to launch...
View ArticleScript to find SMTP addresses with #2 after them
Good Day all, I am running Exchange 2010 in my environent and as you know if you create an address for a user that already exists it will create the account with First.Last2@my domain.com.Is there a...
View ArticleEmail address to Userr ID
HiIm trying to use powershell to obtain the users samid based on their email address (SMTP)Can someone please help as im new to powershell.
View Articlepowershell script for assigning \changing ownership of a shared mailbox
Can someone please tell me shell script for assigning or changing ownership to a mailbox ?!I am new to powershell, I have to update ownership of 200 shared mailboxes and would really prefer to run a...
View ArticleScript to find new accounts created on or after a specified date
Can anyone tell me how to get all new accounts created on or after a specified date and display the email name, first name and last name?
View ArticleIs there a way to pull number of e-mails sent\received from a particular Ad...
Good day everyone, I have a bit of a problem hopefully someone can help me here. I have a domain ABC.com with several Ad forests. Is there a powershell script that can distinguish users from a...
View ArticleImport multiple PST files to archive database
I need to create some script for import pst users archives to EXCHANGE 2010 sp1 database.Mail archives stored on single file server \\FILE-SERVER\PST\%Username%\An amount and name of files is different...
View Article