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

#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

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

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


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


Change Local Password

I've Googled this and I've gotten tons of good hits.  But here is what our environment looks like. We have many Windows 2003 x86 & x86 servers.  We have many Windows 2008 R2 x64 servers.We have a...

View Article

Send Email using powershell

Hi,I have a OFT format file with all the text I need to send. I like to create a script which emails my OFT file which the changes I make.e.g. change name to different users.Need one which use the...

View Article


Problems with creating a Windows Server 2008 R2 Failover Cluster Remotely...

Hi guys,I am trying to remotely setup a cluster (Windows Server 2008 R2 Failover clustering) from a single central server. So in my scenario, I have 3 servers. My central script server and my 2 cluster...

View Article

Remote PowerShell - Validating new 2008 Cluster

 Hi,If it a possible, I need an advice, about remote installation MS Cluster 2008 with PowerShell. I run following script by PowerShell remote to remote machine (Windows 2008 R2), this script only...

View Article


PowerShell Techniques : Commenting Scripts, it’s always helpful.

I hope you are enjoying my Powershell Techniques series of web post. I always mention in most of my blog posts that, learning or memorizing what cmdlets do is really easy , but it is bit difficult to...

View Article

Windows Azure IaaS Deployment Methodology with PowerShell Part Two:...

In Part One, I showed you important artifacts in Windows Azure IaaS. Why they are needed and the sequence to create and deploy them. To better manage all resources in a deployment, my best practice is...

View Article

Windows Azure IaaS Deployment Methodology with PowerShell Part One

This blog post series is to examine key Windows Azure IaaS concepts and deployment methodology. Part One presents the artifacts which together constitutes an IaaS deployment by walking through a...

View Article
Browsing all 6937 articles
Browse latest View live