PowerShell Desired State Configuration (DSC) How-To for Beginners (Pull Mode)
The very basics to get you going with DSC. http://www.signalwarrant.com/2017/02/28/powershell-desired-state-configuration-dsc-beginners-pull-mode/ submitted by /u/signalwarrant [link] [comments] The...
View ArticleNew-ADUser Password
I’m trying create a new user with New-ADUser while prompting for a password using Read-Host with the parameter -assecurestring. But I am getting this error: ‘Cannot bind parameter ‘AccountPassword’....
View ArticleHelp with variable
I am setting a variable like this: $variable = "Domain/Username" But the actual variable has about 1000 usernames. The actual length of text is 14,600 Characters When I run this on my machine at work,...
View Articleget-smbmapping no results but net use does?
When using get-smbmapping no results show up even though I have mapped drives. I go back to command prompt and I type in net use and the drives and their letter shows up just fine. I am using PS...
View ArticlePowerShell ISE Issue – Black Screen after sleep
PowerShell ISE started having a weird issue lately. When putting my laptop to sleep and then waking up, PowerShell ISE is all black. Resizing does not fix. I can still interact, as I pasted a scipt to...
View ArticleRunspaces / DCOM & WMI Issues
Hey guys – Just curious if anyone has experienced the WMI/DCOM issues I’m currently seeing with Runspaces. Basically its as simple as : Get-WMIObject works when run in a PowerShell console window. ie:...
View ArticleQuery Active Directory User Attribute with AD Powershell
Hello all. With the Active Directory Module for PowerShell, I am attempting to gather information from specific AD user object attributes, but no matter where I look or what I try, I’m unable to find...
View ArticleStart-Process issue with -ArgumentList
In a Powershell script I needed to call another Powershell script “as administrateur”, thus triggering the UAC on purpose. (assuming the user account is a local admin) A Start-Process -verb ‘Runas’...
View ArticleHelp with function
Hello all, I am trying to build a function that retrieves information from the bios using get-WmiObject. My issue is that I have a script that I have to pull information from computers on my network....
View ArticleWhat have you done with PowerShell this month? February 2017
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 ArticleStoring your scripts
I’m in the process of revamping my personal wiki that I maintain with helpful links and scripts and such. Curious what others use to store their PowerShell scripts in. I’ve been using...
View ArticleNew User Script
I’m looking for some feedback on my new user script I’m making. I’m creating it as a module that can be imported using the advanced function snippet. It’s still a work in progress and definitely need...
View ArticleSetting users users licences in office 365 in bulk, parameter cannot be found
So I was able to use my create my users in bulk and add details. But when trying to add licences I get “A parameter cannot be found that matches parameter name AddLicenses” code: import-csv...
View ArticlePowershell Disable Exchange Mailbox
Hi, I am trying to write a script that tells me what the status of a Forwarding Address is on a User Mailbox and then disable the mailbox if it is true Shortly the logic is – if $ForwardingAddress -ne...
View ArticleGet-ADUser with distinguishedname?
Dear /r/powershell Is is possible to use Get-ADUser to ‘extract’ the distinguishedname attribute from a certain user? Background: I need to get the distinguishedname’s from all users and add them to...
View Article2 questions: Get function default Parameter values -OnJobFinish-Trigger only...
I’m currently in the process of writing a Powershell GUI for my collegues (Fully in powershell, of course!), that are not that powershell-savy. It is 99% finished, but there are two problems I...
View ArticleA PowerShell function to rapidly gather system events for sysadmin eyes only...
submitted by /u/happysysadm [link] [comments] The post A PowerShell function to rapidly gather system events for sysadmin eyes only with some tips appeared first on How to Code .NET.
View Articlesuspending the IIS app pool recycling schedule
Hello, my IIS has a default app pool setting for the recycle to happen at a specific hour. All pools created have inherited this setting. Now I need a way to easily toggle this scheduled app pool...
View ArticleFriendly reminder that PowerShell is powerful but you need to be aware of...
Some time ago, I created a function to change many service credentials fast (Sometimes I have to). The solution looked kinda like this Yesterday I had to refactor some of my powershell code. When I...
View ArticleWindows 10 package management help
Not sure if this is right place, but googling has gotten me nowhere Somehow my package management is fubar on windows 10. I can’t seem to install anything. Running debug, it says VERBOSE: Exception :...
View Article