Checking partial string against array
I’m trying to do a comparison of a partial string to a set of values in an array. For example, let’s say I have a string variable as “jd2tpTg” and I have an array containing values such as “jd”. What...
View Articlexml child element
http://pastebin.com/A9q7wpQy I am trying to add a child element into the application tag. I can add new elements, but when trying to add a new child element onto application, I am just hitting road...
View ArticleIs it just me or are the WindowsUpdate cmdlets incredibly slow?
Using the PowerShell cmdlets are an order of magnitude slower than using the MMC console. Is this a universal truth? submitted by /u/myworkaccount999 [link] [comments] The post Is it just me or are...
View ArticleUpdate to powershell help not working
I’m trying to write a script to delete multiple items from text file from AD and am wanting to peruse documentation for “remove-adobject” to determine flags/switches to get the right items gone....
View ArticleHelp with blank spaces: Tabs
First, I’m a bit of a novice with POSH and had some help from a programmer writing this script. It was working when I had to find computer names with a common element in it, but then requirements...
View ArticleWindows Update with PowerShell – How can I tell which updates are for Windows...
My team is responsible for patching Windows OS on over 100 servers. We are writing a PowerShell script to automatically install all available Windows OS patches at a certain time. Running the...
View ArticleIs it possible to test a command without running it?
Is there a feature in Powershell that allows me to test and find the potential result of a certain command, without actually running that command? For example, is there a command to run New-Item...
View ArticleHelp to properly dispose/remove runspace pools
I’ve been playing around with runspace pools and everything functionally works except the CPU usage is around 99% for each runspace. I’m pretty sure the problem is with the way I’m monitoring each...
View ArticlePowershell and SQL returns wrong data
$sqlConn = New-Object System.Data.SqlClient.SqlConnection $sqlConn.ConnectionString = “Server=SQL;Integrated Security=true” $sqlConn.Open() $sqlcmd = New-Object System.Data.SqlClient.SqlCommand...
View ArticleLearning about jobs — Receive-Job as jobs complete?
I’ve begun learning about jobs and asynchronous tasks. I have a small script, and I want to retrieve output from each job as it is made available. At the moment all I’ve figured out is retrieving...
View ArticleIssues with ISE on Windows 10
I have an odd issue that I can’t seem to resolve. When I launch the ISE on Windows 10, it brings up this and gets stuck there. I have tried copying the exe, and even the whole folder from a working...
View ArticleUnderstanding -whatif behavior – I’m missing something here…
So, I’m trying to implement -whatif behavior on my functions moving forward, but I’m having trouble on a couple of fronts. Here’s the function I’ve been testing: http://pastebin.com/sFD0UER2 I copied...
View ArticleDetermine if Exchange Distribution groups are active within the last 6 months.
In our company, we create a new distribution group for each project we work on. Since we never get notified when they project is completed, I created a rough script to determine if the group was used...
View ArticleJoin our first PowerShell Core Community Call – Dec 8, 2016
submitted by /u/PowerShellChallenge [link] [comments] The post Join our first PowerShell Core Community Call – Dec 8, 2016 appeared first on How to Code .NET.
View ArticleWhat have you done with PowerShell this month? November 2016
What have you done with PowerShell this month? Did you learn something? Write something fun? Solve a problem? Be sure to share, you might help out a fellow powersheller, or convert someone over to the...
View ArticlePassword not applying in AD New User Script
So after I saw the post for POSHGUI, I wanted to create a simple tool to speed up my new user creations. I am most of the way there, but I simply cannot get the password to go from a text field, to an...
View ArticleMove any file in directory that contains specific string in filename?
I am only minorly “OK” at PowerShell, but end up overthinking things sometimes. I have a feeling that is the case here. So I have a directory that has ~900 files. Some of the files are simply...
View ArticleBackup Ubiquiti UniFi Controller or Cloud Key
submitted by /u/realslacker [link] [comments] The post Backup Ubiquiti UniFi Controller or Cloud Key appeared first on How to Code .NET.
View ArticleHelp with simple command I think
So basically what I am trying to do is; cd to a device label. The idea is that I want to cd to this and only this flash drive and the command will work on any computer. Thanks for any help. BTW: I...
View ArticleCannot bind Parameter ‘GrantSendOnBehalfTo’
Hi guys. I’m trying to create a script where i can add and remove multiple people from the Send On Behalf permission on an exchange mailbox. However I’m getting the below error. I’m kinda new to this...
View Article