Change the console font programmatically
I’ve developed a console application (think ncurses) using PowerShell. I’d like to provide the ability for the user to change the font type and size. I’ve found the following module that works nicely...
View ArticlePowershell Webpage
Hi Guys, Just a quick one. I was wondering if anyone has any experience with creating webpages which run PS in the background. After creating a web form which can be filled out which can pass params...
View Article[Script Help] Moving file from one place to another
Hello! I am new to PS and attempting to learn it all right now. I am all over the internet and will be buying a book or two in the near future. I am in the process of moving one file to another...
View ArticleGenerate-Certificate – Submit a request for and receive a certificate for...
When used in conjunction with my Generate-CertTemplate script/function (https://github.com/pldmgg/misc-powershell/blob/master/Generate-CertTemplate.ps1), this Generate-Certificate script/function...
View ArticleThis works… But I feel like I can do it better/different
$path = '\path' $access = (Get-Acl $path | select -ExpandProperty Access)| select -Property identityreference,filesystemrights | Where {$_.identityreference.Value.Contains(“DOMAIN”) -eq $true} $array...
View ArticleGet Serial Number, Make and Model from Attached Monitors via WMI
A script I wrote that gets the serial, make and model from a computer(s) remotely via WMI. It outputs in the following format: PS C:Scripts> Get-Monitor -ComputerName SSL1-F1102-1G2Z Manufacturer...
View ArticleInvoke-Command access issues to 2008 R2
In an attempt to automate some things, I have to get around a double-hop issue. The current workaround is to enable CredSSP on the remote machine, run the remote command, then disable CredSSP from...
View ArticleRegex not filtering private IP ranges
I’m trying to pull public IP’s hardcoded to NICs using Get- NetIPAddress. I’m trying to filter out any private IP address ranges to pull only public IP ranges. Trying to do this with a quick one...
View ArticlePowershell/iTextsharp VS console application/RDLC
I need to create, save and print a shipping report. The data source is csv file. Basically it will have a header, a table with itemcode, description and qty and a barcode in the header. I made...
View ArticleRetefe banking Trojan now targeting UK banking customers
submitted by /u/guyruth [link] [comments] The post Retefe banking Trojan now targeting UK banking customers appeared first on How to Code .NET.
View Articlewhat is the recommended way to declare an ArrayList?
howdy y’all, i was playing around with arraylists and accidentally used two different ways to declare them. lookee … [System.Collections.ArrayList]$1st_AL = @() $2nd_AL =...
View ArticlePowerShell Tip : Extract Comments from Script
submitted by /u/Prateeksingh1590 [link] [comments] The post PowerShell Tip : Extract Comments from Script appeared first on How to Code .NET.
View ArticleHelp listing a group name when getting memberships in AD serach
I’m working on a PS script to enumerate members of a found AD groups, with specific properties for those members found. foreach ($m in $groups) { Get-ADGroupMember -identity $m.Name -Recursive |...
View Articleillegal character in copy-item source
I have a script defining $path = $env:APPDATA $user = $env:USERNAME and I’m backing up items in a user profile to a temp path in H: and then restoring them from H: back to the user profile. Running...
View ArticleHelp With Storing Get-ADUser Output to Variables
So I want to make a type of termination script. Throughout the process different parts of the account need to be referenced such as their Name, the UPN, managers name and Email, DistinguishedName,...
View ArticleHelp with time-based script?
So i am scheduling a job to run every 30 minutes. Sometimes, the job runs at 4:31, sometimes at 4:34. I need it to process everything in a CSV if the time in the csv is 4:30, 5:30, 6:00 etc. I’m sorry...
View ArticleDSC Resource Kit June Release
submitted by /u/PowerShellChallenge [link] [comments] The post DSC Resource Kit June Release appeared first on How to Code .NET.
View ArticleIs it possible to have a powershell script check a mailbox and generate a...
As the title said, I’m wondering if it would be possible to have a pop mailbox receive notices of when a user locks their AD account (I already get these mails), and as it checks/receives these emails...
View ArticleFaster way to do bulk SQL inserts into log/history table?
I was expecting to do this in SSIS, but have been told to use Powershell, I can do it, but it’s slow as heck, is there a faster way to load an array into a SQL table? The array is populated in a...
View Articleclear windows disk cache (for performance testing)
Hi, is there an easy command to clear the disk cache? I’m doing some IO bench-marking. Cheers submitted by /u/ocross [link] [comments] The post clear windows disk cache (for performance testing)...
View Article