Code enchancment
Hi All,I need assistance in enchancement below code and make it into function. here is script belowIPch = test-connection command is used and it will capture the ping status$ip = ip address depending...
View ArticleFailover Check Script
I'm looking to create a script that will loop through each entry of Get-MailboxDatabase and checks the ServerName that they are active on. If the ServerName is equal to "test2" it means the server has...
View ArticleHow do I arrange mutilple foreach loops into a single loop for each item?
I have written this script to find out who has access to an Exchange Distribution list. They are locked down so staff can’t spam the whole business with their latest request to sponsor them for...
View ArticleStatus DAG database locations
This is a script I wrote to show the status of all Exchange 2010 DAG databases. It displays to the EMS console color coded to see db's running off of Activation Preference location. And it will handle...
View ArticleIs there a way to check if a variable that you have matches something inside...
Hi All,I have a general question about powershell. I basically am looking to see of I had variable equal to something, is there a way that I could search an array and see if a value within an array has...
View Articlehow to copy an in-use file?
We are using Office 2010 which has some bugs when it comes to storing your Outlook .PST files on the network. So I'm working on a way to copy their .PST to a network share. If Outlook is closed or if...
View ArticleAdding Pictures to AD
Okay I need help scripting the following. First the script needs to query AD to find AD accounts in one OU that do not have pictures, retrieving their employeeNumber. Then the script needs to match...
View ArticleCopy folders and subfolders to another destination
Hi,I am trying attached script but it doesn’t work well. Everything is OK except line with Robocopy.I don’t know what parameters I should use.I need copy the newest file from each folder and subfolders...
View ArticleGetting error when using the operation" getElementById:String"
Hi,When trying to run a script to login to site using credentials, I get an error message saying"You cannot call a method on a null-valued expression.At line:11 char:28+ $ie.document.getElementById...
View ArticleMultiple Login Challenge
Here is a challenge...Picture a setup with lots of computers driving lots of screens. In this case a simulator, using lots of projectors to provide the visuals. Policies dictate that machines must have...
View ArticleTechnical Analysis: VIM, PowerShell and Signed Code
Abstract: In the UNIX and Linux world, vi and EMACS have long held positions as the best-developed editors for handling large amounts of code or other text. More recently, an improved vi clone has...
View ArticlePowershell - Post Method - Server not Accepting the Cookie
Hi,I am trying to download the contents of an ASP page by using HTTP POST method in Powershell.Initially to get the SessionId, I request the webpage with default GET method. I extract the SessionId...
View ArticleDeleting every other file in directory with name signature
I'm trying to thin out backup files. We are accumulating too many backups but want to keep every other one older than a certain age.For some reason, I get the files I need in my GetChildItem, but I'm...
View ArticleJust remove Everyone Full from Root folder level and copy the perms out
So, i'm not quite sure where i'm going wrong here... Or if I am at all..I want to just remove everyone full control from root of filesystem share.. so for example \\share\share$ .. Not share NTFS...
View ArticleScript to get the file size in a folder and check the active directory for...
Hello experts,I have requirement to get the below details.scenario- There are folders (shared folder) with name of users login ID. Each folder consists of users' PST. I want get the DirectoryName,...
View ArticlePass SQl Query parameter for Powershell Script
Hi,I have following parameters being passed from SQL Stored procedure to Powershell.----------PowerShell Start param( [string] $server = "SQL2", [string] $database = ("Utils"), [string]...
View ArticleInvoke-Command for RoboCopy in Powershell
I've got an issue I'd love a bit of help with. I have a Powershell Script that is supposed to use robocopy to copy items from one server to multiple servers simultaneously. We used to just sync in a...
View ArticleRead remote registry - service woes
I want to read the remote registry using PowerShell which I know will require [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey()Firstly though, I need to ensure the RemoteRegistry service is running....
View Articlemailbox size exchange 2007
Hi,I have Exchange 2007, I get a list of users in TEXT file and I need to get a table like this:display name mailbox size(MB) Issue Warning Quota(MB)user1 25...
View ArticleTrying to un-register and then re-register an OCX file.
Hi All,As in the title, I'm trying to un-register and then re-register an OCX file using powershell.This needs to be done on a remote machine.So far I have: # declare the local target path...
View Article