Powershell & Psexec
Hi All,So, I can get posh scripts to run off of .bat's, through psexec, as well as straight psexec from the command-line-- thing is, the scripts I've been running were one-liners and the one I'm trying...
View ArticleHow to control/validate the creation of AD users with same lastname and same...
Hello, Let say in AD, I have the following scenarios: Scenario 1: (Easier to be controlled) User in AD: DaSilva, Neymar, dasilvan New User to be created: DaSilva, Nancy, dasilvan1 Scenario 2: Users in...
View ArticlePowershell installing .exe remotely. Maybe double hop error or bad scripting
Hi I am trying to install .exe file from a fileserver to another server through powershell remoting but I am having no luck. This is my script$cred=Get-Credential Invoke-Command -computername...
View ArticleStarting powershell script from server for users RDP session
Hi,I have a Windows 2008 server and users connect to it via RDP/ICA session. I can find the list of connected users by "query user or session" command but is there any command that I can use to...
View ArticleStart-Transcript Error: Transcription Has Already Started
I have code that uses start and stop transcript. Everytime i run the start-transcript I recieve an error that reads "Transcription has already been started. Use the stop-transcript command to stop...
View Articlesplit function
Hi,I am trying to insert a special character after every character eg: 12345678I need output as 12:34:56:78 I am trying split but couldn't get the output , any advise is greatly appreciated
View ArticleDNS Script
Hi I try to create script which read the domains from file and output A and MX recored for this domains, I've already done it for A record.But unfortunately, I could not find any ideas for MX record....
View ArticleFind Out the Size of Deleted Items in the Archived Mailboxes
Is there a way to pull a listing of all the Deleted Items Folder sizes for our Archived Mailboxes?
View Article[ADSI] Local Groups Users, Users Type, etc ...
I'm having an emergency for a compliance audit they want to know who has access to a list of servers.I found some scripts which help, but unfortunately it doesn't go as far as I need.I need to list all...
View ArticleLocal Administrators Group Listing
Thanks, Cyreli for giving me something to start with. When I ran your code, I did not get any entries for the Administrators, which was all I needed. A few tweaks & I got what I wanted. (Very...
View ArticlePowershell Array from Net View (cmd)
Hi,I have a requirement to list shares on a non windows box so can't use WMI. I've found that net view can be used but I am having problems parsing the output? Here is what I have$pc =...
View ArticleQuery users in Exchange and make sure user is within an array
I am not getting the right return from the array. I am not getting a match, even if the user is in the array: $MailboxArray = Get-Mailbox | Select Alias,IsMailboxEnabled $UserAlias = @() ForEach...
View ArticleConfirm save command
Hello,I have this script:cls [void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.TeamFoundation.Client")...
View ArticleHelp with logging
Guys, Im pretty new to powershell. I guess I have never had to use it much when it comes to writing my own scripts. However the time has come. I am trying to set up a script to enable all my users...
View ArticleHelp understanding strings in PS
Folks I'm new to PowerShell though I have done some programming in other langs. Can someone help me understand the difference in the following:1. $EmpID = "123456"Get-ADUser -Filter "EmployeeID -eq...
View ArticleMatching group membership from user list
Hi all,I have a list of sAMaccountNames and am trying to figure out if from that list any of the user objects are members of a set of security groups.There are two apps that have sets of groups...
View ArticleEnumerate sql databases and users of each
I'm trying to use PS to enumerate all non-system databases on a sql 2008 server and, for each database, list the corresponding non-system user accounts and server logins. Finally, I'll send the results...
View ArticleCan Powershell do this?
I have an environmental monitoring device that can send emails when it detects issues like heat, flood, etc in a room. It can send email notifications or SNMP traps as it detects these issues.Is it...
View ArticleSome Storage CMDLets do not work under WinPE
I have built a custom WinPE based on W2012 and included Powershell and a number of the Powershell CMDLets such as SMB, DISM, and Storage. Everything works fine. When you boot the WinPE disk and do a...
View ArticleHow do I out-grid and export to CSV this script?
Hi guys,I found this script: http://gallery.technet.microsoft.com/scriptcenter/Find-installed-dot-net-16f9f69f I need to out-grid and export to CSVCan you help me please?Maelitos$targetlist =...
View Article