Quantcast
Channel: /r/powershell – How to Code .NET
Browsing all 8793 articles
Browse latest View live

Creating A DSC Class-Based Resource

Hey all, I put together an overview of how to create a DSC Class Resource. Hope you guys find it helpful. As always feedback is greatly appreciated....

View Article


Pin to taskbar Windows 10

Is there a way to pin programs to the taskbar using something like powershell? It was easy in Windows 7 and until recently I was using a program called PinTo10.exe but a few months ago it stopped...

View Article


Display asterisks in a descending order?

Im trying to answer a homework question, it’s asking to display the asterisks in a descending order. So, like this: * * * * * * * * * * * * * * * So far, I’ve got something like: i = 5 For ( i = 5; i...

View Article

How to get unassigned phone numbers from Skype For Business powershell module

Has anyone ever done something like this in powershell? I’m automating new user creation and have to set up their skype for business accounts. Here’s what I have so far: <# set up skype for...

View Article

How would I go about calling a script that has a gui?

I have a large .ps1 file that performs a bunch of Active Directory functions and I’ve added a gui to make it easier to use. I keep having to open the code within the ISE and hit play to start the gui....

View Article


Print Queue Woes

Due to a poorly run printer project, I’ve been tasked with segregating network print queues in my organization. This is done easy enough in GPO (ip range and security group) but now I need to remove...

View Article

Encrypting script – small help regarding a script I found

So I was using this little simple script http://fbinotto.blogspot.pt/2013/08/powershell-encryptdecrypt-script.html to encrypt a file, just as a demonstration, I used multiple encryptions, this one...

View Article

365 Groups Enable AutoSubscribeNewMembers Help

Hello, Figured I’d pick you brains and see if anyone else has had this issue Getting this error whenever we try to Enable AutoSubscribeNewMembers via powershell: Set-UnifiedGroup -Identity “Grade 9-01...

View Article


Unlocking Android Bootloader via Powershell?

I have always used the simple command line of, adb devices > fastboot oem unlock, and then follow the instructions on the phone. But my computer updated to a new version of Windows 10 the other day...

View Article


Get-ADUser – Help with duplicate Description

I am in the process of creating a Powershell GUI reset password tool for users, and I have a small problem with my get-adusers. The plan is to let users scan their ID, and the script will try to...

View Article

powershell wizards: I’m confused

My task is to watch a folder for any changes, if anything happens, encrypt with PGP and move to another folder. I have the monitoring part sorted, however I am unable to get the encryption part...

View Article

Does anyone have a script for changing computer name and domain in powershell...

submitted by /u/swiggetyswag [link] [comments] The post Does anyone have a script for changing computer name and domain in powershell v2? appeared first on How to Code .NET.

View Article

Need help with a script – Noobish question

Hey guys, I spent the last hour of the day yesterday creating a powershell script that generates a random, secure 16 character password by pulling random characters from the ascii table between values...

View Article


How to not pipe empty/null values from a SQL Server table?

I’m a massive nooby when it comes to PowerShell so please ignore if I’ve done this completely wrong. I’m using the Invoke-Sqlcmd cmdlet and then converting to html, putting the results into a variable...

View Article

LNK files again being used to deliver malicious PowerShell script

submitted by /u/taneshacollum [link] [comments] The post LNK files again being used to deliver malicious PowerShell script appeared first on How to Code .NET.

View Article


Can’t ‘Get-Member’ of some cmdlets. How do you ‘just know’ what a cmdlet’s...

I can ‘Get-Member’ of simple cmdlets such as Get-ChildItem | Get-Member or Get-Process | Get-Member, but I am having trouble getting properties for certain items. A cmdlet I cannot find properties for...

View Article

Replacing Commas enclosed in double quotes

Hello, I have csv file that contain data like below 1, “abc,xyz”, gfgf, “def,ghi” 21, “abc,xyz”, gfgf, “def,ghi” As you can see there additional commas as part of the enclosed double quotes.. I want...

View Article


Help with Fundamental Usage Question

I am clearly missing something, because this has to be one of the most basic bits of Powershell 101, but I’ve been frustrated for years because even the 101 guides seem to closs over this. Finding...

View Article

Need help exporting displayname, cn using get-aduser CSV file.

Here is my script Import-Csv C:UsersXXXNAMEDesktopvisio-users.csv |foreach-object{get-aduser $_.name -Properties displayname}|export-csv C:UsersXXXNAMEDesktopvisio-users.doc the first column of...

View Article

Changing web.config files with Powershell

Hey guys, I wrote a script to add an attribute to a web.config. It all works fine, and functions as expected, but this is going to be a mass change and it screws up the formatting of the web.config. I...

View Article
Browsing all 8793 articles
Browse latest View live