PowerShell won’t rename an export .csv file

I am trying to rename the file export.csv to the $name but with a .csv extension instead of .file. The output is still $name.file. Import-Module ActiveDirectory $name = Read-Host “Enter Group Name” Get-ADGroupMember -identity “$name” -Recursive |select name, SamAccountName| export-csv -path C:\export.csv -NoTypeInformation get-childItem *.file | Rename-Item -newname {$name.name -replace ‘\.file’, ‘.csv’} So I did … Read more

Run Bash Script Another Server

I want to run command one by one, for change the names of the directories on the server. When I run script, directories renamed in server 1. But, directories are not found in server 2. What the error could be in the script? Script; #!/bin/bash mach_directory=/home/user/example erase_dir1=cache erase_dir2=tmp for i in {0..10} do user=user server=$(ssh … Read more

GPO’s filtered out – wrong domain name reported by BGinfo

I am trying to locate a group policy deployment issue I have. The problem is that domain related GPO’s are filtered out. We renamed our domain lately from: CONTOSO to: lan.CONTOSO.com (Netbios name is: CONTOSO and unchanged). I started to investigate, and the first sign of problem is when running BGinfo – we still see … Read more

the file is open in IIS Worker Process

I have a WCF service hosted on IIS7. I am using source control tool (IBM RTC) to manage code base and continuous deployment on our testing server. but my deployment is failing because IIS has acquired lock on log file. Error message: The command “ren “<some service path on network share>” “”<to path on network … Read more

Unable to rename SCCM asset

Simply put, I delete the asset from SCCM but when I go to reimage the machine I cannot rename. After I choose the image the task sequence begins without prompting for a machine name. What am I missing here? Update: This problem was attributed to a specific computer that was causing any computer that was … Read more

WMI E_ACCESSDENIED errors when attempting to remotely rename computer via PowerShell

I am trying to run a script to rename remote computers via PowerShell. The problem I’m running into is that I’m getting the following error: Rename-Computer : Cannot establish the WMI connection to the computer ‘computername’ with the following error Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)). At C:\temp\scripts\rename_script\new_rename.ps1:8 char:5 + Rename-Computer -NewName $Computer.newname … Read more

Rename a linux user (and their home folder) with Ansible

I have a linux user with various folders and files in their home: User: foo /home/foo/somefolder I want to rename this user and move their home directory to end up with: User: bar /home/bar/somefolder I would do this by hand with sudo usermod –login new_username old_username Followed by sudo usermod –home /home/new_username –move-home new_username Can … Read more

Change Domain Name Forest Root

Forest Root Name is abc123.com The only domain in the forest is abc123.com I want to add a new Domain called newxyz.com as a Tree Domain, non-contiguous domain. Using a 2way transitive trust I would like to slowly migrate all department objects such as users over to the new newxyz.com domain while allowing members of … Read more