Powershell invoke-restmethod
I tried to use Powershell's Invoke-Restmethod with a uri of "http://192.168.0.30".I got an error message of "server not found". This is the address of the server.Would anyone know how this comes...
View Articlecalling functions with parms
I have created a function called Uninstall-Software. I created 2 param at the topfunction Uninstall-Software{ param ( [string] $ComputerName='', [string] $Remove='' )This is followed by code. From the...
View ArticlePowershell Logon Script Guidance
I am trying to create a script that will test a users groups for nested memberships in order to map drives. Unfortunately I have hit a road block and I am not sure where I am going wrong. Below is the...
View ArticleRun vssadmin, search for results and its state
Hey all,I'd like to write a script runs vssadmin list writers put it on variable. From the variable, search for writer name and its state.For example:PS C:\ $vssresults = vssadmin list writersPS C:\...
View ArticleAD PowerShell - Replace nested groups with members of said group
We are cleaning up AD and it's a bear to do manually. What I have:ProjectXYZ (Role Group)Members:DepartmentJ (Role Group)User 1User 2What I want:ProjectXYZ (Role Group)Members:User 1User 2User 3User...
View ArticleHow to find stale computer accounts in AD
Hi, I did a search on Google on how to find old stale computers in AD. I found what looked like my answer, and it was a script on this very site!!Text$then = (Get-Date).AddDays(-60) # The 60 is the...
View ArticleSelect-String for all .json files in many subdirs, output needs full path
I have a call recording program that dumps every customer service call our company answers into a folder structure by Year, Month, day, and hour and finally call ID. In this folder is the encrypted...
View ArticlePowershell script help
I found a PS script for monitoring DFS replication online but I would like to include a line that would shoot an email with the results. Below is the script and the line I believe I need to include...
View ArticleRunning AD script from Task Scheduler
I am working directly on a Windows 2008 R2 Enterprise SP1 domain controller. I have created a script to search Active Directory for objects that are not protected from accidental deletion and then...
View ArticleDaily IT Script
Im looking for a Daily script I can send to myself that will run on my DC. The script should be able to ping 4 different ip addresses and have a response of "UP" or "Down" I would also like to print to...
View ArticlePowershell: Power Uninstall .exe applications
I am attempting to create a script to uninstall an application in which one part uninstalls an old .exe application. The script runs with no errors but also doesn't uninstall the application. I can...
View ArticlePower shell trusted domains
I am trying to get from a list of groups a user is a member of. I have not found a way to get a list of groups on DOMAIN 1 that have in DOMAIN 1\User1 as a member. There is a trust between DOMAIN 1 and...
View ArticleSet content type on Office 365 Public Folder created with Powershell
Dear Spiceheads:I have a script that automatically creates public folders when a new project is created. It works fine except in one instance. The parent folder (that already has many subfolders) was...
View ArticleProtecting .PS1 Script
I am going to try and build a small script/program for a local food pantry. I want to scan a bar code card to see if a guest is in the system and tally them in a excel spreadsheet. this is so they can...
View ArticlePowerShell Humor from The Creator
I just saw a link to this and thought it might fit in here.http://snoverisms.com/
View Articlefind real owner of a file
I have used Martin's script from this site and it is very cool but it shows that buildit\administrators is the owner 99% of the time. I found a VBS script on Microsoft's site that calls two things from...
View ArticleAdd MS Exchange 2010 White space in GB to existing PowerShell script
Hello all,I have an awesome script (see attached) that retrieves Exchange specific data and emails it via html. It details DB size, DB name, mailboxes, and disk space below a threshold that I set. It...
View ArticleConfiguring script to send password expiring notification emails
I was wondering if any of you awesome folks out there have ever configured a script to run on your domain that queries AD for people whose passwords are X days from expiring. I found an article...
View ArticleSecurestring password
Powershell$pwdloc="\\RenamePC\password.txt"[Byte[]]$key=(1..16)$pwd=Get-Content$pwdloc|ConvertTo-SecureString-Key$key$username="domain\domainadmin"$path="\\PC_Rename_New\renamepc.csv"$hash=@{}$oldName=...
View ArticleTeam's daily,weekly and monthly email report - Powershell Script
Dear team, I have been asked to pull report of particular team(team size =10).I refereed : http://www.msexchange.org/kbase/ExchangeServerTips/ExchangeServer2010/Powershell/NumberofE-mailsSent... but...
View Article