Quantcast
Browsing all 21975 articles
Browse latest View live

Add-Computer command is throwing Access is Denied

Hi All,I have developed a script to change the domain of the remote computer using invoke-command and add-computer command. This is working fine in 2012 Machines.But when I am trying to execute the...

View Article


Need help simplifying get-date

I have a script that returns all users from AD who logged in from the last 30 days, but I need to adjust it to make it for the current calendar month. I've got the following code but I could do with...

View Article


Change the type of the X Axis in Excel 2010 with Powershell

Hi,I am working on a project of daily reporting and the simplest way is to use powershell to export the datas and put it in an excel worksheet. In another worksheet, I use the datas to create a...

View Article

Bamboozled by the pipeline again

I have a set of keys in the registry, of which some have a specific value set for (Default). I need to build an array of just the names of those keys with (Default) equal to a certain value. I have...

View Article

Cant enable AD Recycle bin faeture through Power shell

Hi,I have Server 2008 R2 running in our environement.Domain functional level set to : 2008 R2Forest functional level set to : 2008 R2after checking awl these level i run following command over power...

View Article


Get-RDUserSession in Powershell in pssession

I type command in Powershell Get-RDUserSession. I get all connecting user in terminal serwer.When I type this command in pssession I get error:Cannot index into a null array. At...

View Article

Why does the help documentation for Test-Path restrict its use with files?

Why does the help documentation for Test-Path restrict it to use with files?As is documented in the article below, any PS provider object with a location and path can be used with...

View Article

New AD User With Different Primary Group At Creation

Is there a way to script creating a new AD user and specify a group other than "Domain Users" as the Primary at creation time?  Right now I can create a new user account, add "AltGrp01", set "AltGrp01"...

View Article


Server 2012 R2 powershell install of RemoteAccess (Including DirectAccess)

I am building a test lab with Server 2012 R2 for Remote Access. The GUI install went smooth but I am trying to figure out how to install the role and role services with PowerShell.From what I read I...

View Article


When to use Microsoft.Win32.RegistryView.Registry64

I'm writing a PowerShell script that modifies the registry and I'm wondering if I need to specify the bittness of the keys I'm trying to modify.  I'm hoping someone can clear this up for me.As I...

View Article

Finding files 10k and greater

I am using the Get-ChildItem cmdlet and need to pull out a list of 10k or larger files and copy them to a list. How do I express the10k property in a powershell script to accomplish it though? Thanks...

View Article

get objectsid property

is it possible to get the objectsid property based on a txt file populated with username or samaccounts from one domain.and then using the same file populate the msRTCSIP-OriginatorSID using a separate...

View Article

Function cannot evaluate percentage

Hi All, Does anyone know how i might be able to get this function to evaluate table cells containing (%) percentage values? It can currently only evaluate cells containing numbers without the (%) sign...

View Article


Software triggered IRQ in PS

Is there  a way in powershell to initiate software triggered IRQ. I am trying to use the Measure-command to find the execution time of a script block. But due to the high CPU queue length, I see delays...

View Article

System::Management::Automation not recognized in cpp code

I need to call powershell cmdlets from cpp code. The cmdlets which will operate the vm's from the hyper-v.I found that to run the powershell cmdlets, will have to create powershell object and then...

View Article


Copy files over network

I have to copy files from one share network to another share network. But both the share network on different domains. Is it possible to do such via powershell?$Share 1= //k0z0s1/D$ -- domain --...

View Article

Creating a loop through importing a text file

I am currently using this script:Param(                [parameter(Mandatory=$true)]               $ManagementServer,               [parameter(Mandatory=$true)]               $ManagementPackID,...

View Article


Converting "whencreated"...

Hi All,I'm writing a simple script to get few inactive accounts, for better comparison in excel i'm chopping off the time from: whencreted, LastLogonTimeStamp & PwdLastSet like this:#get the...

View Article

-Match and $Matches[0] in a single if?

This bit of code seems to be working intermittently for me, and I can't nail down what the problem is.if (($Places[-1] -match "([0-9])") -and ([bool]($Matches[0] -as [int]))) { some stuff }If I make it...

View Article

Set an Active Directory ExtendedRight

Hi Everyone I would like to set the DS-Install-Replica (Add/Remove Replica In Domain) on the domain using Powershell.http://msdn.microsoft.com/en-us/library/ms684351%28VS.85%29.aspx This is the...

View Article
Browsing all 21975 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>