Quantcast
Channel: PowerShell General
Browsing all 10624 articles
Browse latest View live
↧

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 Article


Test-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 Article


Check 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 Article

Creating 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 Article

Need 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 Article


PoSH, 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 Article

copy-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 Article

backing 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 Article


Rename 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 Article


powershell script to remove duplicate key

remove duplicate key

View Article

If 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 Article

Extracting Specific String that follows known text

I have a string of text in a file that looks like this (without the extra row...

View Article

Conneting 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 Article


Help 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 Article

Script 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 Article


Email 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 Article

Image may be NSFW.
Clik here to view.

powershell 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 Article


Script 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 Article

Is 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 Article

Import 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
Browsing all 10624 articles
Browse latest View live