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 ArticleIs 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 ArticleHow 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 ArticleSyntax 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 ArticleDownload 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 ArticleCopy-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 ArticlePS 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 Articleget-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 ArticleGUID 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 ArticlePowershell: 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 ArticleEnable 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 Articlequotes 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 ArticleHow 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 ArticleExtensionAttributes
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 ArticleUse 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 ArticleUsing [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 ArticleUsing 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 ArticleWhere 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