Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Browsing all 6937 articles
Browse latest View live

Creating a PowerShell Script Gallery Upload Add-On – Part 1

One of the main features in the Script Browser is to search, download, and learn script examples from the TechNet Script Center.Read More

View Article


Fix RDP on Azure Virtual Machine

Q: I disabled RDP on my Azure virtual machine; how can I re-enable it?A: As long as your virtual machine has the Azure VM Agent installed, it's very simple to fix the RDP configuration on the virtual...

View Article


Using PowerShell to discover information about your Microsoft SQL Servers

I’m an infrastructure guy who supports many different products at multiple datacenters in an enterprise environment. One of those products is Microsoft SQL Server which I’ve been supporting since...

View Article

Would like to watch directory for changes

Hey everyone. I'd like to watch a directory for changes so that I can save the files in there to another location to back them up each time.So what I'm writing is a script that will start a process,...

View Article

Finding the number(.count) of passwords

Iwant to find outhow manyusersare using the defaultpassword has not been.the default passwordis called"Password"can youhelp me here?Greetingsfrom theWorld ChampionCountryMarek

View Article


Get-AdComputer just name

I have this code that works  Get-ADComputer -Filter * | Format-List name   but it returns the following:  name : MG08157 name : MG08151 name : MG08155 name : MG07962 name : MG09233 name : MG09270 I...

View Article

Clear connections to the print server

We have a newprint serverandwant to runa scriptonall clientsvia GPO.Itshould beall connections to theoldprint serverdeleted.$oldPrinterName = "\\Server01\"$comNetwork = New-Object -ComObject...

View Article

Script that shows specific user is logged into a list of servers. The script...

The script below lists all users that have open RDC sessions on a list of servers.I need it to just list any from a specific person. Could anyone help... $servers = get-content “C:\scripts\servers.txt”...

View Article


List of all GPO's with their links.

I'm brand new to PS, and have tried using the various helps for both the Get-ADOrganizationalUnit and Get-GPO cmdlets, but I can't seem to get what I need. I found a script from Jaap in another post (...

View Article


Powershell v2. Delete or Remove Lines of Text. Regex Issue.

Hi All,First time posting and very new to PS. Please be gentle ;)I've been through so many posts today that offer Powershell examples of how to remove entire lines from a file by using line numbers....

View Article

.key and .crt certificate conversion to .pem format in PowerShell

Hello, During my work with openssl I came across a problem related to entity certificate and key conversion in .crt and .key format to .pem which is required by my application. Is there any possiblity...

View Article

Variable within a Variable in a foreach loop

I'm trying to run an invoke-expression command within a foreach loop that uses a variable within a variable.  Is this possible?  Any pointers would be great. Example$CmdToRun = "Get-Process X...

View Article

Change from Write-Host => export to .txt or .csv

I have a script that currently runs great with results displayed in a console. I've been trying to figure out how to change the output to a file (.txt or .csv). I have created empty files and errors...

View Article


Script to Query AD for List of Software

Hi All , newbie here.I have following script to query AD, get list of PC/servers that match filter ( operating system) , do a ping test and if successful will prompt to enter name of software to search...

View Article

How to add Details to First name & Last Name using CSV file.

Hello Everyone,We have 250 users in Accounts OU & Sales OU. At the time of creating of users we didn't add to many details. Now we have been told to add details regarding Department, Description,...

View Article


2 questions: Check to see if I'm running my script properly, help with an...

Hi All,So I currently have this code: Import-Module ActiveDirectory$searchOU = 'CN=District,CN=Test2,DC=csd,DC=local'Get-ADuser -filter * -searchbase $searchOU -properties DistinguishedName | Select...

View Article

unable to convert SID into user name for remote machine

Hi, Using below script i can convert the SID into user name locally.Can you please help me how to translate SID to user name from remote machine?$objSID = New-Object...

View Article


trying to get the primary SMTP address for a user

Hello,I am trying to get the primary SMTP address for a user and place it in a text file but I keep getting @{PrimarySmtpAddress=Some.User@SomeCompany.com}. I am only wanting the...

View Article

Connect to FTP site and transfer data to local computer

I've been looking around for quite a while and can't seem to find an FTP function that will allow me to do this easily.  Just wondering if someone else out there found something or created something...

View Article

Check if a first name and last name exist in AD.

HI all,I need your help.I've a powershell script that work so fine and that update the "pager" attribut for every user found in temp.csv...

View Article
Browsing all 6937 articles
Browse latest View live