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

enable powershell on servers

is there a way to remotely enable PS on servers?   What I have to do right now is: RDC into remote serverStart CMD as an AdministratorStart PSType in Set-ExecutionPolicy Unrestricted Can you do that...

View Article


Is it possible.... (or should I look elsewhere?)

to validate passwords against a single password entered as a parameter? In our efforts to secure out network, it has come to the attention of many that the same password has been used all over the...

View Article


How to find all hostnames in DNS belong to single IP?

For example.. I have two A records which belong to 1.1.1.1A.test.com ->1.1.1.1B.test.com ->1.1.1.1How do I use PowerShell to report such IP's which has more than one hostnames?

View Article

Syntax Error

This code works.  It will return Evenlog info about the remote machine.   Clear-Host$Machine = "RemoteMachine"Get-Eventlog -List -ComputerName $Machine This code fails and gives this error....

View Article

Download files from a Sharepoint Online Document Library

HiI need to write a powershell script that will download the contents of a SharePoint document Library to a local folderI have pieced together the following script which created the filenames on my...

View Article


Copy-Item....

folks I have a simple script Copy-Item -recurse $i.FullName $destinationIt works great except on one server.Where it copies the entire content irrespective of whether it exists at the destination or...

View Article

PS Script - Scheduled Task - result & Status?

I think I have a working ps script running as a scheduled task.  What I've found is that the status is "ready", but I can see the process that the powershell script launches running as it's an app...

View Article

Image may be NSFW.
Clik here to view.

get-GPRegistryValue retrieval of screen saver parameters

This is driving me up the wall, and I think that I'm missing something blindingly obvious.I need to pull a report on the screen saver config - timeout, security, etc. and no matter how I try this, it...

View Article


GUID Translate Script – PowerShell

Wrote a quick little PowerShell script to translate the GUID OpsMrg 2012 spits out and give you the display name.Note: This script is designed to be ran from the Operations Manger 2012 Shell /...

View Article


#PSTip How to prevent script execution for non-admin users

The #Requires statement allows us to prevent a script from running without the required elements. For example, we can specify a minimum version of PowerShell that the script requires.Read More

View Article

Powershell: Command to move an Active Directory User between two OU’s

If you want to move testuser from the current OU to the testou OU, you can use this command:Read More

View Article

Enable Logon As Batch Privilege

I need to add the group Administrators to Enable Logon as Batch Privilege in Local Security Policy via Powershell, but am not having any luck so far researching it.  Best I can find anywhere - or at...

View Article

quotes within quotes witha variable.

Hi allI am having an issue where i need to add " within an output this is due to spaces in the names. If i do not add the " i get what i need but since there are spaces in the names this will fail here...

View Article


How do I make this code run twice?

I found some code online that reads your UNINSTALL key in the registry and reports back what you have installed. $computers = Read-Host $array = @() foreach($pc in $computers){...

View Article

ExtensionAttributes

Guys,Looking for a way to get a user's extension attributes, and then replace them.Scenario Mailbox-enabled user is to have mailbox deleted/recreated and I need to replace the extension attributes once...

View Article


Use Windows PowerShell to Rename Files

Q: How can I rename a large number of files by using Windows PowerShell?A: I recently wanted to rename a portion of a large number of files. The best way I found to accomplish this was by using...

View Article

Using [System.Enum] remotely without PowerShell Remoting

Hello AllCan someone please help me with the following questionIf I do the following is lists the X509 stores on my...

View Article


Using Contains?

$SCCMSite = Read-Host "Which SCCM sit will this machine be a member of?  P01, P02, M01 or E01?"If ($SCCMSite -eq "P01")    {  $SITE = "\\BOSSMSP1\SMS_P01\Client\ccmsetup.exe"    } If ($SITE -contains...

View Article

Where to start for newbe's?

HelloI looked around for videos on tutorials but they say things that are over my head.When 95 was out, used to edit the .ini files all the time in the old doss commands and was just starting to get...

View Article

Update multiple contacts in AD

How can I update multiple contacts in AD 2010?

View Article
Browsing all 8583 articles
Browse latest View live


Latest Images