Help speeding this up please
Im running this script to get the event logs containing the data I need and sending it to an html for viewing. It is taking forever on anything that does not have any matches. I cant think of a way to...
View ArticleWorking with output from “arp -a”
Noob, here. The “arp -a” command shows all the ip addresses and their associated MACs on the subnet, but I’d like to go a step further and see the hostname, too. It looks like I’m getting my array of...
View ArticleActive-Directory, modify CN
Hey guys, I have to change the CN of ~200 users in the AD and now I wondered if there is any faster possibility to do it with powershell. I used google already but it’s not helpfull and I’m too...
View ArticleFind user’s group membership in trusted domain.
Is there a way to find what groups a user is a member of in a trusted domain? DOMAINB trusts DOMAINA. USER in DOMAINA is a member of some groups in DOMAINB. I’d like to run a query to find out what...
View ArticleSQL Server Analysis Service
Hello everyone, I could use a little help. I am still very new to powershell. Currently, I am trying to get the default backup path for SQL Server Analysis Service. I thought it would be similar to...
View ArticleCreate folders with the name of the AD-SamAccountName
Hey guys, I’m currently trying to look at 2 OUs of my AD, get the SamAccountNames of the users and create for each SAM a folder with the corresponding name. This is what’ve got sofar:...
View ArticleLearning PS
Very new to PS and IT in general; I looked at the sidebar links but none of them seemed to have exactly what I was looking for. Are there any sites or courses that give you a process to script and...
View ArticlePowershell and regex matching all instances within % sign
I am trying to match off of a string that would look like the following: %replaceme%pathfolder%match2%file.ps1 I want to be able to match anything that is within “%…%”. I was trying to match with...
View ArticleIs there a way for Powershell to allow users with lesser permissions to reset...
My goal is to allow some of our service desk to reset specific services without giving them keys to the castle. We have several vendor supplied applications that unfortunately run into services issues...
View ArticleCopying files to external hard drives
Hey all, I have a large amount of data spread across two local drives on a server that I have to copy to externally attached hard drives. The problem is this: The two external drives are 8TB but in...
View ArticleQuick and dirty: Retrieve either Security or Distribution Groups – WITH...
Get-SecurityOrDistroGroupMembers: http://pastebin.com/j83d5Hd5 As stated above, there is no need to load the ‘ActiveDirectory’ module (which requires RSAT to begin with) or no need to log into an...
View ArticleAccount management script for AD with menus not working
We are trying to create a master PS script that will allow us to perform our routine account management commands for new or exiting users. The individual functions work fine. However, the combination...
View ArticleOffice 365 Who has What license
https://github.com/Deathjam/Powershell-Scripts/blob/master/365-license-check.ps1 A simple WPF app that shows a list box of licenses, columns ( AccountSkuId, ActiveUnits, ConsumedUnits, Remaining )...
View ArticleRemove-Computer vs Remove-ADComputer
I want to remove a pc from the domain after running a script, which is the correct cmdlet? Also these pc’s will be linked via hostname so is there a certain parameter I need to put in to unlink it...
View ArticleHow do I run an entire function in -whatif mode? I am using...
Hey, I just started learning Powershell about an hour ago and am trying to run my script in test mode so I don’t accidentally break something in my live AD. I read about -whatif and...
View Article[Help] Packing bat and PoSh files
Hi Everyone, I have 3 bats and 3 Posh, I want to move them from the usb drive to c:temp Is there better way to pack all three and move them? Or is there an alternative to do this? Bat runs the posh...
View ArticleIssue with passing variable resulting in...
I’m trying to write a script to count subfolders and tell me the number of files and the size of a folder but keep getting “Microsoft.PowerShell.Commands.GenericMeasureInfo” for the file size. Code...
View ArticleIssues managing DHCP with PowerShell
I’m currently slamming my head against the wall trying to figure this out. I’m trying to configure some DHCP options with PowerShell and I can’t figure out why it’s failing. At a high level, I’m...
View ArticleHTML cell size
Hello, I am quite familiar with ConvertTo-HTML but I have a large amount of data (long strings) that I am attempting to export. In some columns, the text word wraps and in others, it continues on the...
View ArticleHow do I add a single number counting upwards from 1 into an email?
I’m writing a script that will send an email at a specified time every day. The body of the email must contain “day X” where X is the number of days the email has been sent. So the first email is day...
View Article