Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources: Active Threads
Browsing all 8411 articles
Browse latest View live

Gathering HyperV VM Disk Information

I am trying to gather the following information about a VM's hard drive: Host NameVM NameLocation of the VM Drive (on the host)Size of the VM Drive (on the host)While my property names may not be the...

View Article


want to ping then check for users loggedin

I'm trying to get this script to work, I want to ping a list of computers and if the computer pings, then run psloggedon; if the computer does not ping, then continue to the next computer, I get this...

View Article


Network Drive Mapping Script

I have a PowerShell script that disconnects an existing network drive (server ( \\Server1) (S:)) and then creates a new drive, using the disconnected drive designation with a new path (server...

View Article

Disable AD Computer from txt file and move it to target OU

This is the script I have, but something is not right. Import-Module ActiveDirectory$computers = get-content "C:\disabled computer.txt"foreach-object{$computer | disable-adaccount$computer |...

View Article

CBT Nuggets Powershell V2 V3 V4 Ultimate Training-PRODEV

Description:  This PowerShell video training course with Don Jones covers everything an administrator can do with any current version of PowerShell.Read More 

View Article


Get started with Pester (PowerShell unit testing framework)

Some time ago I stumbled upon the Pester framework that promised I would be able to test my scripts. This seemed to be super-useful for my day-to-day scripting, but unfortunately the learning curve was...

View Article

function as InitializationScript

During a job, I would like to make a call to a certain function.As that function isn't in the same scope as the running code, this will fail.Therefore, I use the common refered syntax:$scriptblock = {...

View Article

Find last user to modify GPO.

Hello, I was wondering if anyone knew of a good way to find the last user that has a made a modification to a group policy. I have the Modification date, but it would also be great to know who made the...

View Article


Updat the "pager" attribut in AD from text file

Hi all,I'm new in this forum.I want to update the "pager" Active Directory attribut for some users that exist in text file.My text file is structured like this : FIRSTNAME                      LASTNAME...

View Article


Sum deleted items

Hi thereim trying to run a small one liner that will sum the total deleted items folder for a group of users on adatabase so something like this:Get-Mailbox -Database db1 |Get-MailboxFolderStatistics...

View Article

GPO auditpol

How to make your consultation, to bring me the policies that are applied to a DC and not local policies and export in. Txt or csv.Thanks

View Article

Export csv contents

Hi i am trying to remove the unwanted columns from csv.the problem is i am able to get the headers only, finding difficulties in bringing the contents from those columns

View Article

Exchange 2010 Dynamic Distribution Group needed

Where: RecepientType equals User MailboxANDCompany does NOT equal "Rex"

View Article


Report on individual mailbox.

I have written a Powershell command:Get-MailboxFolderStatistics 'Mailbox1' |select name, foldersize, itemsinfolder |Export-CSV C:\Mailbox1reportWhich works fine, I want to drill down a little more and...

View Article

Query SQL Server As A Different User

I have a need to execute a query in a Powershell script against a SQL server with an alternate user account. I have been using the SQLClient .NET class to create connections and run queries up to now...

View Article


Script to clean out old messages from Journal mailbox after exporting email...

After using the following script to export email to a .PST file I'm wanting to clean out the Journal email box called "JournalMailbox":  New-MailboxExportRequest JournalMailbox -FilePath...

View Article

Test-Connection and Restart-Computer for "UP" Computers?

Think I've got this working for the most part, does the reboot part fine anyway, but the output to host is a bit messy.  Really I just want it to reboot it or tell me "computer is not online".  I can...

View Article


Spliting input file by name of server names

Hello,i'm having a problem with creating of a script that would split my txt input to smaller files named by the server and sent every line from input to its corresponding file.My input look like this...

View Article

Inject PowerShell Goodness into Forefront Identity Manager

Managing digital identities is easy enough using Forefront Identity Manager (FIM), but what if you want dig in and geek-out a little more and automate many of the tasks?Read More

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