Quantcast
Browsing all 21975 articles
Browse latest View live

Get-ADUser - Scheduled Task

Hi All,I have a task that's ran to read various properties for all users in the domain from Get-ADUser.  The issue is though task runs and completes in two seconds.  Of course nothing is exported. If I...

View Article


How to I display what assemblies are loaded in a current ps console session?

How to I display what assemblies are loaded in a current ps console session? I would like to know this so I can see what assemblies are loaded in ISE vs the regular PS console.

View Article


Problem with script only works in ISE not in powershell command line

I have a script below that I am having some trouble with it seems to work in the ISE but not when I right click then hit run in powershell. I have tried using a runas statement before to run powershell...

View Article

How would I install assemblies that are loaded in my GAC to a ps console...

How would I install assemblies that are loaded in my GAC to a ps console session?

View Article

what is wrong with this code?

I am using the Quest AD tools.   I loaded them up before I ran this code.function inactive_computers() {    Set-QADPSSnapinSettings -DefaultSizeLimit 0    $old = (Get.Date).AddDays(-50)...

View Article


How to read content of Appdata folder in user's profile folder on remote...

Hello folks,I am not much familiar with PowerShell, but I need such a script which can help me out to read content of directory on remote computer.I want to create a script which can read and create a...

View Article

Should be something simple - Just not showing one property

I wrote a script to query AD and then work out the filesize of their homedirectory path in AD. It's currently not showing the users SamAccountName as requested.  It does however calculate the folder...

View Article

Check if item is a folder

Hi,Ihave an array like $a = gci and I am passing $a through a foreach statement.How can I check if the item in the array is a folder, so likeif $item is not a folder then delete.  I tried this forst...

View Article


Bulk-create printer objects on windows 2008 R2 x64 print servers using...

Hi,I have an issue on a 2008 Server R2 x64 when trying to create a printer with this Powershell script:function CreatePrinter {$server = $args[0]$print =...

View Article


Assigning user rights to other mailboxes using PowerShell

Hi guys! I'm an Intern at a certain IT company, I've been given a task by our manager to assign user rights to certain mailboxes using PowerShell. Now the  thing is, I have to get on to office365 using...

View Article

New-PSdrive fails in script, works at command line

If I RDP to ServerA (2008R2) as userB (Domain User) and open a PS (2.0) command window, I can successfully run:New-PSdrive -Name "X" -PSProvider FileSystem -Root "\\MYSERVER\MyShare"But if I RDP to...

View Article

Script freezes at end in ps console!

The script below does not run it just hangs at the very end inside the powershell console it does however work in the ISE. I have made sure to load all the assemblies,snapins, and modules into the...

View Article

Move object fails

$Inactive_computer_OU = "OU=_test,OU=InactiveMachines,DC=BakerINC,DC=Local,DC=Com" function inactive_computers() {    Set-QADPSSnapinSettings -DefaultSizeLimit 0    $old = (Get-Date).AddDays(-90)...

View Article


Add-Type unsafe

To add C# code unsafe, I'm trying this:Add-Type -TypeDefinition $code ` -UsingNamespace 'System.Runtime.InteropServices','System.Text' ` -CompilerParameters '/unsafe'But it fails.PowerShell says...

View Article

Elevate powershell script automatically

$wmi = Get-WmiObject win32_networkadapterconfiguration -filter "ipenabled = 'true'" $DNSServers = "8.8.8.8","4.2.2.2" $wmi.SetDNSServerSearchOrder($DNSServers)Hello All, I need to have this script run...

View Article


How to modify AD User telephone notes from Powershell

I would like to modify the "notes" attribute under the "telephone" tab for an AD user on server 2008 R2. I can't figure out how to do it since there is no parameter for the Set-ADUser cmdlet to do so. 

View Article

copy/move/append to file name

I have a process in place where another department recieves faxes and then copies those faxes into a fileshare that my dept. manages.  On our side of things we consider this share as the "Source"  we...

View Article


Powershell Get-ADGroupMember Size Limit

Get-ADGroupMember -identity "Applications" -recursive|Where-Object {$_.distinguishedName -like "*OU=Apps,OU=Security*" }| Select Name,SamAccountName |Sort -Property Name |Export-csv -path...

View Article

Read One Character at a time

This seems trivial, but I can't figure it out. Is there a native way or a .NET method to get one character at a time?I want to take in numbers or characters from the console and perform calculations...

View Article

who added user into Ad group

HiIs there any way to finout who added user in to domain admin group?

View Article
Browsing all 21975 articles
Browse latest View live