WPF Groupbox Label
I have a persnickety problem. My script has a groupbox with a label. <Label Foreground="Blue" x:Name="lblGroupHeader" Content="Select a file"></Label> A button generates a list of files....
View ArticleRegex SOS – Splitting Elements from a Variable With Regex?
Hi All, Scenario: I’ve got a variable with a bunch of computer names in it. All our machines are named starting with two letters that signify their geographic location. I’d like to be able to split...
View ArticleCreating CSV Files with PowerShell
submitted by /u/Net-Runner [link] [comments] The post Creating CSV Files with PowerShell appeared first on How to Code .NET.
View ArticleHow To: Split file by # of lines in text file?
I have 4 text files with millions of newlines that I am trying to split. I would like to split each of these files into new files if the count of newlines is less than 65530 (just padding a bit from...
View ArticleAny good references for streaming in a large XML file?
I have a pretty large XML file (around 600Mb) that I need to stream in and pick out certain elements to act on. I’ve noticed that with the code I have currently, it seems to work great on smaller...
View ArticleSQL database size different in PowerShell than SQLSMS?
If I right-click on a database in SQL Server Management Studio and look at the size of one of my DBs, I see 676.75. If I run the following, Get-SqlDatabase -name $DBName | select name,size it returns...
View ArticlePowershell/WMI
I am trying to pause all queues on a 2003 print server and the following which works on a 2008R2 and 2012R2 server does not work on the 2003 print server. Is there an equivalent WMI call that I can...
View ArticleActiveDirectory cmdlets from server 2012 on a windows 7 machine
I have a windows 7 machine with PowerShell 5.0 installed along with RSAT (and thus the ActiveDirectory module). However, many cmdlets are missing – for example, Get-ADReplicationAttributeMetadata....
View ArticleWorking with Object Types in PowerShell
submitted by /u/Net-Runner [link] [comments] The post Working with Object Types in PowerShell appeared first on How to Code .NET.
View ArticleAdd permission to Mailbox (Calendar) without overwriting existing permissions
I’m trying to write a powershell script to add Reviewer permission so every user can view any other user’s Calendar. Some users allready have read and write permissions on certain calendars. Am I...
View ArticleRegistering a Scheduled Job through AWS UserData without administrator
Hi everyone! I’m having trouble creating a scheduled job through Amazon Web Service (AWS) EC2 UserData. I get the following error when I try to call Register-ScheduledJob "An access denied error...
View ArticleThis is a tough one (I think) – How to get a Module’s name from within the...
I can’t seem to figure out a scenario agnostic way of doing this. Basically, let’s say we have a module with the following folder structure: ModuleName | ModuleName.psd1 ModuleName.psm1...
View ArticleOutlook rule starten
In outlook I managed to create a rule for my inbox. I can resolve it with: $OL=New-Object -ComObject OUTLOOK.APPLICATION $ns =$OL.GETNAMESPACE("MAPI")...
View Article[Question] Create variable with Variables name
Hi, I’m trying to get a list of error messages from the even viewer and filter them by computer brand. What I’m trying to do now is create an array for each computer brand that the script find and...
View ArticleSTIG/PCI compliance tool
If anyone has ever had to work with STIG requirements, especially DISA STIGs, you will understand the pain of going through the checklists verifying and configuring settings for sometimes hundreds of...
View ArticleWhat can I do with the Method and Properties returned by Get-Member?
I’ve been using PowerShell for quite a while but came from a sysadmin route with no history of programming so have a lot of gaps in my knowledge. I’m looking at WSUS at the moment and if I go $Update...
View ArticleLooking to search files for a string and then exclude lines with a different...
first part works ok. but i try adding where obj to filter the unwanted strings and it still includes them. Here im searching for lines with SERVER and trying to exclude lines with INC get-childitem...
View ArticleServerless Administration with Powershell – specifically PSWindowsUpdates
I’ve been trying to implement a way to configure (2) CONTROL machines to be able to command the other ~70 or so we have in our SMB without an Active Directory server. Specifically, our main goal is...
View ArticleUsers without employeeID and ignore disabled users
I have a small script that looks through AD and finds users without EmployeeID numbers. Is there a way to add to ignore users that are disabled? Would it be just changing it to a ForEach, and adding...
View ArticleEnsure Single Timer Instance in Forms
</Edit:> More googling found a solution to users closing the form. https://stackoverflow.com/a/35730262 $form.add_closing ({ $_.cancel = $true }) Which I’ve then wrapped up like this to allow a...
View Article